Method and device for creating cloud host, electronic equipment and storage medium

By obtaining the configuration parameters in the cloud host creation instructions, combining the cluster and network list of the cloud management platform, using correspondence filtering and intersection operations to determine the target storage pool, cluster and host, the problem of cloud host creation in the existing technology is solved, and efficient and convenient cloud host creation and high availability are achieved.

CN120263795APending Publication Date: 2025-07-04JINAN INSPUR DATA TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510250790.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-04
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The prior art is time consuming and affects the high availability of cloud hosts in batches.

Method used

By obtaining the configuration parameters in the cloud host creation instructions, combining the cluster list and basic network list of the cloud management platform, using the corresponding relationship between the network and the host, the host and the storage pool, and the host and the cluster, filtering and intersection operations to determine the target storage pool, cluster and host, and achieving efficient creation of the cloud host.

Benefits of technology

It realizes efficient and convenient creation of cloud hosts, and improves the high availability and resource utilization of cloud hosts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120263795A_ABST
    Figure CN120263795A_ABST
Patent Text Reader

Abstract

The invention relates to a method and device for creating a cloud host, electronic equipment and a storage medium. The method comprises the following steps: in response to a received creation instruction, obtaining an IP address, a subnet mask, a first cluster list and a basic network list of a to-be-created cloud host; filtering the basic network list according to the IP address and the subnet mask to obtain an available network list and a first host list; filtering the first cluster list through the first host list to obtain a second cluster list and a storage pool; determining a target storage pool, a second host list and a third cluster list from the storage pools; obtaining an intersection of the second cluster list and the third cluster list to obtain a fourth cluster list and a target cluster; and determining a target host according to the second host list and the target cluster, and creating the to-be-created cloud host according to the available network list, the target storage pool, the target cluster and the target host. By adopting the method, the cloud host can be efficiently and conveniently created, and the high availability of the cloud host is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and particularly to a method, device, electronic device, and storage medium for creating a cloud host. Background Art

[0002] With the advent of the era of Internet big data, the number of users and the exchanged data have increased explosively, and private cloud platforms have replaced the vast majority of traditional IT architectures. With the increase in cloud computing platforms, cloud management platforms have emerged as the times require. The cloud management platform manages multiple sites, and each site corresponds to a virtualization management platform closer to the bottom layer. Users can apply for resources and create cloud hosts from different sites through the cloud management platform. Currently, when creating cloud hosts in batches, each cloud host is created manually one by one, and the creation operation is particularly time-consuming and also affects the high availability of the cloud host.

[0003] Therefore, there is an urgent need to provide a method, device, electronic device, and storage medium for creating a cloud host that can create cloud hosts efficiently and conveniently and improve the high availability of the cloud host. Summary of the Invention

[0004] Based on this, in view of the above technical problems, it is necessary to provide a method, device, electronic device, and storage medium for creating a cloud host that can create cloud hosts efficiently and conveniently and improve the high availability of the cloud host.

[0005] In a first aspect, a method for creating a cloud host is provided, which is applied to a cloud management platform. The method includes:

[0006] In response to receiving a cloud host creation instruction, obtain the cloud host configuration parameters in the cloud host creation instruction, as well as the first cluster list and the basic network list of the cloud management platform, where the cloud host configuration parameters include the IP address and subnet mask of at least one cloud host to be created;

[0007] Filter the basic network list according to the IP address and subnet mask to obtain an available network list, and obtain a first host list corresponding to the available network list according to the correspondence between the network and the host;

[0008] Filter the first cluster list through the first host list to obtain a second cluster list, and obtain at least one storage pool corresponding to the host in the second cluster list according to the correspondence between the host and the storage pool;

[0009] Determine a target storage pool from at least one storage pool, and obtain a second host list corresponding to the target storage pool according to the correspondence between the storage pool and the host, and obtain a third cluster list corresponding to the second host list according to the correspondence between the host and the cluster;

[0010] By taking the intersection of the second cluster list and the third cluster list, a fourth cluster list is obtained, and a target cluster is determined from the fourth cluster list;

[0011] Based on the second host list and the target cluster, target hosts are determined, and at least one cloud host to be created is created according to the available network list, the target storage pool, the target cluster, and the target hosts.

[0012] In one embodiment, the cloud host configuration parameters include the target storage pool capacity of at least one cloud host to be created. Determining the target storage pool from at least one storage pool includes:

[0013] Obtain the number of cloud hosts already allocated on at least one storage pool, and sort at least one storage pool in descending order according to the number of cloud hosts already allocated to obtain a first sorting result;

[0014] Calculate the thick-provisioned capacity and thin-provisioned capacity of at least one storage pool in sequence according to the first sorting result, and compare the target storage pool capacity with the thick-provisioned capacity and the thin-provisioned capacity until the target storage pool is determined.

[0015] In one embodiment, calculating the thick-provisioned capacity and thin-provisioned capacity of at least one storage pool includes:

[0016] Obtain the available total capacity, reserved capacity, and used capacity of at least one storage pool. The thick-provisioned capacity = available total capacity - reserved capacity - used capacity;

[0017] Obtain the overcommit ratio of at least one storage pool. The thin-provisioned capacity = (available total capacity - reserved capacity) * overcommit ratio - used capacity.

