Business migration method, device, apparatus, computer storage medium and program

The target resource pool and host machine are automatically determined through filtering and packing algorithms, the migration path is optimized in combination with the optimal path algorithm, and migration templates are used to perform step-by-step migration scheduling. This solves the time-consuming and inefficient problems of traditional business migration methods and realizes an efficient and digital business migration process.

CN116136797BActive Publication Date: 2025-10-21CHINA MOBILE INFORMATION TECHNOLOGY CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310127082.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-02
Publication Date
2025-10-21
Estimated Expiration
2043-02-02

AI Technical Summary

Technical Problem

Traditional business migration methods rely on manual analysis, resulting in time-consuming and inefficient migration. Furthermore, they are unable to effectively determine the carrying capacity of the resource environment at the migration destination, making it difficult to digitally display and fully control the migration results.

Method used

The target resource pool and host machine are automatically determined through filtering and packing algorithms. The migration path is optimized by combining the optimal path algorithm. The migration template is used to schedule the migration in steps, thus realizing an automated business migration process.

Benefits of technology

It reduces business migration time and improves migration efficiency. It can automatically select targets based on resource pool and host requirements, reduces manual intervention, and realizes the digitization of the migration process and the visualization of the results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116136797B_ABST
    Figure CN116136797B_ABST
Patent Text Reader

Abstract

The application discloses a service migration method, device, equipment, computer storage medium and program, which can determine resource pool requirements and host requirements corresponding to a target server to be migrated, select a target resource pool meeting the resource pool requirements from a plurality of resource pools by using a filtering method, select a target host meeting the host requirements from a plurality of hosts of the target resource pool, and migrate the target server to the target host. According to the embodiment of the application, the target resource pool and the target host meeting the target server migration requirements can be automatically selected based on the resource pool requirements and the host requirements, the difficulty of this mode is lower, the efficiency is higher, and the time consumed by service migration can be effectively reduced compared with manual analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of cloud computing technology, and in particular relates to a service migration method, apparatus, device, computer storage medium, and program. Background Art

[0002] With the advancement of digitalization and cloud computing, more and more businesses are migrating to the cloud to improve scalability, high availability, and cost-effectiveness. Traditional migration tools mostly complete data transfer through backend scripts or simply bring the migration process online for easier visualization, but they don't address the fundamental business challenges.

[0003] The current common migration approach involves organizing resource managers, business personnel, and operations and maintenance personnel to discuss and review the plan based on the migration requirements beforehand. Based on their collective experience, they roughly determine the migration destination, often referred to as the migration destination. However, if the destination's resource environment changes and becomes inadequate to support the migration task, this approach can require significant time to adjust the plan. Furthermore, this approach relies heavily on manual analysis and processing, making the migration process time-consuming and inefficient. Summary of the Invention

[0004] The embodiments of the present application provide a business migration method, apparatus, device, computer storage medium and program, which can automatically determine the target resource pool and target host machine based on the resource pool requirements and host machine requirements corresponding to the server to be migrated. Compared with manual analysis, it takes less time and is more efficient.

[0005] In a first aspect, an embodiment of the present application provides a service migration method, including:

[0006] Determine the resource pool and host requirements for the target server to be migrated in the business;

[0007] Use the filtering method to select the target resource pool that meets the resource pool requirements from multiple resource pools;

[0008] Use the packing algorithm to select the target host that meets the host requirements from multiple hosts in the target resource pool;

[0009] Migrate the target server to the target host.

[0010] As a possible implementation method, a filtering method is used to select a target resource pool that meets the resource pool requirements from multiple resource pools, including:

[0011] The resource pool requirements include the technology stack type requirements and startup type requirements for the resource pool. The resource pool that meets the technology stack type requirements and startup type requirements is selected from multiple resource pools and used as the first resource pool.

[0012] In response to the number of the first resource pool being one, using the first resource pool as the target resource pool;

[0013] In response to the number of the first resource pools being multiple, an optimal path algorithm is used to determine a target resource pool from the multiple first resource pools.

[0014] As a possible implementation, determining a target resource pool from multiple first resource pools using an optimal path algorithm includes:

[0015] Determine the weight between the target server and other servers in the business;

[0016] For each first resource pool, determining a network delay between the first resource pool and other servers;

[0017] Determine the network delay corresponding to the first resource pool based on the weights between the target server and other servers, and the network delay between the first resource pool and other servers;

[0018] The first resource pool with the smallest corresponding network delay among the multiple first resource pools is used as the target resource pool.

[0019] As a possible implementation method, a bin packing algorithm is used to filter out target hosts that meet the host requirements from multiple hosts in the target resource pool, including:

[0020] In the absence of other servers that are migrated to the target resource pool synchronously with the target server, selecting a host whose remaining memory capacity meets the specification requirements of the target server from multiple host machines in the target resource pool, and establishing a first mapping relationship between the target server and the host machine that meets the specification requirements of the target server;

[0021] In response to the number of host machines having a first mapping relationship with the target server being one, using the host machine having the first mapping relationship with the target server as the target host machine;

[0022] In response to the number of host machines having a first mapping relationship with the target server being multiple, one host machine is selected from the multiple host machines having a first mapping relationship with the target server as the target host machine.

[0023] As a possible implementation method, a bin packing algorithm is used to filter out target hosts that meet the host requirements from multiple hosts in the target resource pool, including:

[0024] In the case that there are other servers that are migrated to the target resource pool synchronously with the target server, for each server to be migrated, a host whose remaining memory capacity meets the specification requirements of the server is selected from multiple host machines in the target resource pool, and a first mapping relationship is established between the server and the host machine that meets the specification requirements of the server;

[0025] Determine the total specification requirements corresponding to each candidate host respectively, wherein the candidate host is a host with a first mapping relationship, and the total specification requirement is the sum of the specification requirements of all servers with the first mapping relationship;

[0026] In response to the remaining capacities of all candidate host machines satisfying their corresponding total specification requirements, determining the number of host machines having a first mapping relationship with the target server;

[0027] In response to the number of host machines having a first mapping relationship with the target server being one, using the host machine having the first mapping relationship with the target server as the target host machine;

[0028] In response to the number of host machines having a first mapping relationship with the target server being multiple, one host machine is selected from the multiple host machines having a first mapping relationship with the target server as the target host machine.

[0029] As a possible implementation method, a bin packing algorithm is used to select a target host that meets the host requirements from multiple hosts in the target resource pool, which also includes:

[0030] In response to the remaining capacity of any candidate host machine not meeting the corresponding total specification requirement, determining a server among the other servers and the target server that has a first mapping relationship with only one host machine as the first server;

[0031] Establishing a second mapping relationship between the first server and the host machine having the first mapping relationship therewith, and canceling the first mapping relationship corresponding to the first server;

[0032] Updating the remaining capacity of the host machine having a second mapping relationship with the first server to the capacity obtained by subtracting the specification requirements of the first server;

[0033] After completing the update of the remaining capacity of the host machine, determining the maximum server corresponding to each candidate host machine, wherein the maximum server corresponding to the candidate host machine is the server with the largest specification requirement that has a first mapping relationship with the candidate host machine;

[0034] Determine, among all candidate host machines that have a first mapping relationship with the largest server, a host machine whose remaining capacity meets the specification requirements of the largest server as the first host machine;

[0035] Selecting a host from the first host as the second host, establishing a second mapping relationship between the largest server and the second host, canceling the first mapping relationship corresponding to the largest server, and updating the remaining capacity of the second host to the capacity after subtracting the specification requirements of the largest server;

[0036] After the second mapping relationship between the target server and the host machine is established, the host machine having the second mapping relationship with the target server is used as the target host machine.

[0037] As a possible implementation method, migrate the target server to the target host, including:

[0038] Determine the corresponding migration scenario based on the target server type, where the type is physical or virtual.

[0039] Determining a target migration template corresponding to the migration scenario from preset migration templates, wherein the migration template includes migration steps, a migration execution script or a command;

[0040] Use the target migration template to migrate the target server to the target host.

[0041] In a second aspect, an embodiment of the present application further provides a service migration device, including:

[0042] The migration requirement determination module is used to determine the resource pool requirements and host requirements corresponding to the target server to be migrated in the business;

[0043] The target resource pool determination module is used to select a target resource pool that meets the resource pool requirements from multiple resource pools using a filtering method;

[0044] A target host determination module is used to select a target host that meets the host requirements from multiple hosts in the target resource pool using a bin packing algorithm;

[0045] The migration module is used to migrate the target server to the target host.

[0046] In a third aspect, an embodiment of the present application further provides an electronic device, the device comprising: a processor and a memory storing computer program instructions;

[0047] When the processor executes the computer program instructions, the service migration method of the first aspect is implemented.

[0048] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the service migration method of the first aspect is implemented.

[0049] In a fifth aspect, an embodiment of the present application further provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the service migration method of the first aspect.

[0050] The embodiments of the present application provide a method, apparatus, device, computer storage medium, and program for business migration, which can determine the resource pool requirements and host machine requirements corresponding to the target server to be migrated, select a target resource pool that meets the resource pool requirements from multiple resource pools using a filtering method, select a target host machine that meets the host machine requirements from multiple host machines in the target resource pool, and migrate the target server to the target host machine. According to the embodiments of the present application, a target resource pool and a target host machine that meet the migration requirements of the target server can be automatically selected based on the resource pool requirements and the host machine requirements. Compared with manual analysis, this method is less difficult and more efficient, and can effectively reduce the time consumed by business migration. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0052] Figure 1 This is a flowchart of a service migration method provided in an embodiment of the present application;

[0053] Figure 2 This is a schematic diagram of optimal path addressing provided by an embodiment of the present application;

[0054] Figure 3 This is a schematic diagram of an implementation of S13 provided by an embodiment of the present application;

[0055] Figure 4 This is a schematic diagram of an implementation of S13 provided in another embodiment of the present application;

[0056] Figure 5 This is a schematic diagram of an implementation method of S13 provided in another embodiment of the present application;

[0057] Figure 6 This is a schematic diagram of a server reorganization analysis provided by an embodiment of the present application;

[0058] Figure 7 This is a schematic diagram of an execution of migration in a P2V migration scenario provided by an embodiment of the present application;

[0059] Figure 8 This is a flow chart of a migration tool provided by an embodiment of the present application;

[0060] Figure 9 This is a schematic diagram of the structure of a service migration device provided in an embodiment of the present application;

[0061] Figure 10 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0062] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is merely to provide a better understanding of the present application by illustrating the examples of the present application.

[0063] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, the elements defined by the phrase "comprising..." do not exclude the presence of other identical elements in the process, method, article, or device comprising the elements.

[0064] With the development of digitalization and cloud computing, more and more businesses are migrating to the cloud to improve scalability, high availability, and cost-effectiveness. However, in actual business migrations, it's often difficult to determine how to proceed, where to migrate, and how to proceed, let alone perceive the specific results of the migration.

[0065] Most traditional migration tools used for business migration complete data transmission through background scripts, or simply make the migration process online to facilitate the visual display of the migration, but do not solve the fundamental problems of the business.

[0066] The existing business migration solution is only available online, and manual intervention is still a significant part of the process. This leads to the following major issues:

[0067] Difficulty determining the migration objective: Before a migration, resource managers, business personnel, and operations personnel can only discuss and review the plan based on the migration requirements. Based on the experience of various parties, a rough estimate of the migration destination can be made. If the resource environment at the destination changes during the migration and is no longer sufficient to support the migration, a significant amount of time will be required to adjust the plan.

[0068] The migration process requires a lot of manual intervention: Due to the lack of fixed scenarios, the migration process has many uncontrollable factors. Usually, to ensure the smooth implementation of the migration, a lot of manual analysis and processing is required after encountering problems. The migration process is long and inefficient.

[0069] Migration effects are difficult to demonstrate: Traditional migration cannot achieve full digitalization of the migration process and cannot build a panoramic display, which is not conducive to demonstrating migration effects and settling and handling migration problems.

[0070] In view of this, the embodiments of the present application provide a novel service migration method. Based on routing analysis, it uses a comprehensive filtering method and optimal path method, combined with weight analysis, to explore the optimal migration path based on factors such as resource specifications, resource pool associations, service attributes, and the impact of service topology on network latency. Based on different migration scenarios, different migration scheduling templates are selected. The computing power migration scheduling is completed step by step in the form of a workflow, solving the problem of not knowing where to migrate or how to migrate during the migration process.

[0071] See also Figure 1 , is a flow chart of a service migration method provided in an embodiment of the present application, such as Figure 1 As shown, the service migration method provided in this embodiment may include the following steps:

[0072] S11. Determine the resource pool requirements and host requirements for the target server to be migrated in the business;

[0073] S12. Filtering a target resource pool that meets the resource pool requirements from multiple resource pools using a filtering method;

[0074] S13. Filter out a target host that meets the host requirements from multiple hosts in the target resource pool using a packing algorithm;

[0075] S14. Migrate the target server to the target host.

[0076] A business typically includes one or more servers, and a target server refers to any server in the business that needs to be migrated.

[0077] The present application provides a service migration method that determines the resource pool requirements and host requirements corresponding to the target server to be migrated, selects a target resource pool that meets the resource pool requirements from multiple resource pools using a filtering method, selects a target host that meets the host requirements from multiple host machines in the target resource pool, and migrates the target server to the target host machine. According to the present application, based on the resource pool requirements and host machine requirements, the target resource pool and target host machine that meet the target server migration requirements can be automatically selected. Compared with manual analysis, this method is less difficult and more efficient, and can effectively reduce the time spent on service migration.

[0078] In some embodiments, in S11, the requirements for resource pool startup type, resource pool technology stack type, host specifications, host type and / or network delay, etc. can be analyzed based on the specification attributes and business attributes of the target server, and the analyzed requirements for resource pool startup type and / or technology stack type are used as resource pool requirements, the analyzed requirements for host specifications and / or host type are used as host requirements, and the analyzed requirements for network delay are used as network delay requirements.

[0079] The specification attributes and business attributes of the target server can be directly obtained from the attribute information of the target server. After obtaining the specification attributes and business attributes of the target server, the specification attributes and business attributes can be parameterized to identify the target server's requirements for resource pool startup type, resource pool technology stack type, host specifications, host type and / or network latency, etc.

[0080] After the migration requirements corresponding to the target server are determined, a target resource pool to which the target server is to be migrated may be selected from multiple resource pools in S12.

[0081] In some embodiments, specific implementations of S12 may include:

[0082] The resource pool requirements include the technology stack type requirements and startup type requirements for the resource pool. The resource pool that meets the technology stack type requirements and startup type requirements is selected from multiple resource pools and used as the first resource pool.

[0083] In response to the number of the first resource pool being one, using the first resource pool as the target resource pool;

[0084] In response to the number of the first resource pools being multiple, an optimal path algorithm is used to determine a target resource pool from the multiple first resource pools.

[0085] The target server has mandatory restrictions on the technology stack type and startup type of the resource pool. If the technology stack or startup type does not meet the uniqueness requirements, it will not be sufficient to support migration. Therefore, it is necessary to use uniqueness filtering to select the resource pool that meets these two factors, that is, the first resource pool.

[0086] One or more first resource pools may be screened out through screening. If only one first resource pool is screened out, the first resource pool can be directly used as the target resource pool. If multiple first resource pools are screened out, the optimal path method can be used to calculate the optimal target resource pool based on parameters such as the weight of network latency and the distribution of resource pools.

[0087] In some embodiments, a specific implementation method of determining a target resource pool from a plurality of first resource pools using an optimal path algorithm may include the following steps:

[0088] Determine the weight between the target server and other servers in the business;

[0089] For each first resource pool, determining a network delay between the first resource pool and other servers;

[0090] Determine the network delay corresponding to the first resource pool based on the weights between the target server and other servers, and the network delay between the first resource pool and other servers;

[0091] The first resource pool with the smallest corresponding network delay among the multiple first resource pools is used as the target resource pool.

[0092] A business typically includes multiple servers. Other servers in a business refer to servers other than the target server. To meet non-mandatory requirements such as network latency, you can configure weights between the target server and other servers based on actual needs. Using the optimal path method based on the weights and the pod (resource pool) network latency matrix, the results are sorted in reverse order of network latency, outputting several possible outputs.

[0093] See also Figure 2, is a schematic diagram of optimal path addressing. Taking a group of services with three servers VM1, VM2 and VM3 as an example, the weight between VM1 and VM2 is t1, the weight between VM1 and VM3 is t2, and the weight between VM2 and VM3 is t3. When VM3 needs to be migrated, that is, VM3 is used as the target server, through filtering analysis, it is determined that the three resource pools POD1, POD2 and POD3 can carry the migration of VM3, that is, POD1, POD2 and POD3 are all first resource pools. In order to select the optimal target resource pool from the three first resource pools, it is necessary to determine the network delay from each first resource pool to VM1 and VM2 respectively. The network delay from the first resource pool to VM1 and VM2 is equivalent to the network delay from VM3 to VM1 and VM2 after VM3 is migrated to the first resource pool. For each first resource pool, after obtaining the network delay from the first resource pool to VM1 and VM2, multiply each network delay by the corresponding weight, that is, multiply the network delay from the first resource pool to VM1 by t2 to obtain the first product, and multiply the network delay from the first resource pool to VM2 by t3 to obtain the second product. The sum of the first product and the second product is used as the network delay corresponding to the first resource pool. After obtaining the network delays of the three first resource pools, sort the three first resource pools in reverse order from low to high according to the network delay, and use the first resource pool with the lowest corresponding network delay as the target resource pool. For example, if it is finally determined through analysis that the network delay corresponding to POD2 is the lowest, then POD2 is used as the target resource pool, and migrating the target server to POD2 is the optimal migration path.

[0094] Through the above method, we can explore the optimal migration path based on factors such as the specifications of the target server, the association of the resource pool, the attributes of the business, and the impact of the business topology on network latency, and combine the filtering method and the optimal path method with weight analysis. By migrating the target server according to the optimal path, we can ensure that the network latency between the migrated target server and other servers meets the network latency requirements, avoiding the problem of excessive network latency.

[0095] A resource pool may contain multiple host machines, and the target server is usually migrated to one host machine during migration. Therefore, after the target resource pool is determined, the target host machine to which the target server is ultimately migrated may be further determined in S13.

[0096] The packing algorithm is an algorithm used to solve the packing problem. The packing problem is a complex discrete combinatorial optimization problem. The packing algorithm is mainly used to determine the optimal packing solution.

[0097] When a target server is being migrated, there are generally two situations: one is when no other servers are being migrated to the target resource pool simultaneously with the target server; the other is when other servers are being migrated to the target resource pool simultaneously with the target server. For these two situations, S13 can use different methods to determine the target host corresponding to the target server.