[0018] In one embodiment, comparing the target storage pool capacity with the thick-provisioned capacity and the thin-provisioned capacity until the target storage pool is determined includes:

[0019] Compare the target storage pool capacity of at least one storage pool with the thick-provisioned capacity in sequence according to the first sorting result to obtain a first capacity comparison result;

[0020] In response to the first capacity comparison result indicating that the target storage pool capacity is greater than the thick-provisioned capacity, compare the target storage pool capacity of the next storage pool with the thick-provisioned capacity;

[0021] In response to the first capacity comparison result indicating that the target storage pool capacity is less than or equal to the thick-provisioned capacity, compare the target storage pool capacity of the current storage pool with the thin-provisioned capacity to obtain a second capacity comparison result;

[0022] In response to the second capacity comparison result indicating that the target storage pool capacity is less than or equal to the thin provisioning capacity, determine that the current storage pool is a thick provisioning storage pool, use the current storage pool as the target storage pool, and stop the calculation and comparison;

[0023] In response to the second capacity comparison result indicating that the target storage pool capacity is greater than the thin provisioning capacity, determine that the current storage pool is a thin provisioning storage pool, and sequentially determine whether the storage pools behind the current storage pool are thick provisioning storage pools according to the first sorting result;

[0024] In response to the existence of a thick provisioning storage pool behind the current storage pool, determine the corresponding thick provisioning storage pool as the target storage pool and stop the determination;

[0025] In response to the non - existence of a thick provisioning storage pool behind the current storage pool, determine the current storage pool as the target storage pool.

[0026] In one embodiment, determining the target cluster from the fourth cluster list includes:

[0027] Obtain the target application attributes of at least one cloud host to be created, and obtain the number of cloud hosts with the target application attributes in the clusters in the fourth cluster list;

[0028] Sort the clusters in the fourth cluster list in ascending order according to the number of cloud hosts with the target application attributes to obtain a second sorting result;

[0029] According to the second sorting result, use the first cluster as the target cluster.

[0030] In one embodiment, determining the target host according to the second host list and the target cluster includes:

[0031] Obtain the hosts in the second host list and the hosts in the target cluster;

[0032] By taking the intersection of the hosts in the second host list and the hosts in the target cluster, obtain at least one available host;

[0033] Determine the target host from at least one available host.

[0034] In one embodiment, determining the target host from at least one available host includes:

[0035] Obtain the processor over - commitment ratio, memory over - commitment ratio, and the number of virtual switches of at least one available host;

[0036] Obtain an adjustment coefficient, and calculate the resource free space of at least one available host according to the processor overcommit ratio, memory overcommit ratio, number of virtual switches, and the adjustment coefficient, where the resource free space = (2 - processor overcommit ratio - memory overcommit ratio) / 2 - adjustment coefficient * number of virtual switches;

[0037] Sort at least one available host in descending order according to the resource free space to obtain a third sorting result;

[0038] Determine the first available host as the target host according to the third sorting result.

[0039] In a second aspect, a device for creating a cloud host is provided. The device includes:

[0040] An obtaining module, which is used to obtain the cloud host configuration parameters in the cloud host creation instruction, as well as the first cluster list and the basic network list of the cloud management platform in response to receiving the cloud host creation instruction, where the cloud host configuration parameters include the IP address and subnet mask of at least one cloud host to be created;

[0041] A first filtering module, which is used to filter the basic network list according to the IP address and subnet mask to obtain an available network list;

[0042] A first corresponding module, which is used to obtain a first host list corresponding to the available network list according to the correspondence between the network and the host;

[0043] A second filtering module, which is used to filter the first cluster list through the first host list to obtain a second cluster list;

[0044] A second corresponding module, which is used to obtain at least one storage pool corresponding to the host in the second cluster list according to the correspondence between the host and the storage pool;

[0045] A first determining module, which is used to determine a target storage pool from at least one storage pool;

[0046] A third corresponding module, which is used to obtain a second host list corresponding to the target storage pool according to the correspondence between the storage pool and the host, and obtain a third cluster list corresponding to the second host list according to the correspondence between the host and the cluster;

[0047] An operation module, which is used to obtain a fourth cluster list by taking the intersection of the second cluster list and the third cluster list;

[0048] A second determining module, which is used to determine a target cluster from the fourth cluster list;

[0049] A third determination module, which is configured to determine a target host according to the second host list and the target cluster;

[0050] A creation module, which is configured to create at least one cloud host to be created according to the available network list, the target storage pool, the target cluster, and the target host.

[0051] In a third aspect, an electronic device is provided. The electronic device includes one or more processors; and a memory associated with the one or more processors. The memory is used to store program instructions. When the program instructions are read and executed by the one or more processors, the steps of any method in the first aspect described above are executed.

[0052] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of any method in the first aspect described above are executed.

[0053] In a fifth aspect, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps of any method in the first aspect described above are implemented.

[0054] For the above method, device, electronic device, and storage medium for creating a cloud host, according to the correspondence between the network and the host, the correspondence between the host and the storage pool, and the correspondence between the host and the cluster, combined with the IP address and subnet mask of the cloud host to be created, and the first cluster list and basic network list of the cloud management platform, the available network list, the target storage pool, the target cluster, and the target host are determined; and the cloud host to be created is created according to the available network list, the target storage pool, the target cluster, and the target host. It realizes the efficient and convenient creation of cloud hosts and improves the high availability of cloud hosts. Description of the Drawings