[0098] In some embodiments, when there are no other servers that migrate to the target resource pool simultaneously with the target server, such as Figure 3 As shown, the specific implementation of S13 may include the following steps:

[0099] S31. Filtering out a host whose remaining memory capacity meets the specifications of the target server from multiple hosts in the target resource pool, and establishing a first mapping relationship between the target server and the host that meets the specifications of the target server;

[0100] S32. In response to the number of hosts having a first mapping relationship with the target server being one, the host having a first mapping relationship with the target server is used as the target host;

[0101] S33. In response to the number of host machines having a first mapping relationship with the target server being multiple, select a host machine from the multiple host machines having a first mapping relationship with the target server as the target host machine.

[0102] Select a host from multiple hosts whose remaining memory capacity meets the target server's specifications. This ensures that the remaining capacity of the target host is sufficient for the target server and avoids migration failures due to insufficient remaining capacity of the target host.

[0103] As an example, a specific implementation of S33 may include:

[0104] Determine the allocation rate corresponding to each host machine that has a first mapping relationship with the target server respectively, where the allocation rate refers to the ratio of the capacity already allocated to the host machine to the total capacity of the host machine, and select the host machine with the smallest corresponding allocation rate from multiple host machines that have a first mapping relationship with the target server as the target host machine.

[0105] The host machine's allocation rate is also the host machine's memory usage rate. Usually, the host machine's memory usage rate affects the host machine's running speed. The higher the memory usage rate, the slower the running speed, and the lower the memory usage rate, the faster the running speed. Based on this, selecting the host machine with the lowest allocation rate as the target host machine can ensure the running speed of the target server after migration.

[0106] Because when multiple servers are migrated to the same resource pool simultaneously, some host machines may be marked by multiple servers to be migrated due to reasons such as remaining capacity reorganization, that is, there is a first mapping relationship with multiple servers. Therefore, in order to balance the selection of hosts and avoid the potential overload risk of a single host machine carrying too many resources, when multiple servers are migrated to the target resource pool simultaneously, capacity adjustment can be achieved through reorganization analysis.

[0107] In some embodiments, when there are other servers that are migrated to the target resource pool simultaneously with the target server, such as Figure 4 As shown, the specific implementation of S13 may include the following steps:

[0108] S41. For each server to be migrated, a host whose remaining memory capacity meets the server's specification requirements is selected from multiple hosts in the target resource pool, and a first mapping relationship is established between the server and the host that meets the server's specification requirements;

[0109] S42. Determine the total specification requirements corresponding to each candidate host, wherein the candidate host is a host having a first mapping relationship, and the total specification requirement is the sum of the specification requirements of all servers having a first mapping relationship with the candidate host;

[0110] S43. In response to the remaining capacity of all candidate hosts meeting their corresponding total specification requirements, determining the number of hosts having a first mapping relationship with the target server;

[0111] S44. In response to the number of hosts having a first mapping relationship with the target server being one, the host having a first mapping relationship with the target server is used as the target host;

[0112] S45. In response to the number of host machines having a first mapping relationship with the target server being multiple, select a host machine from the multiple host machines having a first mapping relationship with the target server as the target host machine.

[0113] Among them, the implementation method of S45 can be the same as S33, which will not be repeated here.

[0114] If the remaining capacity of all alternative host machines meets their corresponding total specification requirements, it can be said that the simultaneous migration of multiple servers will not cause host machine overload. Therefore, in order to simplify the process and improve the efficiency of business migration, capacity adjustment is not required at this time, and the target host machine can be directly determined based on the host machine that has a first mapping relationship with the target server.

[0115] In some embodiments, when there are other servers that are migrated to the target resource pool simultaneously with the target server, such as Figure 5As shown, after S42, the following steps may also be included:

[0116] S51. In response to the presence of any candidate host whose remaining capacity does not meet the corresponding total specification requirements, determining the server that has only a first mapping relationship with one host among the other servers and the target server as the first server;

[0117] S52. Establishing a second mapping relationship between the first server and the host machine with which the first mapping relationship exists, and releasing the first mapping relationship corresponding to the first server;

[0118] S53. The remaining capacity of the host machine having a second mapping relationship with the first server is updated to the capacity after subtracting the specification requirements of the first server;

[0119] S54. After completing the update of the remaining capacity of the host, the maximum server corresponding to each candidate host is determined, wherein the maximum server corresponding to the candidate host is the server with the largest specification requirement that has a first mapping relationship with the candidate host;

[0120] S55 determines that among all hosts having a first mapping relationship with the largest server, the host whose remaining capacity meets the specifications of the largest server is used as the first host;

[0121] S56. Select a host from the first host as the second host, establish a second mapping relationship between the largest server and the second host, release the first mapping relationship corresponding to the largest server, and update the remaining capacity of the second host to the capacity after subtracting the specification requirements of the largest server;

[0122] S57. After the second mapping relationship between the target server and the host machine is established, the host machine having the second mapping relationship with the target server is used as the target host machine.

[0123] If the remaining capacity of any candidate host machine does not meet its corresponding total specification requirements, it means that when multiple servers are migrated simultaneously, a single host machine may be overloaded due to excessive carrying resources, which means there is an overload risk. Therefore, to avoid overload, capacity adjustment is required through reorganization analysis.

[0124] When performing the reorganization analysis, the first server among the other servers and the target server that has a first mapping relationship with only one host is first determined through S51. This is because a server has a first mapping relationship with only one host, which indicates that only one host can meet the specification requirements of the server, that is, the server can only be migrated to this host, otherwise the migration will fail. Because, in order to avoid server migration failure, the first server will be found first, and a second remapping between the first server and the host with which it has a first mapping relationship is established through S52, that is, a second mapping relationship. The host with the second mapping relationship with the first server is the host to which the first server is to be migrated. In this way, the host to which the first server is to be migrated is first determined, so there is no need to select a host for the first server in subsequent steps. The first mapping relationship corresponding to the first server is released in S52 to avoid repeated allocation of a host to the first server in subsequent steps.

[0125] After the host machine to which the first server is to be migrated is determined, the remaining capacity of the host machine may be updated in S53 , so as to determine whether the host machine can still accommodate other servers based on the updated remaining capacity.

[0126] When performing the reorganization analysis, the reason why the largest server corresponding to the alternative host is determined in S54 is that the largest server has the largest specifications, that is, it requires more capacity. Prioritizing the allocation of hosts to such servers can ensure that a host that meets its specification requirements can be determined in the end, so that the server can complete the migration. If the host is allocated to such servers later, it may result in the host not meeting its specification requirements due to the previous allocation, resulting in the failure of server migration.

[0127] Because the host allocation has been completed for the first server that has a first mapping relationship with only one host in S52, the maximum server determined in S54 has a first mapping relationship with at least two host machines in the target resource pool. Therefore, for each maximum server determined in S54, it is necessary to filter out the host machine finally used for migration from all the host machines that have a first mapping relationship with it through S55 and S56.

[0128] In S55, a host whose remaining capacity meets the specification requirements of the maximum server is first determined from all host machines that have a first mapping relationship with the maximum server as the first host machine. Then, through S56, a host machine is selected from the first host machine as the second host machine, and a second mapping relationship is established between the maximum server and the second host machine. The second host machine is the host machine to which the maximum server will be migrated.

[0129] As an example, a specific implementation of S56 may include:

[0130] An allocation ratio corresponding to each first host is determined, where the allocation ratio refers to the ratio of the capacity already allocated to the host to the total capacity of the host. The first host with the smallest allocation ratio is selected as the second host.

[0131] By selecting the second host in this way, the running speed of the server after migration can be guaranteed.

[0132] After determining the second host machine corresponding to the largest server, the first mapping relationship corresponding to the largest server is released in order to avoid repeated allocation of a host machine to the largest server.

[0133] Updating the remaining capacity of the second host machine to the capacity obtained by subtracting the specification requirement of the largest server is to facilitate determining whether the host machine can accommodate other servers based on the updated remaining capacity.

[0134] Because it may not be possible to determine the host machines to which all servers to be migrated will be migrated at once through S51-S56, after executing S56, the process may return to S51 and repeat the process until the second mapping relationship between all servers to be migrated and the host machines is established.

[0135] According to the above content, the host machine having the second mapping relationship with the server is the host machine to which the server will migrate. Based on this, in S57, the host machine having the second mapping relationship with the target server is used as the target host machine.

[0136] In the above manner, the host machines corresponding to multiple servers to be migrated are reorganized and analyzed by the improved packing algorithm to achieve capacity adjustment, which can effectively avoid the overload risk caused by excessive resources carried by a single host machine.

[0137] See also Figure 6 , is a schematic diagram of a server reorganization analysis provided by an embodiment of the present application, which takes the migration of 11 servers VM1-VM11 to 5 hosts host1-host5 as an example, wherein the remaining capacity of each host and the specifications of each server are different. In the figure, the shaded part of the host hostx represents the used capacity, and the size of the server VMx represents the server specification size. During the migration analysis, for each server, the server is marked on a host that meets its specification size, and based on this, the first mapping relationship between the host and the server is established. Figure 6As shown in the figure, VM1, VM2, VM3, and VM5 are marked on host1, indicating that host1's remaining capacity meets the respective specifications of VM1, VM2, VM3, and VM5. VM4 and VM2 are marked on host2, indicating that host2's remaining capacity meets the respective specifications of VM4 and VM2. VM2, VM5, VM6, VM9, VM10, and VM11 are marked on host3, indicating that host3's remaining capacity meets the respective specifications of VM2, VM5, VM6, VM9, VM10, and VM11. VM2 and VM5 are marked on host4, indicating that host4's remaining capacity meets the respective specifications of VM2 and VM5. VM5, VM6, VM7, and VM8 are marked on host5, indicating that host5's remaining capacity meets the respective specifications of VM5, VM6, VM7, and VM8. After migration marking is completed, the total specifications of some marked virtual machines may exceed the current host's remaining capacity. In this case, capacity adjustment is required to reorganize the servers and balance the host load as much as possible. When reorganizing, first determine the server that is marked on only one host, that is, the first server, such as Figure 6 As shown, VM1 and VM3 are only marked on host1, VM4 is only marked on host2, VM7 and VM8 are only marked on host5, and VM9, VM10 and VM11 are only marked on host3. Therefore, VM1, VM3, VM4, VM7, VM8, VM9, VM10 and VM11 are all first servers. A second mapping relationship is established between the first server and the host machine marked by it, and the remaining capacity of the host machine is reduced according to the first server marked on it. Then, the remaining servers are allocated to the hosts according to steps S54-S56, and a second mapping relationship is established between each server and the corresponding host machine. After determining the second mapping relationship corresponding to all servers, the reorganization analysis is completed, and the host machine with the second mapping relationship with the server is used as the host machine to which the server will migrate. According to the migration mark after the reorganization analysis, it can be seen that the remaining capacity of each host machine after reduction is greater than 0, that is, there is no overload risk.

[0138] After the target host machine corresponding to the target server is determined, the target server can be migrated to the target host machine through S14.

[0139] In some embodiments, specific implementations of S14 may include:

[0140] Determine the corresponding migration scenario based on the target server type, where the type is physical or virtual.

[0141] Determining a target migration template corresponding to the migration scenario from preset migration templates, wherein the migration template includes migration steps, a migration execution script or a command;

[0142] Use the target migration template to migrate the target server to the target host.

[0143] Currently, based on the type of server to be migrated, migration scenarios can be divided into two types: P2V (Physical to virtual) and V2V (Virtual to virtual) scenarios that support migration to OpenStack. OpenStack is an open source cloud computing management platform project and a combination of a series of software open source projects. OpenStack provides scalable and elastic cloud computing services for private clouds and public clouds. The project goal is to provide a cloud computing management platform that is simple to implement, scalable, rich, and standardized. It can be seen that if the type of server to be migrated is a physical machine, the corresponding migration scenario is P2V. If the type of server to be migrated is a virtual machine, the corresponding migration scenario is V2V. The type of server to be migrated can be determined based on the attribute information of the server to be migrated. Therefore, the corresponding migration scenario can be automatically determined based on the server to be migrated.

[0144] Pre-create migration templates for your migration scenarios. These templates integrate and orchestrate migration steps, execution scripts, or commands, and then encapsulate them within a single template. Migration steps can be customized based on different scenarios, and each step can contain a corresponding execution command, call API, or script.

[0145] Taking the migration template corresponding to the P2V migration scenario as an example, the migration template can include the following nine migration steps:

[0146] Step 1: Verify network connectivity. Use the ping command to verify network connectivity between the target server to be migrated and the transit VM.