[0055] Figure 1 It is a schematic flowchart of a method for creating a cloud host in an embodiment;

[0056] Figure 2 It is a schematic flowchart of the step of determining the target storage pool in a method for creating a cloud host in an embodiment;

[0057] Figure 3 It is a schematic flowchart of the step of determining the target cluster in a method for creating a cloud host in an embodiment;

[0058] Figure 4 It is a schematic flowchart of the step of determining the target host in a method for creating a cloud host in another embodiment;

[0059] Figure 5 It is a structural block diagram of a device for creating a cloud host in an embodiment;

[0060] Figure 6 Internal structure diagram of an electronic device in an embodiment. Detailed implementation manners

[0061] To make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0062] Embodiment 1

[0063] In one embodiment, as Figure 1 shown, a method for creating a cloud host is provided, which is applied to a cloud management platform. The method includes:

[0064] In response to receiving a cloud host creation instruction, obtain the cloud host configuration parameters in the cloud host creation instruction, as well as the first cluster list and the basic network list of the cloud management platform. Among them, the cloud host configuration parameters include the IP address and subnet mask of at least one cloud host to be created;

[0065] Filter the basic network list according to the IP address and subnet mask to obtain an available network list, and obtain a first host list corresponding to the available network list according to the correspondence between the network and the host;

[0066] Filter the first cluster list through the first host list to obtain a second cluster list, and obtain at least one storage pool corresponding to the hosts in the second cluster list according to the correspondence between the host and the storage pool;

[0067] Determine a target storage pool from at least one storage pool, and obtain a second host list corresponding to the target storage pool according to the correspondence between the storage pool and the host, and obtain a third cluster list corresponding to the second host list according to the correspondence between the host and the cluster;

[0068] Obtain a fourth cluster list by taking the intersection of the second cluster list and the third cluster list, and determine a target cluster from the fourth cluster list;

[0069] Determine a target host according to the second host list and the target cluster, and create at least one cloud host to be created according to the available network list, the target storage pool, the target cluster and the target host.

[0070] In a specific embodiment, when creating at least one cloud host to be created according to the available network list, directly randomly select an available network from the available network list and set it on the cloud host network card.

[0071] The first cluster list includes all clusters in the staff management platform. Through the site ID, the basic network created or managed by the site on the cloud management platform can be obtained, and the basic network list can be obtained. A site can create multiple basic networks on the cloud management platform, that is, site: basic network = 1: n. The cloud management platform uses the network ID through RPC (Remote Procedure Call) to obtain the virtual switch corresponding to the network on the corresponding site. Generally speaking, the virtual switch is built on all hosts in the same cluster, that is, virtual switch: network = 1: n; virtual switch: host = n: n; cluster: host = 1: n; storage pool: host = n: n.

[0072] Specifically, according to the corresponding relationship between the network and the host, the corresponding relationship between the host and the storage pool, and the corresponding relationship between the host and the cluster, combined with the IP address and subnet mask of the cloud host to be created, as well as the first cluster list and basic network list of the cloud management platform, the available network list, the target storage pool, the target cluster, and the target host are determined; according to the available network list, the target storage pool, the target cluster, and the target host, the cloud host to be created is created. It realizes the efficient and convenient creation of cloud hosts and improves the high availability of cloud hosts.

[0073] In one embodiment, as Figure 2 shown, the cloud host configuration parameters include the target storage pool capacity of at least one cloud host to be created. Determining the target storage pool from at least one storage pool includes:

[0074] Obtain the number of cloud hosts already allocated on at least one storage pool, and sort at least one storage pool in descending order according to the number of cloud hosts already allocated to obtain the first sorting result;

[0075] Calculate the thick-provisioned capacity and thin-provisioned capacity of at least one storage pool in turn according to the first sorting result, and compare the target storage pool capacity with the thick-provisioned capacity and thin-provisioned capacity until the target storage pool is determined.

[0076] In a specific embodiment, the storage pool is divided into at least one storage group, and <storage group, storage pool list> is obtained by traversing, where storage group: storage pool = 1: n.

[0077] Specifically, the target storage pool is determined according to the size relationship between the target storage pool capacity and the thick-provisioned capacity and thin-provisioned capacity, as well as the number of cloud hosts already allocated on the storage pool, which not only ensures that the target storage pool meets the target storage pool capacity of the cloud host to be created, but also improves the resource utilization rate of the target storage pool.

[0078] In one embodiment, as Figure 2 shown, calculating the thick-provisioned capacity and thin-provisioned capacity of at least one storage pool includes:

[0079] Obtain the total available capacity, reserved capacity, and used capacity of at least one storage pool. The thick-provisioned capacity = total available capacity - reserved capacity - used capacity;

[0080] Obtain the overcommit ratio of at least one storage pool. The thin-provisioned capacity = (total available capacity - reserved capacity) * overcommit ratio - used capacity.

[0081] Specifically, by calculating the thick-provisioned capacity and the thin-provisioned capacity, the resource utilization rate of the storage pool is improved.