[0147] Step 2: Enter the username and password to verify remote login to the target server, and verify whether the target server can be remotely logged in through SSH.

[0148] Step 3: Collect and edit the boot mode. Query the target server's / sys / firmware / efi to confirm whether the boot mode is UEFI or Legacy, so that you can accurately match the resource pool type later.

[0149] Step 4: Create a bootable volume, create a target virtual machine boot volume, call the interface to create the target virtual machine boot volume, where the target virtual machine is the target server migrated to the target host corresponding virtual machine.

[0150] Step 5: Create a transit machine and mount a volume. For P2V migration, create a transit virtual machine. Call the virtual machine creation interface of the target resource pool to create a transit virtual machine. At the same time, call the interface to mount a volume to the transit virtual machine.

[0151] Step 6: Get the bare metal storage volume, copy the bare metal server disk to the boot volume, and run the command to copy the target server's disk to the boot volume.

[0152] Step 7: Unmount the volume from the transit machine and call the script to unmount the volume mounted on the transit machine.

[0153] Step 8: Create a virtual machine through the volume. Use the copied P2V boot volume to create a virtual machine. Call the interface and create the target virtual machine through the boot volume in the target resource pool.

[0154] Step 9: Verify the startup status of the target virtual machine. Use the interface and login command to check the power status of the target virtual machine and whether it can be started normally.

[0155] Among them, steps 1 to 3 are mainly used for pre-migration checks to determine whether the migration conditions are met. Only when the migration conditions are determined to be met can the migration be carried out to ensure that the migration can proceed smoothly.

[0156] Steps 4 to 8 are the specific migration process. The entire migration process can be mainly divided into image creation, image transfer, and using the image to start the virtual machine. Steps 4 and 5 are used to create the image, steps 6 and 7 are used to transfer the image, and step 8 is used to start the virtual machine using the image.

[0157] Step 9 is mainly used to verify whether the virtual machine is started and check the migration completion status.

[0158] Through the above method, different migration templates are selected according to different migration scenarios. The migration steps and processing logic such as environment check, network check, and resource verification are solidified in a workflow through the migration template. During the migration, the server migration is completed step by step in the form of a workflow according to the migration template, solving the problem of not knowing how to migrate during the migration process.

[0159] See also Figure 7 , is a schematic diagram of an execution of migration in a P2V migration scenario provided by an embodiment of the present application, such as Figure 7As shown, when it is necessary to migrate business to the cloud, a cloud migration request is initiated to the cloud management platform. After receiving the cloud migration request, the cloud management platform can migrate the business according to the business migration method provided in the embodiment of the present application. When performing business migration, the cloud management platform takes the target server to be migrated as a virtual machine as an example, and first sends a create backup request to the resource pool POD1 where the target server is currently located, so as to perform an environmental check and backup based on the create backup request. This mainly includes analyzing the requirements for the resource pool startup type, host specifications, host type and network latency according to the specification attributes and business attributes of the target server, and determining the target resource pool through filtering and optimal path algorithm according to the analyzed requirements, and screening the target host from the target resource pool through the improved packing method. After determining the target host, convert the image file in the public management domain resource pool, upload the image to the target resource pool POD2, and use the image to pull up the target virtual machine in the target host, that is, start the target virtual machine in the target host, thereby completing the migration of the target server.

[0160] See also Figure 8 , is a flow chart of a migration tool provided in an embodiment of the present application, which can be used to implement the service migration method provided in an embodiment of the present application. Figure 8 As shown, the migration tool may include a migration center routing analysis module 801 and a migration center migration scheduling template 802 .

[0161] Among them, the migration center routing analysis module 801 mainly includes a parameter decomposition unit, a filtering analysis unit, and an optimal path analysis unit. The parameter decomposition unit is mainly used to identify the configuration attributes, specification characteristics, and network latency requirements of the target server to be migrated. The filtering analysis unit and the optimal path analysis unit are mainly used to analyze the computing power migration matching conditions based on the computing power capacity scale and allocation rate of the current managed pod, and analyze the optimal path strategy based on the network latency matrix between pods, make adaptability selection for the target server, and finally output the recommended optimal migration path, that is, determine the target resource pool and target host.

[0162] The migration center's migration scheduling template 802 primarily consists of a migration template and a migration task scheduling unit. The migration template consolidates the migration steps and processing logic, including environment checks, network checks, and resource verification, into a single workflow. The migration task scheduling unit associates the migration template with the target server to be migrated. Based on the target resource pool and target host information confirmed by the migration center's routing analysis module 801, the migration task is executed according to the migration steps in the migration template corresponding to the target server's migration scenario. This supports both manual and scheduled migrations, as well as the display of migration progress and visualization of the migration process.

[0163] For batch server migration, multi-threaded execution is started in one task, and the threads are relatively independent, improving the efficiency and security of migration execution.

[0164] Based on the service migration method provided in the above embodiment, the present application also provides a specific implementation of a service migration device. Please refer to the following embodiment.

[0165] See also Figure 9 The service migration device provided in the embodiment of the present application includes the following modules:

[0166] Migration requirement determination module 901, used to determine the resource pool requirements and host requirements corresponding to the target server to be migrated in the business;

[0167] The target resource pool determination module 902 is configured to select a target resource pool that meets the resource pool requirements from multiple resource pools using a filtering method;

[0168] A target host machine determination module 903 is configured to select a target host machine that meets the host machine requirements from multiple host machines in the target resource pool using a bin packing algorithm;

[0169] The migration module 904 is configured to migrate the target server to the target host.

[0170] A service migration device according to an embodiment of the present application is capable of determining the resource pool requirements and host machine requirements corresponding to a target server to be migrated, selecting a target resource pool that meets the resource pool requirements from multiple resource pools using a filtering method, selecting a target host machine that meets the host machine requirements from multiple host machines in the target resource pool, and migrating the target server to the target host machine. According to an embodiment of the present application, a target resource pool and a target host machine that meet the target server migration requirements can be automatically selected based on the resource pool requirements and the host machine requirements. Compared to manual analysis, this method is less difficult and more efficient, and can effectively reduce the time consumed by service migration.

[0171] In some embodiments, the target resource pool determination module 902 includes:

[0172] a filtering and analyzing unit configured to filter out a resource pool that meets the technology stack type requirements and startup type requirements from multiple resource pools as a first resource pool based on resource pool requirements including technology stack type requirements and startup type requirements;