[0082] In one embodiment, as Figure 2 shown, compare the target storage pool capacity with the thick-provisioned capacity and the thin-provisioned capacity until the target storage pool is determined, including:

[0083] Compare the target storage pool capacity of at least one storage pool with the thick-provisioned capacity in sequence according to the first sorting result to obtain the first capacity comparison result;

[0084] In response to the first capacity comparison result indicating that the target storage pool capacity is greater than the thick-provisioned capacity, compare the target storage pool capacity of the next storage pool with the thick-provisioned capacity;

[0085] In response to the first capacity comparison result indicating that the target storage pool capacity is less than or equal to the thick-provisioned capacity, compare the target storage pool capacity of the current storage pool with the thin-provisioned capacity to obtain the second capacity comparison result;

[0086] In response to the second capacity comparison result indicating that the target storage pool capacity is less than or equal to the thin-provisioned capacity, determine the current storage pool as the thick-provisioned storage pool, and use the current storage pool as the target storage pool, and stop the calculation and comparison;

[0087] In response to the second capacity comparison result indicating that the target storage pool capacity is greater than the thin-provisioned capacity, determine the current storage pool as the thin-provisioned storage pool, and sequentially determine whether the storage pools behind the current storage pool are thick-provisioned storage pools according to the first sorting result;

[0088] In response to the existence of a thick-provisioned storage pool behind the current storage pool, determine the corresponding thick-provisioned storage pool as the target storage pool, and stop the judgment;

[0089] In response to the non-existence of a thick-provisioned storage pool behind the current storage pool, determine the current storage pool as the target storage pool.

[0090] In a specific embodiment, when there is neither a thick-provisioned storage pool nor a thin-provisioned storage pool in at least one storage pool, prompt that the storage resources required for creating the to-be-created cloud host are missing.

[0091] Specifically, first determine whether the capacity of the target storage pool is less than or equal to the thick-provisioned capacity. If so, then determine whether the capacity of the target storage pool is less than or equal to the thin-provisioned capacity. If so, determine that the current storage pool is a thick-provisioned storage pool; if not, determine that the current storage pool is a thin-provisioned storage pool. Determine the first thick-provisioned storage pool as the target storage pool according to the first sorting result. If there is no thick-provisioned storage pool, determine the first thin-provisioned storage pool as the target storage pool. This improves the high availability of cloud hosts.

[0092] In one embodiment, as Figure 3 shown, determining a target cluster from a fourth cluster list includes:

[0093] Obtain the target application attributes of at least one cloud host to be created, and obtain the number of cloud hosts with the target application attributes in the clusters in the fourth cluster list;

[0094] Sort the clusters in the fourth cluster list in ascending order according to the number of cloud hosts with the target application attributes to obtain a second sorting result;

[0095] According to the second sorting result, take the first cluster as the target cluster.

[0096] Specifically, dispersing cloud hosts belonging to the same application attribute in different clusters ensures the balanced distribution of resources, improves the robustness of the enterprise's external application deployment, and enhances the core competitiveness of the product.

[0097] In one embodiment, as Figure 4 shown, determining a target host according to a second host list and a target cluster includes:

[0098] Obtain the hosts in the second host list and the hosts in the target cluster;

[0099] By taking the intersection of the hosts in the second host list and the hosts in the target cluster, obtain at least one available host;

[0100] Determine a target host from at least one available host.

[0101] Specifically, by taking the intersection of the hosts in the second host list and the hosts in the target cluster, it is ensured that the target host meets the storage requirements and network requirements.

[0102] In one embodiment, as Figure 4 shown, determining a target host from at least one available host includes:

[0103] Obtain the processor overcommit ratio, memory overcommit ratio, and virtual switch quantity of at least one available host;

[0104] Obtain an adjustment coefficient, and calculate the resource free space of at least one available host according to the processor overcommit ratio, memory overcommit ratio, number of virtual switches, and the adjustment coefficient, where the resource free space = (2 - processor overcommit ratio - memory overcommit ratio) / 2 - adjustment coefficient * number of virtual switches;

[0105] Sort at least one available host in descending order according to the resource free space to obtain a third sorting result;

[0106] According to the third sorting result, determine the first available host as the target host.

[0107] Specifically, by calculating the resource free space of at least one available host and determining the available host with the highest resource free space as the target host, the resource utilization rate of the host and the high availability of the cloud host are improved.

[0108] In one embodiment, before creating at least one cloud host to be created, the method further includes:

[0109] Obtain the memory parameters, processor parameters of the target cluster, and the memory parameters of the target host, where the memory parameters of the target cluster include the cluster reserved memory and the cluster used memory, the processor parameters of the target cluster include the total physical frequency of the processor, the used frequency of the processor, and the reserved frequency of the processor, and the memory parameters of the target host include the total host memory, the host memory overcommit ratio, and the used host memory;

[0110] Judge whether the memory parameters, processor parameters of the target cluster, and the memory parameters of the target host meet the boot conditions, where the boot conditions include the cluster memory boot condition, the processor boot condition, and the host memory boot condition;

[0111] In response to the memory parameters, processor parameters of the target cluster, and the memory parameters of the target host meeting the boot conditions, create at least one cloud host to be created according to the available network list, target storage pool, target cluster, and target host;

[0112] In response to the memory parameters of the target cluster not meeting the cluster memory boot condition and / or the processor parameters not meeting the processor boot condition and / or the memory parameters of the target host not meeting the host memory boot condition, re-determine the available network list, target storage pool, target cluster, and target host.

[0113] Specifically, judge whether the current resource allocation meets the boot conditions. If it meets, create the cloud host to be created according to the current resource allocation method. If it does not meet, re-determine the resource allocation method on the basis of meeting the boot conditions, where the resource allocation method includes the available network list, target storage pool, target cluster, and target host. This ensures the normal boot of the cloud host to be created.

[0114] In a specific embodiment, when customers have some special requirements, manual configuration adjustment can also be used. For example, due to network reasons or small scale, if it is required that all cloud host resources be deployed in the same cluster or the same storage, the user can adjust the entire allocation policy by himself. For example, adjust the size, location or allocation policy of the disk, the location of the cluster, and the location of the host, etc.

[0115] In a specific embodiment, it is assumed that at the beginning of batch creation of cloud hosts, 100G is found remaining in the database. The first cloud host has been allocated 8G of memory, but since this is allocated resources, the allocated 8G has not been written into the database. Therefore, when allocating the second cloud host, only 92G is available, and the allocated 8G of memory is recorded in the cache system. After all cloud hosts are allocated, the resource consumption is written into the database. The cache system contains caches of all resource capacities, such as memory and disk capacity.

[0116] It should be understood that although Figure 1 , Figure 2 , Figure 3 , Figure 4 the steps in the flowchart of Figure 1 , Figure 2 , Figure 3 , Figure 4 are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover,

[0117] Embodiment 2

[0118] In one embodiment, as Figure 5 shown, a device for creating a cloud host is provided. The device includes:

[0119] An acquisition module, which is used to respond to receiving a cloud host creation instruction, acquire the cloud host configuration parameters in the cloud host creation instruction, as well as the first cluster list and the basic network list of the cloud management platform. Among them, the cloud host configuration parameters include the IP address and subnet mask of at least one cloud host to be created;

[0120] A first filtering module, which is used to filter the basic network list according to the IP address and subnet mask to obtain an available network list;

[0121] The first corresponding module is used to obtain a first host list corresponding to the available network list according to the correspondence between the network and the host;

[0122] The second filtering module is used to filter the first cluster list through the first host list to obtain a second cluster list;

[0123] The second corresponding module is used to obtain at least one storage pool corresponding to the host in the second cluster list according to the correspondence between the host and the storage pool;

[0124] The first determination module is used to determine a target storage pool from at least one storage pool;

[0125] The third corresponding module is used to obtain a second host list corresponding to the target storage pool according to the correspondence between the storage pool and the host, and obtain a third cluster list corresponding to the second host list according to the correspondence between the host and the cluster;

[0126] The operation module is used to obtain a fourth cluster list by taking the intersection of the second cluster list and the third cluster list;

[0127] The second determination module is used to determine a target cluster from the fourth cluster list;

[0128] The third determination module is used to determine a target host according to the second host list and the target cluster;

[0129] The creation module is used to create at least one cloud host to be created according to the available network list, the target storage pool, the target cluster, and the target host.

[0130] In one embodiment, the cloud host configuration parameters include the target storage pool capacity of at least one cloud host to be created, and the first determination module is used to determine a target storage pool from at least one storage pool, including:

[0131] Obtain the number of cloud hosts already allocated on at least one storage pool, and sort at least one storage pool in descending order according to the number of cloud hosts already allocated to obtain a first sorting result;

[0132] Calculate the thick-provisioned capacity and thin-provisioned capacity of at least one storage pool in sequence according to the first sorting result, and compare the target storage pool capacity with the thick-provisioned capacity and thin-provisioned capacity until the target storage pool is determined.

[0133] In one embodiment, the first determination module is used to calculate the thick-provisioned capacity and thin-provisioned capacity of at least one storage pool, including:

[0134] Obtain the total available capacity, reserved capacity, and used capacity of at least one storage pool. The thick-provisioned capacity = total available capacity - reserved capacity - used capacity;

[0135] Obtain the over-allocation ratio of at least one storage pool. The thin-provisioned capacity = (total available capacity - reserved capacity) * over-allocation ratio - used capacity.

[0136] In one embodiment, the first determination module is used to compare the target storage pool capacity with the thick-provisioned capacity and the thin-provisioned capacity until the target storage pool is determined, including:

[0137] Compare the target storage pool capacity of at least one storage pool with the thick-provisioned capacity in sequence according to the first sorting result to obtain the first capacity comparison result;

[0138] In response to the first capacity comparison result indicating that the target storage pool capacity is greater than the thick-provisioned capacity, compare the target storage pool capacity of the next storage pool with the thick-provisioned capacity;

[0139] In response to the first capacity comparison result indicating that the target storage pool capacity is less than or equal to the thick-provisioned capacity, compare the target storage pool capacity of the current storage pool with the thin-provisioned capacity to obtain the second capacity comparison result;

[0140] In response to the second capacity comparison result indicating that the target storage pool capacity is less than or equal to the thin-provisioned capacity, determine the current storage pool as the thick-provisioned storage pool, and use the current storage pool as the target storage pool, and stop the calculation and comparison;