[0173] a first determining unit, configured to, in response to the number of the first resource pool being one, use the first resource pool as a target resource pool;

[0174] The optimal path analysis unit is configured to determine a target resource pool from the plurality of first resource pools by using an optimal path algorithm in response to the number of the first resource pools being multiple.

[0175] In some embodiments, the optimal path analysis unit is specifically configured to:

[0176] Determine the weight between the target server and other servers in the business;

[0177] For each first resource pool, determining a network delay between the first resource pool and other servers;

[0178] Determine the network delay corresponding to the first resource pool based on the weights between the target server and other servers, and the network delay between the first resource pool and other servers;

[0179] The first resource pool with the smallest corresponding network delay among the multiple first resource pools is used as the target resource pool.

[0180] In some embodiments, the target host determination module 903 is specifically configured to:

[0181] In the absence of other servers that are migrated to the target resource pool synchronously with the target server, selecting a host whose remaining memory capacity meets the specification requirements of the target server from multiple host machines in the target resource pool, and establishing a first mapping relationship between the target server and the host machine that meets the specification requirements of the target server;

[0182] In response to the number of host machines having a first mapping relationship with the target server being one, using the host machine having the first mapping relationship with the target server as the target host machine;

[0183] In response to the number of host machines having a first mapping relationship with the target server being multiple, one host machine is selected from the multiple host machines having a first mapping relationship with the target server as the target host machine.

[0184] In some embodiments, the target host determination module 903 is specifically configured to:

[0185] In the case that there are other servers that are migrated to the target resource pool synchronously with the target server, for each server to be migrated, a host whose remaining memory capacity meets the specification requirements of the server is selected from multiple host machines in the target resource pool, and a first mapping relationship is established between the server and the host machine that meets the specification requirements of the server;

[0186] Determine the total specification requirements corresponding to each candidate host respectively, wherein the candidate host is a host with a first mapping relationship, and the total specification requirement is the sum of the specification requirements of all servers with the first mapping relationship;

[0187] In response to the remaining capacities of all candidate host machines satisfying their corresponding total specification requirements, determining the number of host machines having a first mapping relationship with the target server;

[0188] In response to the number of host machines having a first mapping relationship with the target server being one, using the host machine having the first mapping relationship with the target server as the target host machine;

[0189] In response to the number of host machines having a first mapping relationship with the target server being multiple, one host machine is selected from the multiple host machines having a first mapping relationship with the target server as the target host machine.

[0190] In some embodiments, the target host determination module 903 is further configured to:

[0191] In response to the remaining capacity of any candidate host machine not meeting the corresponding total specification requirement, determining a server among the other servers and the target server that has a first mapping relationship with only one host machine as the first server;

[0192] Establishing a second mapping relationship between the first server and the host machine having the first mapping relationship therewith, and canceling the first mapping relationship corresponding to the first server;

[0193] Updating the remaining capacity of the host machine having a second mapping relationship with the first server to the capacity obtained by subtracting the specification requirements of the first server;

[0194] After completing the update of the remaining capacity of the host machine, determining the maximum server corresponding to each candidate host machine, wherein the maximum server corresponding to the candidate host machine is the server with the largest specification requirement that has a first mapping relationship with the candidate host machine;

[0195] Determine, as a first host machine, a host machine having a remaining capacity that meets the specification requirements of the largest server among all candidate host machines that have a first mapping relationship with the largest server;

[0196] Selecting a host from the first host as the second host, establishing a second mapping relationship between the largest server and the second host, canceling the first mapping relationship corresponding to the largest server, and updating the remaining capacity of the second host to the capacity after subtracting the specification requirements of the largest server;

[0197] After the second mapping relationship between the target server and the host machine is established, the host machine having the second mapping relationship with the target server is used as the target host machine.

[0198] In some embodiments, the migration module 904 is specifically configured to:

[0199] Determine the corresponding migration scenario based on the target server type, where the type is physical or virtual.

[0200] Determining a target migration template corresponding to the migration scenario from preset migration templates, wherein the migration template includes migration steps, a migration execution script or a command;

[0201] Use the target migration template to migrate the target server to the target host.

[0202] The service migration device provided in the embodiment of the present application can implement each process implemented in the above-mentioned service migration method embodiment. To avoid repetition, they will not be described here.

[0203] Figure 10 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.

[0204] The electronic device may include a processor 1001 and a memory 1002 storing computer program instructions.

[0205] Specifically, the processor 1001 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0206] The memory 1002 may include a large-capacity memory for data or instructions. By way of example and not limitation, the memory 1002 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 1002 may include removable or non-removable (or fixed) media. Where appropriate, the memory 1002 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 1002 is a non-volatile solid-state memory. The memory 1002 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical, or other physical / tangible memory storage device. Thus, typically, memory 1002 includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it can perform the operations described in any of the business migration methods in the above-mentioned embodiments.

[0207] The processor 1001 implements any one of the service migration methods in the above embodiments by reading and executing computer program instructions stored in the memory 1002 .

[0208] In one example, the electronic device may further include a communication interface 1003 and a bus 1010. Figure 10 As shown, the processor 1001, the memory 1002, and the communication interface 1003 are connected via a bus 1010 and communicate with each other.

[0209] The communication interface 1003 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0210] Bus 1010 includes hardware, software or both, and the parts of online data flow metering equipment are coupled to each other. For example, but not limitation, bus can include accelerated graphics port (AGP) or other graphics bus, enhanced industry standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industry standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 1010 can include one or more buses. Although the present application embodiment describes and shows specific bus, the application considers any suitable bus or interconnection.

[0211] In addition, in conjunction with the service migration method in the above embodiments, embodiments of the present application may provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any of the service migration methods in the above embodiments is implemented.

[0212] It should be understood that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated. Those skilled in the art can make various changes, modifications, and additions, or change the order of the steps after understanding the spirit of the present application.

[0213] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0214] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps. In other words, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0215] Aspects of the present disclosure have been described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit. It is also understood that each box in the block diagram and / or flowchart and the combination of the boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0216] The above description is only a specific embodiment of the present application. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the scope of protection of the present application.

Claims

1. A service migration method, characterized in that: include: Determine the resource pool and host requirements for the target server to be migrated in the business; Filtering a target resource pool that meets the resource pool requirements from multiple resource pools using a filtering method; A target host that meets the host requirements is screened out from multiple hosts in the target resource pool by using a packing algorithm, wherein, in the case where the remaining capacity of any alternative host does not meet its corresponding total specification requirement, the target host is a host that has a second mapping relationship with the target server, the alternative host is a host that has a first mapping relationship, the first mapping relationship is established based on a server and a host that meets the server's specification requirements, the total specification requirement is the sum of the specification requirements of all servers that have a first mapping relationship with the alternative host, the second mapping relationship is established based on the largest server and the second host, the second host is selected from the first host, the first host is a host that has a remaining capacity that meets the specification requirements of the largest server among all hosts that have a first mapping relationship with the largest server, and the largest server is the server with the largest specification requirement in the first mapping relationship with the alternative host; Migrate the target server to the target host.

2. The method according to claim 1, characterized in that The method of selecting a target resource pool that meets the resource pool requirements from multiple resource pools by using a filtering method includes: The resource pool requirements include technology stack type requirements and startup type requirements for the resource pool, and a resource pool that meets the technology stack type requirements and the startup type requirements is screened out from multiple resource pools as the first resource pool; In response to the number of the first resource pool being one, taking the first resource pool as a target resource pool; In response to the number of the first resource pools being multiple, an optimal path algorithm is used to determine a target resource pool from the multiple first resource pools.

3. The method according to claim 2, characterized in that The determining of a target resource pool from the plurality of first resource pools by using an optimal path algorithm includes: Determining the weight between the target server and other servers in the business; For each of the first resource pools, determining a network delay between the first resource pool and the other servers; Determining a network delay corresponding to the first resource pool according to a weight between the target server and the other servers, and a network delay between the first resource pool and the other servers; The first resource pool with the smallest corresponding network delay among the multiple first resource pools is used as the target resource pool.

4. The method according to claim 1, wherein The method of selecting a target host machine that meets the host machine requirements from a plurality of host machines in the target resource pool by using a bin packing algorithm includes: In the absence of other servers that are migrated to the target resource pool synchronously with the target server, selecting a host machine whose remaining memory capacity meets the specification requirements of the target server from multiple host machines in the target resource pool, and establishing a first mapping relationship between the target server and the host machine that meets the specification requirements of the target server; In response to the number of host machines having a first mapping relationship with the target server being one, using the host machine having the first mapping relationship with the target server as the target host machine; In response to the number of host machines having a first mapping relationship with the target server being multiple, one host machine is selected from the multiple host machines having a first mapping relationship with the target server as the target host machine.

5. The method according to claim 1, wherein The method of selecting a target host machine that meets the host machine requirements from a plurality of host machines in the target resource pool by using a bin packing algorithm includes: In the case that there are other servers that are migrated to the target resource pool synchronously with the target server, for each server to be migrated, a host machine whose remaining memory capacity meets the specification requirements of the server is screened from multiple host machines in the target resource pool, and a first mapping relationship is established between the server and the host machine that meets the specification requirements of the server; Determine the overall specification requirements corresponding to each candidate host machine respectively; In response to the remaining capacities of all the candidate host machines satisfying their corresponding total specification requirements, determining the number of host machines having a first mapping relationship with the target server; In response to the number of host machines having a first mapping relationship with the target server being one, using the host machine having the first mapping relationship with the target server as the target host machine; In response to the number of host machines having a first mapping relationship with the target server being multiple, one host machine is selected from the multiple host machines having a first mapping relationship with the target server as the target host machine.

6. The method according to claim 5, characterized in that The method of using a packing algorithm to select a target host machine that meets the host machine requirements from a plurality of host machines in the target resource pool further includes: In response to the remaining capacity of any candidate host machine not meeting the corresponding total specification requirement, determining, as the first server, a server among the other servers and the target server that has a first mapping relationship with only one host machine; Establishing a second mapping relationship between the first server and the host machine having a first mapping relationship therewith, and canceling the first mapping relationship corresponding to the first server; Updating the remaining capacity of the host machine having the second mapping relationship with the first server to the capacity obtained by subtracting the specification requirement of the first server; After completing the update of the remaining capacity of the host machine, respectively determining the maximum server corresponding to each of the candidate host machines; Determine, among all candidate host machines that have a first mapping relationship with the largest server, a host machine whose remaining capacity meets the specification requirements of the largest server as a first host machine; Selecting a host machine from the first host machines as a second host machine, establishing a second mapping relationship between the largest server and the second host machine, canceling the first mapping relationship corresponding to the largest server, and updating the remaining capacity of the second host machine to the capacity after deducting the specification requirements of the largest server; After the second mapping relationship between the target server and the host machine is established, the host machine having the second mapping relationship with the target server is used as the target host machine.

7. The method according to claim 1, characterized in that Migrating the target server to the target host includes: Determining a corresponding migration scenario according to the type of the target server, wherein the type is a physical machine or a virtual machine; Determining a target migration template of a migration template corresponding to the migration scenario from preset migration templates, wherein the migration template includes migration steps, a migration execution script or a command; The target server is migrated to the target host machine using the target migration template.

8. A service migration device, characterized in that: include: The migration requirement determination module is used to determine the resource pool requirements and host requirements corresponding to the target server to be migrated in the business; A target resource pool determination module is used to select a target resource pool that meets the resource pool requirements from multiple resource pools using a filtering method; a target host determination module, configured to filter out a target host that meets the host requirements from multiple hosts in the target resource pool by using a packing algorithm, wherein, in the event that the remaining capacity of any candidate host does not meet its corresponding total specification requirement, the target host is a host that has a second mapping relationship with the target server, the candidate host is a host that has a first mapping relationship, the first mapping relationship is established based on a server and a host that meets the server's specification requirements, the total specification requirement is the sum of the specification requirements of all servers that have a first mapping relationship with the candidate host, the second mapping relationship is established based on the largest server and the second host, the second host is selected from the first host, the first host is a host that has a remaining capacity that meets the specification requirements of the largest server among all hosts that have a first mapping relationship with the largest server, and the largest server is the server with the largest specification requirement in the first mapping relationship with the candidate host; A migration module is used to migrate the target server to the target host.

9. An electronic device, characterized in that: The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the service migration method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the service migration method according to any one of claims 1 to 7 is implemented.

11. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the service migration method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Secure virtual machine migration method based on trustworthy resource pool

    CN105183546A

  • Virtual machine distribution method and device

    CN105786619A