[0141] In response to the second capacity comparison result indicating that the target storage pool capacity is greater than the thin-provisioned capacity, determine the current storage pool as the thin-provisioned storage pool, and sequentially determine whether the storage pools behind the current storage pool are thick-provisioned storage pools according to the first sorting result;

[0142] In response to the existence of a thick-provisioned storage pool behind the current storage pool, determine the corresponding thick-provisioned storage pool as the target storage pool, and stop the determination;

[0143] In response to the non-existence of a thick-provisioned storage pool behind the current storage pool, determine the current storage pool as the target storage pool.

[0144] In one embodiment, the second determination module is used to determine the target cluster from the fourth cluster list, including:

[0145] Obtain the target application attributes of at least one cloud host to be created, and obtain the number of cloud hosts with the target application attributes in the clusters in the fourth cluster list;

[0146] Sort the clusters in the fourth cluster list in ascending order according to the number of cloud hosts with the target application attributes to obtain the second sorting result;

[0147] Based on the second sorting result, take the first cluster as the target cluster.

[0148] In one embodiment, the third determination module is configured to determine a target host according to the second host list and the target cluster, including:

[0149] Obtain the hosts in the second host list and the hosts in the target cluster;

[0150] By taking the intersection of the hosts in the second host list and the hosts in the target cluster, obtain at least one available host;

[0151] Determine the target host from at least one available host.

[0152] In one embodiment, the third determination module is configured to determine a target host from at least one available host, including:

[0153] Obtain the processor overcommit ratio, memory overcommit ratio, and the number of virtual switches of at least one available host;

[0154] Obtain an adjustment coefficient, and calculate the resource free space of at least one available host according to the processor overcommit ratio, memory overcommit ratio, the number of virtual switches, and the adjustment coefficient, where the resource free space = (2 - processor overcommit ratio - memory overcommit ratio) / 2 - adjustment coefficient * the number of virtual switches;

[0155] Sort at least one available host in descending order according to the resource free space to obtain a third sorting result;

[0156] Based on the third sorting result, determine the first available host as the target host.

[0157] For the specific limitations on the device for creating a cloud host, reference can be made to the limitations on the method for creating a cloud host in the foregoing, which will not be elaborated here. Each module in the above device for creating a cloud host can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor in the electronic device in hardware form or be independent of it, or can be stored in the memory in the electronic device in software form, so that the processor can call and execute the operations corresponding to the above modules.

[0158] Embodiment Three

[0159] In one embodiment, an electronic device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:

[0160] In response to receiving a cloud host creation instruction, obtain the cloud host configuration parameters in the cloud host creation instruction, as well as the first cluster list and the basic network list of the cloud management platform. Among them, the cloud host configuration parameters include the IP address and subnet mask of at least one cloud host to be created.

[0161] Filter the basic network list according to the IP address and subnet mask to obtain an available network list, and obtain the first host list corresponding to the available network list according to the corresponding relationship between the network and the host.

[0162] Filter the first cluster list through the first host list to obtain a second cluster list, and obtain at least one storage pool corresponding to the host in the second cluster list according to the corresponding relationship between the host and the storage pool.

[0163] Determine a target storage pool from at least one storage pool, obtain the second host list corresponding to the target storage pool according to the corresponding relationship between the storage pool and the host, and obtain the third cluster list corresponding to the second host list according to the corresponding relationship between the host and the cluster.

[0164] Obtain a fourth cluster list by taking the intersection of the second cluster list and the third cluster list, and determine a target cluster from the fourth cluster list.

[0165] Determine a target host according to the second host list and the target cluster, and create at least one cloud host to be created according to the available network list, the target storage pool, the target cluster, and the target host.

[0166] When the program instructions are read and executed by one or more processors, the operations corresponding to the steps in the above method embodiments can also be performed. Reference can be made to the descriptions in the foregoing text, and details are not repeated here. Figure 6 , which exemplarily shows the architecture of an electronic device. Specifically, it may include a processor 610, a video display adapter 611, a disk drive 612, an input / output interface 613, a network interface 614, and a memory 620. The above-mentioned processor 610, video display adapter 611, disk drive 612, input / output interface 613, network interface 614, and memory 620 can be communicatively connected through a communication bus 630.

[0167] Among them, the processor 610 can be implemented in ways such as a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in this application.

[0168] The memory 620 can be implemented in the form of a Read Only Memory (ROM), a Random Access Memory (RAM), a static storage device, a dynamic storage device, etc. The memory 620 can store an operating system 621 for controlling the operation of the electronic device 600, and a Basic Input / Output System (BIOS) 622 for controlling the low-level operations of the electronic device 600. Additionally, a web browser 623, data storage management 624, an icon font processing system 625, etc. can also be stored. The above-mentioned icon font processing system 625 can be the application program that specifically implements the operations of the foregoing steps in the embodiments of the present application. In summary, when implementing the technical solution provided by the present application through software or firmware, the relevant program codes are stored in the memory 620 and are called and executed by the processor 610.

[0169] The input / output interface 613 is used to connect to an input / output module to implement information input and output. The input / output module can be configured as a component in the device (not shown in the figure) or can be externally connected to the device to provide corresponding functions. Among them, the input devices can include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices can include a display, a speaker, a vibrator, an indicator light, etc.

[0170] The network interface 614 is used to connect to a communication module (not shown in the figure) to implement communication interaction between this device and other devices. Among them, the communication module can implement communication in a wired manner (such as USB, network cable, etc.) or can implement communication in a wireless manner (such as a mobile network, WIFI, Bluetooth, etc.).

[0171] The bus 630 includes a path for transmitting information between various components of the device (such as the processor 610, the video display adapter 611, the disk drive 612, the input / output interface 613, the network interface 614, and the memory 620).

[0172] In addition, the electronic device 600 can also obtain information on specific collection conditions from the virtual resource object collection condition information database 641 for use in condition judgment, etc.

[0173] It should be noted that although the above-mentioned electronic device 600 only shows the processor 610, the video display adapter 611, the disk drive 612, the input / output interface 613, the network interface 614, the memory 620, the bus 630, etc., in the specific implementation process, the electronic device may also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above-mentioned device may also only include the components necessary for implementing the solution of the present application and does not necessarily include all the components shown in the figure.

[0174] As can be seen from the description of the above embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disc, etc., and includes several instructions for causing an electronic device (which can be a personal computer, a cloud server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiments of this application.

[0175] Embodiment 4

[0176] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0177] In response to receiving a cloud host creation instruction, obtain the cloud host configuration parameters in the cloud host creation instruction, as well as the first cluster list and the basic network list of the cloud management platform. Among them, the cloud host configuration parameters include the IP address and subnet mask of at least one cloud host to be created;

[0178] Filter the basic network list according to the IP address and subnet mask to obtain an available network list, and obtain a first host list corresponding to the available network list according to the corresponding relationship between the network and the host;

[0179] Filter the first cluster list through the first host list to obtain a second cluster list, and obtain at least one storage pool corresponding to the host in the second cluster list according to the corresponding relationship between the host and the storage pool;

[0180] Determine a target storage pool from at least one storage pool, and obtain a second host list corresponding to the target storage pool according to the corresponding relationship between the storage pool and the host, and obtain a third cluster list corresponding to the second host list according to the corresponding relationship between the host and the cluster;

[0181] Obtain a fourth cluster list by taking the intersection of the second cluster list and the third cluster list, and determine a target cluster from the fourth cluster list;

[0182] Determine a target host according to the second host list and the target cluster, and create at least one cloud host to be created according to the available network list, the target storage pool, the target cluster, and the target host.

[0183] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0184] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.

[0185] The above embodiments only represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.

[0186] Embodiment Five

[0187] In one embodiment, a computer program product is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0188] In response to receiving a cloud host creation instruction, obtain the cloud host configuration parameters in the cloud host creation instruction, as well as the first cluster list and the basic network list of the cloud management platform. Among them, the cloud host configuration parameters include at least the IP address and subnet mask of at least one cloud host to be created;

[0189] Filter the basic network list according to the IP address and subnet mask to obtain the available network list, and obtain the first host list corresponding to the available network list according to the correspondence between the network and the host;

[0190] Filter the first cluster list through the first host list to obtain the second cluster list, and obtain at least one storage pool corresponding to the host in the second cluster list according to the correspondence between the host and the storage pool;

[0191] Determine the target storage pool from at least one storage pool, and obtain the second host list corresponding to the target storage pool according to the correspondence between the storage pool and the host, and obtain the third cluster list corresponding to the second host list according to the correspondence between the host and the cluster;

[0192] Obtain the fourth cluster list by taking the intersection of the second cluster list and the third cluster list, and determine the target cluster from the fourth cluster list;

[0193] Determine the target host according to the second host list and the target cluster, and create at least one cloud host to be created according to the available network list, the target storage pool, the target cluster and the target host.

[0194] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer program product. When the computer program is executed, it can include the processes of the embodiments of the above methods.

[0195] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0196] The above embodiments only represent several implementation manners of the present application, and the description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.

Claims

1. A method for creating a cloud host, which is applied to a cloud management platform, and is characterized in that, The method includes: In response to receiving a cloud host creation instruction, obtaining the cloud host configuration parameters in the cloud host creation instruction, as well as the first cluster list and the basic network list of the cloud management platform, where the cloud host configuration parameters include the IP address and subnet mask of at least one cloud host to be created; Filtering the basic network list according to the IP address and subnet mask to obtain an available network list, and obtaining a first host list corresponding to the available network list according to the correspondence between the network and the host; Filtering the first cluster list through the first host list to obtain a second cluster list, and obtaining at least one storage pool corresponding to the host in the second cluster list according to the correspondence between the host and the storage pool; Determining a target storage pool from the at least one storage pool, and obtaining a second host list corresponding to the target storage pool according to the correspondence between the storage pool and the host, and obtaining a third cluster list corresponding to the second host list according to the correspondence between the host and the cluster; Obtaining a fourth cluster list by taking the intersection of the second cluster list and the third cluster list, and determining a target cluster from the fourth cluster list; Determining a target host according to the second host list and the target cluster, and creating the at least one cloud host to be created according to the available network list, the target storage pool, the target cluster, and the target host.

2. The method according to claim 1, wherein The cloud host configuration parameters include the target storage pool capacity of at least one cloud host to be created. Determining the target storage pool from the at least one storage pool includes: Obtaining the number of cloud hosts already allocated on the at least one storage pool, and sorting the at least one storage pool in descending order according to the number of cloud hosts already allocated to obtain a first sorting result; Calculating the thick-provisioned capacity and thin-provisioned capacity of the at least one storage pool in sequence according to the first sorting result, and comparing the target storage pool capacity with the thick-provisioned capacity and the thin-provisioned capacity until the target storage pool is determined.

3. The method according to claim 2, characterized in that Calculating the thick-provisioned capacity and thin-provisioned capacity of the at least one storage pool includes: Obtaining the available total capacity, reserved capacity, and used capacity of the at least one storage pool, where the thick-provisioned capacity = the available total capacity - the reserved capacity - the used capacity; Obtaining the over-allocation ratio of the at least one storage pool, where the thin-provisioned capacity = (the available total capacity - the reserved capacity) * the over-allocation ratio - the used capacity.

4. The method according to claim 2, wherein Comparing the target storage pool capacity with the thick-provisioned capacity and the thin-provisioned capacity until the target storage pool is determined includes: Comparing the target storage pool capacity of the at least one storage pool with the thick-provisioned capacity in sequence according to the first sorting result to obtain a first capacity comparison result; In response to the first capacity comparison result indicating that the target storage pool capacity is greater than the thick-provisioned capacity, comparing the target storage pool capacity of the next storage pool with the thick-provisioned capacity; In response to the first capacity comparison result indicating that the target storage pool capacity is less than or equal to the thick-provisioned capacity, comparing the target storage pool capacity of the current storage pool with the thin-provisioned capacity to obtain a second capacity comparison result; In response to the second capacity comparison result indicating that the target storage pool capacity is less than or equal to the thin provisioning capacity, determine that the current storage pool is a thick provisioning storage pool, use the current storage pool as the target storage pool, and stop the calculation and comparison; In response to the second capacity comparison result indicating that the target storage pool capacity is greater than the thin provisioning capacity, determine that the current storage pool is a thin provisioning storage pool, and sequentially determine whether the storage pools behind the current storage pool are thick provisioning storage pools according to the first sorting result; In response to the existence of a thick provisioning storage pool behind the current storage pool, determine the corresponding thick provisioning storage pool as the target storage pool, and stop the determination; In response to the non-existence of a thick provisioning storage pool behind the current storage pool, determine the current storage pool as the target storage pool.

5. The method according to claim 1, wherein Determine a target cluster from the fourth cluster list, including: Obtain the target application attributes of the at least one cloud host to be created, and obtain the number of cloud hosts with the target application attributes in the clusters in the fourth cluster list; Sort the clusters in the fourth cluster list in ascending order according to the number of cloud hosts with the target application attributes to obtain a second sorting result; According to the second sorting result, use the first cluster as the target cluster.

6. The method according to claim 1, characterized in that Determine a target host according to the second host list and the target cluster, including: Obtain the hosts in the second host list and the hosts in the target cluster; Obtain at least one available host by taking the intersection of the hosts in the second host list and the hosts in the target cluster; Determine a target host from the at least one available host.

7. The method according to claim 6, wherein Determine a target host from the at least one available host, including: Obtain the processor overcommit ratio, memory overcommit ratio, and the number of virtual switches of the at least one available host; Obtain an adjustment coefficient, and calculate the resource free space of the at least one available host according to the processor overcommit ratio, memory overcommit ratio, the number of virtual switches, and the adjustment coefficient, where the resource free space = (2 - the processor overcommit ratio - the memory overcommit ratio) / 2 - the adjustment coefficient * the number of virtual switches; Sort the at least one available host in descending order according to the resource free space to obtain a third sorting result; According to the third sorting result, determine the first available host as the target host.

8. An apparatus for creating a cloud host, characterized in that, The device includes: An acquisition module, which is used to, in response to receiving a cloud host creation instruction, acquire the cloud host configuration parameters in the cloud host creation instruction, as well as the first cluster list and the basic network list of the cloud management platform, where the cloud host configuration parameters include the IP addresses and subnet masks of at least one cloud host to be created; A first filtering module, which is used to filter the basic network list according to the IP addresses and subnet masks to obtain an available network list; A first corresponding module, which is used to obtain the first host list corresponding to the available network list according to the correspondence between the network and the host; A second filtering module, which is used to filter the first cluster list through the first host list to obtain a second cluster list; A second corresponding module, configured to obtain at least one storage pool corresponding to a host in the second cluster list according to the corresponding relationship between the host and the storage pool; A first determination module, configured to determine a target storage pool from the at least one storage pool; A third corresponding module, configured to obtain a second host list corresponding to the target storage pool according to the corresponding relationship between the storage pool and the host, and obtain a third cluster list corresponding to the second host list according to the corresponding relationship between the host and the cluster; An operation module, configured to obtain a fourth cluster list by taking the intersection of the second cluster list and the third cluster list; A second determination module, configured to determine a target cluster from the fourth cluster list; A third determination module, configured to determine a target host according to the second host list and the target cluster; A creation module, configured to create the at least one cloud host to be created according to the available network list, the target storage pool, the target cluster, and the target host.

9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Method and system for optimizing block storage scheduling strategy

    CN115599294A

  • A method and system for optimizing block storage scheduling strategy

    CN115599294B