Resource migration method and system and related device
By obtaining and utilizing the network connection relationship and service information in the data center, the migration batch and sequence are automatically planned, which solves the problem of unreasonable migration batches in cross-cloud migration, simplifies the operation steps and improves the user experience.
Patent Information
- Application Number
- PCT/CN2024/080557
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-23
- Filing Date
- 2024-03-07
- Publication Date
- 2024-09-26
AI Technical Summary
In a multi-cloud architecture, when migrating across clouds, the traditional method requires installing an agent for each virtual machine, which is cumbersome and prone to unreasonable migration batches. As a result, the migrated virtual machines cannot use the original network services and reduce the user experience.
Provide a resource migration method and system that, by receiving migration requests, obtains network connection relationships and network service information in the data center, automatically plans migration batches and sequences, avoids installing agents in advance, simplifies operation steps, and ensures continuity of network services sex.
There is no need to install an agent in advance, which simplifies resource migration operations, improves user experience, reduces the impact of the migration process on the business, and ensures that the migrated virtual machines can normally use the original network services.
Smart Images

Figure CN2024080557_26092024_PF_FP
Abstract
Description
Resource migration method, system and related equipment
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 23, 2023, with application number 202310293942.2 and application name “A resource migration method, system and related equipment”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of cloud computing, and in particular to a resource migration method, system, and related equipment. Background Art
[0003] With the continuous development of cloud computing technology and the continuous expansion of computing scale, various cloud platforms are showing a trend of flourishing. Multi-cloud strategy is the next major development direction of cloud computing. By adopting a multi-cloud strategy, on the one hand, users can enjoy more industry-leading platform as a service (Paas), and on the other hand, they can achieve long-term low-cost operation and business system disaster recovery. For many users who use traditional data centers or single cloud services, multi-cloud architecture has gradually become a consensus among users.
[0004] However, users' businesses are generally carried by multiple virtual machines. When migrating virtual machines across clouds under a multi-cloud architecture, in order to avoid affecting users' businesses, it is necessary to plan the migration batches of virtual machines based on the network topology between virtual machines. Therefore, when users perform cross-cloud migration, they need to install an agent for identifying the network topology for all virtual machines that carry user businesses. The agent can only identify the network communication relationship between virtual machines, and cannot identify the cloud network services deployed on each virtual machine. Then, when resources are migrated, if the virtual machines using network services are not divided into the same batch for migration, or are not migrated in batches in a reasonable order, and unreasonable migration batches occur, the migrated virtual machines will be unable to use the originally configured network services, reducing the user experience.
[0005] Summary of the Invention
[0006] The present application provides a resource migration method, system and related equipment for solving the problem of poor user experience during resource migration and improving the user experience.
[0007] In a first aspect, a resource migration method is provided, which is applied to a resource migration system, wherein the resource migration system establishes communication connections with a first data center and a second data center respectively, and the method includes the following steps: receiving a migration request, the migration request including instance information of at least one target instance that the user requests to migrate to the second data center, the at least one target instance being an instance in the first data center, obtaining network connection relationships and network service information between multiple instances of the user in the first data center and the second data center based on the instance information, the network service information including information about virtual network units where the multiple instances are located and information about basic network services used by the multiple instances, and migrating the at least one target instance from the first data center to the second data center based on the network connection relationship and the network service information.
[0008] Implement the resource migration method described in the first aspect. When a user requests to migrate at least one target instance in the first data center to the second data center, the resource migration system can first receive the migration request, which includes the instance information of the at least one target instance. Then, based on the instance information, the network connection relationship and network service information between the multiple instances of the user in the first data center and the second data center are obtained. The network service information includes the information of the virtual network units where the multiple instances are located and the information of the basic network services used by the multiple instances. Finally, based on the network connection relationship and the network service information, at least one target instance is migrated from the first data center to the second data center. In this way, when performing resource migration, the user does not need to install an agent for each instance in advance to achieve resource migration, which simplifies the operational steps of resource migration and improves the user experience. Moreover, when migrating resources, not only the network connection relationship between each instance is taken into consideration, but also the network service information associated with each instance is combined, thereby reducing the impact of the migration process on the business and improving the user experience.
[0009] In one possible implementation, the first data center and the second data center belong to different cloud platforms respectively, and the resource migration system is a server in the cloud platform where the first data center is located, or the resource migration system is a server in the cloud platform where the second data center is located.
[0010] With the above implementation method, the resource migration system can realize cross-cloud migration of instances in different cloud platforms. Users using traditional data centers or single cloud services do not need to install agents for each instance in advance, which simplifies the operation steps of cross-cloud migration and improves the user experience.
[0011] In a possible implementation, the first data center and the second data center belong to the same cloud platform, and the region where the first data center is located is different from the region where the second data center is located.
[0012] With the above implementation, the resource migration system can achieve cross-region migration of instances within the same cloud platform. Users do not need to install agents for each instance in advance, which simplifies the operation steps of cross-region migration and improves the user experience.
[0013] In one possible implementation, the network connection relationship and network service information are determined after sending an instance query request to the cloud platform where the first data center is located and the cloud platform where the second data center is located. The instance query request includes instance information of at least one target instance. The instance query request is used to query the network connection relationship and network service information between multiple instances associated with the at least one target instance.
[0014] It should be understood that with the continuous development of multi-cloud architecture, query platforms have been opened between various cloud platforms, making it convenient for users to query activated instances from a unified entrance. Therefore, according to the interface descriptions provided by each cloud platform, the query API of each cloud platform can be determined to obtain the instance query request corresponding to each cloud platform.
[0015] Optionally, if the first data center does not provide a query platform, for example, the first data center is a traditional data center, then the resource migration system can provide an interface to the user, which is used to obtain the first query result input by the user, which may specifically include the first network connection relationship and first network service information between multiple first instances created and associated by the user in the first data center.
[0016] The above implementation method queries the cloud platform for the user's cloud service usage records and then generates network connection relationships and network service information. This not only does not require the installation of an agent, thereby improving the user experience, but also because the user's creation and association operations in the cloud platform are recorded by the cloud platform's database, the network topology and service information obtained through querying will not be missed, and the final topology information obtained will have complete coverage, thereby improving the success rate of resource migration.
[0017] In one possible implementation, when migrating at least one target instance from a first data center to a second data center based on a network connection relationship and network service information, the at least one target instance can be divided into multiple migration groups according to grouping rules based on the network connection relationship and network service information to obtain a grouping result, the migration order of the multiple migration groups can be determined according to a sequence rule, and the at least one target instance can be migrated from the first data center to the second data center in batches according to the grouping results and the migration order.
[0018] The above implementation method determines the reasonable grouping results of multiple instances and the migration order of each migration group through the topology information and sequence rules of multiple instances. It not only takes into account the network connection relationship between each instance, but also combines the network service information associated with each instance. Such a planned migration order can reduce the impact of the migration process on the business and improve the user experience.
[0019] In one possible implementation, the grouping rules include one or more of the following rules: multiple instances within the same subnet correspond to the same migration group; instances within multiple subnets associated with multi-network card virtual machines correspond to the same migration group; when the public network address associated with the network service needs to remain unchanged before and after resource migration, instances within multiple subnets using the network service correspond to the same migration group; multiple associated subnets correspond to the same migration group, wherein any subnet among the multiple associated subnets is the service address subnet or backend member subnet of other subnets.
[0020] The above implementation method, by setting multiple grouping rules, can ensure that instances that need to be migrated in the same batch are divided into the same migration group, avoiding the situation where some instances associated with cloud services are divided into different batches for migration, and avoiding the problem that the migrated instances cannot use the original configured network services, thereby improving the user experience.
[0021] In one possible implementation, the sequence rules include a first-priority sequence rule and a second-priority sequence rule, wherein, when the migration order generated by the first-priority sequence rule is different from the migration order generated by the second-priority sequence rule, the migration order of multiple migration groups is determined according to the first-priority sequence rule.
[0022] The above implementation method sets the priority of the sequence rules so that there will be no sequence conflict problem when the resource migration system determines the migration order of each migration group. It should be understood that some sequence rules may cause contradictions in the final migration order. By setting the priority of the sequence rules, when there are contradictions in the migration order, the sequence rules with the first priority can be used to determine the migration order, thereby improving the correctness and consistency of the final migration order and reducing the possibility of errors or unreasonable results in resource migration.
[0023] In one possible implementation, the first-priority order rule includes one or more of the following rules: the migration order of the migration group corresponding to the subnet where the elastic load balancing (ELB) service address is located is earlier than the migration group corresponding to other subnets of the ELB backend; the migration order of the migration groups corresponding to multiple subnets that mount the same shared volume is adjacent; the migration order of the migration groups corresponding to multiple subnets with a peer connection relationship is adjacent; the migration order of the migration groups corresponding to multiple subnets that use the same security group is adjacent.
[0024] The above implementation method, by setting multiple sequence rules, can ensure that migration groups with dependencies can be migrated in sequence, avoiding the problem that the migrated instances cannot use the originally configured network services, and improving the user experience.
[0025] In one possible implementation, the second-priority order rules include one or more of the following: Migration groups corresponding to instances of the same tenant are sequentially migrated; Migration groups corresponding to subnets with a structural complexity below a threshold are prioritized for resource migration; Migration groups corresponding to subnets within a VPC with a structural complexity below a threshold are prioritized for resource migration.
[0026] In the above implementation method, some rules that prevent instances from being unable to use the original configured network services after migration are used as the first-priority sequence rules, and some sequence rules that can facilitate resource migration, are only used in special circumstances, or are easily affected by other rules are used as the second-priority rules. This not only avoids conflicts in the final generated migration sequence, but also improves the efficiency of migration in some special circumstances and enhances the user experience.
[0027] In one possible implementation, the virtual network unit includes one or more of a virtual private cloud (VPC), a subnet, and a peer connection, and the basic network service includes one or more of a network address translation (NAT) service, an ELB service, a virtual private network (VPN) service, and a cloud dedicated line service.
[0028] Optionally, the above examples may include any one of a virtual machine, a container, and a bare metal server, which is not specifically limited in this application.
[0029] In the above implementation method, during the resource migration process, not only the network connection relationship between instances is considered, but also the virtual network units where each instance is located and the network service information associated with each instance are considered. This planned migration order can reduce the impact of the migration process on the business and improve the user experience.
[0030] In a second aspect, a resource migration system is provided, which establishes communication connections with a first data center and a second data center respectively, and the resource migration system includes: an acquisition unit for receiving a migration request, the migration request including instance information of at least one target instance that the user requests to migrate to the second data center, and at least one target instance is an instance in the first data center; a determination unit for obtaining, based on the instance information, network connection relationships and network service information between multiple instances of the user in the first data center and the second data center, the network service information including information about virtual network units where the multiple instances are located and information about basic network services used by the multiple instances; a migration unit for migrating at least one target instance from the first data center to the second data center based on the network connection relationship and network service information.
[0031] Implement the resource migration system described in the second aspect. When a user requests to migrate at least one target instance in the first data center to the second data center, the resource migration system can first receive the migration request, which includes the instance information of the above-mentioned at least one target instance, and then obtain the network connection relationship and network service information between the multiple instances of the user in the first data center and the second data center based on the instance information. The network service information includes the information of the virtual network units where the multiple instances are located and the information of the basic network services used by the multiple instances. Finally, according to the network connection relationship and network service information, at least one target instance is migrated from the first data center to the second data center. In this way, when performing resource migration, the user does not need to install an agent for each instance in advance to achieve resource migration, simplifying the operational steps of resource migration and improving the user experience. Moreover, when migrating resources, not only the network connection relationship between each instance is taken into consideration, but also the network service information associated with each instance is combined, thereby reducing the impact of the migration process on the business and improving the user experience.
[0032] In one possible implementation, the first data center and the second data center belong to different cloud platforms respectively; the resource migration system is a server in the cloud platform where the first data center is located, or the resource migration system is a server in the cloud platform where the second data center is located.
[0033] In a possible implementation, the first data center and the second data center belong to the same cloud platform, and the region where the first data center is located is different from the region where the second data center is located.
[0034] In one possible implementation, the network connection relationship and network service information are determined after sending an instance query request to the cloud platform where the first data center is located and the cloud platform where the second data center is located. The instance query request includes instance information of at least one target instance. The instance query request is used to query the network connection relationship and network service information between multiple instances associated with the at least one target instance.
[0035] In one possible implementation, the determination unit is used to divide at least one target instance into multiple migration groups according to the network connection relationship and network service information according to the grouping rules to obtain grouping results, and determine the migration order of the multiple migration groups according to the sequence rules; the determination unit is used to migrate at least one target instance from the first data center to the second data center in batches according to the grouping results and the migration order.
[0036] In one possible implementation, the grouping rules include one or more of the following rules: multiple instances within the same subnet correspond to the same migration group; instances within multiple subnets associated with multi-network card virtual machines correspond to the same migration group; when the public network address associated with the network service needs to remain unchanged before and after resource migration, instances within multiple subnets using the network service correspond to the same migration group; multiple associated subnets correspond to the same migration group, wherein any subnet among the multiple associated subnets is the service address subnet or backend member subnet of other subnets.
[0037] In one possible implementation, the sequence rules include a first-priority sequence rule and a second-priority sequence rule, wherein, when the migration order generated by the first-priority sequence rule is different from the migration order generated by the second-priority sequence rule, the migration order of multiple migration groups is determined according to the first-priority sequence rule.
[0038] In one possible implementation, the first-priority order rule includes one or more of the following rules: the migration order of the migration group corresponding to the subnet where the ELB service address is located is earlier than the migration group corresponding to other subnets of the ELB backend; the migration order of the migration groups corresponding to multiple subnets that mount the same shared volume is adjacent; the migration order of the migration groups corresponding to multiple subnets with a peer connection relationship is adjacent; the migration order of the migration groups corresponding to multiple subnets that use the same security group is adjacent.
[0039] In one possible implementation, the second priority order rules include one or more of the following: Migration groups corresponding to instances of the same tenant are sequentially migrated; Migration groups corresponding to subnets with a structural complexity lower than a threshold are prioritized for resource migration; Migration groups corresponding to subnets within a VPC with a structural complexity lower than a threshold are prioritized for resource migration.
[0040] In one possible implementation, the virtual network unit includes one or more of VPC, subnet, and peer connection, and the basic network service includes one or more of NAT service, ELB service, VPN service, and cloud dedicated line service.
[0041] In a third aspect, a computing device is provided, which includes a processor and a memory, the memory being used to store code, and the processor being used to execute the code to implement the method described in the first aspect or any possible implementation of the first aspect.
[0042] In a fourth aspect, a computing device cluster is provided, which includes at least one computing device, each computing device including a processor and a memory, the memory is used to store code, and the processor is used to execute the code to implement the method described in the first aspect or any possible implementation of the first aspect.
[0043] In a fifth aspect, a computer-readable storage medium is provided, in which instructions are stored. When the instructions are executed by a computing device or a computing device cluster, the method described in the first aspect or any possible implementation of the first aspect is implemented.
[0044] In a sixth aspect, a computer program product is provided, characterized in that the computer program product includes a computer program, and when the computer program is run by a computing device or a computing device cluster, it implements the method described in the first aspect or any possible implementation of the first aspect.
[0045] Based on the implementation methods provided in the above aspects, this application can also be further combined to provide more implementation methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] FIG1 is a schematic diagram of the architecture of a resource migration system provided by the present application;
[0047] FIG2 is another schematic diagram of the architecture of a resource migration system provided by the present application;
[0048] FIG3 is a schematic diagram of the structure of a resource migration system provided by the present application;
[0049] FIG4 is a schematic diagram of a process flow of a resource migration method provided by the present application;
[0050] FIG5 is an example diagram of topology information in a resource migration system provided by the present application;
[0051] FIG6 is a schematic flow chart of the steps for determining the migration order in the resource migration method provided by the present application;
[0052] FIG7 is a schematic diagram of the structure of a computing device provided by the present application;
[0053] FIG8 is a schematic diagram of the structure of a computing device cluster provided by the present application;
[0054] FIG9 is a schematic diagram of the structure of another computing device cluster provided by the present application. DETAILED DESCRIPTION
[0055] The following describes the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0056] With the continuous development of cloud computing technology and the continuous expansion of computing scale, various cloud platforms are showing a trend of flourishing. Multi-cloud strategy is the next major development direction of cloud computing. By adopting a multi-cloud strategy, on the one hand, users can enjoy more industry-leading Paas, and on the other hand, they can achieve long-term low-cost operation and business system disaster recovery. For many users who use traditional data centers or single cloud services, multi-cloud architecture has gradually become a consensus for user development.
[0057] In a multi-cloud architecture, users migrating virtual machines across clouds must install an agent on each VM in advance. The agent collects network communication information between the physical machine and the applications running within the VM, inferring the application topology. Based on this topology, migration batches are then planned at the application granularity. This approach has several drawbacks and inconveniences, each of which is explained below.
[0058] First, user businesses are generally carried by multiple virtual machines. Installing agents for all virtual machines that carry user businesses is not only cumbersome, but the agents also need to consider compatibility with cloud platforms and operating systems. In addition, the security of the agents is easily questioned by users, which reduces the user experience.
[0059] Secondly, when planning migration batches at the application level, the proxy only identifies the network communication relationships between applications running within the VMs, such as whether VM1 is connected to VM2, and VM2 is connected to VM3. However, in actual application scenarios, cloud network services such as EIP, NAT, LB, or VPN may be deployed between the user's VMs. For example, VM1 and VM2 may belong to different subnets, but they may belong to the same VPN. VPC1, composed of VM1 and VM2, and VPC2, composed of VM3 and VM3, may be peer-to-peer. The proxy can only identify network communication relationships based on applications and cannot identify the cloud network services deployed on each VM. Therefore, during resource migration, if the VMs using network services are not migrated in the same batch, or if they are not migrated in batches in a reasonable order, resulting in irrational migration batches, the migrated VMs will be unable to use the originally configured network services. For example, when the public network address of a VPN service needs to remain unchanged, if the virtual machines associated with the service are not migrated in the same batch, the public network address of the migrated virtual machines will change, and users will need to reconfigure the virtual machines. For another example, VPCs with peer connections need to be migrated in adjacent batches. If they are not migrated in adjacent batches, users will need to reset the peer connection relationship for the VPCs after the virtual machines are migrated, making the entire cloud migration operation cumbersome, affecting user services, and resulting in a poor user experience.
[0060] In summary, for users using traditional data centers or single cloud services, cross-cloud migration not only requires installing an agent for each virtual machine in advance, making the entire cloud migration process cumbersome, but also easily leads to problems with unreasonable migration batches or migration sequences, affecting user business and poor user experience.
[0061] In order to solve the problems of cumbersome operational steps and poor user experience in the above-mentioned cross-cloud migration, the present application provides a resource migration system. When a user requests to migrate at least one target instance in the first data center to the second data center, the system can first receive a migration request, which includes instance information of the above-mentioned at least one target instance, and then obtain the network connection relationship and network service information between the user's multiple instances in the first data center and the second data center based on the instance information. The network service information includes information about the virtual network units where the multiple instances are located and information about the basic network services used by the multiple instances. Finally, based on the network connection relationship and network service information, at least one target instance is migrated from the first data center to the second data center. In this way, when performing resource migration, the user does not need to install an agent for each instance in advance to achieve resource migration, simplifying the operational steps of resource migration and improving the user experience. Moreover, when migrating resources, not only the network connection relationship between each instance is taken into consideration, but also the network service information associated with each instance is combined, thereby reducing the impact of the migration process on the business and improving the user experience.
[0062] As shown in Figure 1, Figure 1 is a schematic diagram of the architecture of a resource migration system provided by the present application. The architecture may include a first data center 110, a second data center 120, a resource migration system 130 and a user terminal 140, wherein communication connections are established between the first data center 110, the second data center 120, the resource migration system 130 and the user terminal 140, respectively. The connection can be a wired connection or a wireless connection, which is not specifically limited in this application. The resource migration system provided by this application can be deployed on the resource migration system 130. It should be noted that in the resource system architecture provided by this application, the number of data centers can be multiple. Figure 1 takes two data centers, namely the first data center 110 and the second data center 120, as an example for illustration, and this application does not specifically limit this.
[0063] The first data center 110 and the second data center 120 may be server clusters, including multiple servers, which may be bare metal servers (BMS), virtual machines (VMs), or containers. A BMS refers to a general-purpose physical server, such as an ARM server or an X86 server; a VM refers to a complete computer system implemented using network function virtualization (NFV) technology and simulated through software with complete hardware system functions, running in a completely isolated environment; and a container refers to a group of processes that are resource-constrained and isolated from each other.
[0064] Optionally, the first data center 110 and the second data center 120 may belong to different cloud platforms. For example, as shown in FIG1 , the first data center 110 is a data center within the first cloud platform 100 , and the second data center 120 is a data center within the second cloud platform 200 .
[0065] Optionally, the first data center 110 and the second data center 120 may belong to different regions under the same cloud platform, wherein a region refers to an area divided by region in a public cloud, and is the area where the physical data center is located. For example, FIG2 is another architectural diagram of the resource migration system provided by the present application. As shown in FIG2 , the first data center 110 and the second data center 120 are data centers in two different regions of the third cloud platform 300, wherein the first data center 110 belongs to a first region, such as the North China data center, and the second data center belongs to a second region, such as the South China data center. It should be understood that the above examples are for illustration purposes only, and the present application does not limit the specific regions to which the first data center and the second data center belong.
[0066] Optionally, in one application scenario, the first data center 110 may be a traditional data center, and the second data center 120 may be a cloud service data center. In another application scenario, the first data center 110 and the second data center 120 may both be cloud service data centers.
[0067] The resource migration system 130 can be deployed on a server or a server cluster, where the server can be the above-mentioned BMS, virtual machine or container. The explanation is not repeated here. The server cluster can be a cluster composed of multiple above-mentioned servers, such as a cluster composed of multiple BMSs, or a cluster composed of multiple virtual machines and multiple BMSs. This application does not make specific limitations.
[0068] Optionally, when the first data center 110 and the second data center 120 belong to different cloud platforms, the resource migration system 130 can be a server within any one of the cloud platforms to which the first data center 110 or the second data center 120 belongs. For example, as shown in FIG1 , the resource migration system 130 is a server within the second cloud platform 200, and belongs to the same cloud platform as the second data center 120, and a different cloud platform from the first data center 110. It should be understood that FIG1 is for illustration purposes only, and the resource migration system 130 can also be a server within the first cloud platform 100, belonging to the same cloud platform as the first data center 110, and a different cloud platform from the second data center 120. This is not specifically limited in this application.
[0069] Optionally, when the first data center 110 and the second data center 120 belong to the same cloud platform, the resource migration system can be a server within the cloud platform, specifically, it can be located in the same region as the first data center 110, or it can be located in the same region as the second data center 120. For example, as shown in Figure 2, the resource migration system 130, the first data center 110 and the second data center 120 belong to the third cloud platform 300, the resource migration system 130 and the second data center 120 are located in the second region, and the first data center 110 is located in the first region. It should be understood that Figure 1 is for illustration, and the resource migration system 130 can also be located in the first region, and this application does not make specific limitations.
[0070] User terminal 140 may be a terminal device held by a user, and may be a computer, smartphone, handheld processing device, tablet computer, mobile notebook, augmented reality (AR) device, virtual reality (VR) device, all-in-one handheld game console, wearable device, vehicle-mounted device, smart conferencing device, smart advertising device, smart home appliance, etc., without specific limitation herein. In a specific implementation, a client runs on user terminal 140, through which the user communicates with the first data center and the second data center. The client may be an application client, a web-based client in a browser, or an application programming interface (API), without specific limitation herein.
[0071] Optionally, the client can be a migration service within the cloud platform. Users can purchase the corresponding service on the cloud platform to obtain the migration function. Specifically, it can be a separate migration service, such as a cross-cloud migration service or a cross-region migration service, or it can be a sub-service within the cloud service purchased by the user. This application does not make specific restrictions. In a specific implementation, the client can be the console of the cloud platform, a web-based console, or a client-based console. This application does not make specific restrictions. The client can interact with the user through a visual interface or through an API. This application does not make specific restrictions.
[0072] Optionally, the client can be an independently installed software tool, specifically a separate software tool specifically used for cross-cloud migration or cross-region migration, or it can be built into other software tools as a plug-in, such as built into a cloud migration tool as a cross-cloud migration or cross-region migration function of the cloud migration tool, wherein the cloud migration tool can be used by users using traditional data centers to migrate their businesses to the cloud platform. It should be understood that the above examples are for illustrative purposes only and this application does not make specific limitations.
[0073] Optionally, when the first data center 110 and the second data center 120 belong to different cloud platforms, the client may be the console of the first cloud platform or the console of the second cloud platform, which is not specifically limited in this application.
[0074] In an embodiment of the present application, user terminal 140 can initiate a resource migration request to resource migration system 130. Resource migration system 130 can respond to the resource migration request and migrate the user's virtual machine deployed in first data center 110 to second data center 120. When performing cross-cloud or cross-region migration, the user does not need to install an agent for each virtual machine, nor does the user need to consider compatibility issues between each virtual machine and the cloud platform and agent. This reduces the complexity of resource migration and improves the user experience.
[0075] Furthermore, the resource migration system 130 can be further divided into multiple unit modules. For example, Figure 3 is a structural diagram of a resource migration system provided by the present application. As shown in Figure 3, the resource migration system 130 may include an acquisition unit 131, a topology identification unit 132, a grouping determination unit 133, a sequence determination unit 134 and a migration unit 135. The resource migration system 130 may also include a database 136, wherein the resource migration system 130 may be the resource migration system in the embodiments of Figures 1 and 2. It should be understood that Figure 3 is an exemplary division method. The resource migration system 130 may also include more or fewer units. For example, the grouping determination unit 133 and the sequence determination unit 134 may be merged into one determination unit. For example, the resource migration system 130 may also include a display unit for displaying migration batches and migration sequences to the user. It should be understood that the above examples are for illustration only and are not specifically limited in this application.
[0076] It should be understood that Figure 3 is an example of an application scenario in which the resource migration system 130 and the second data center 120 are deployed on the second cloud platform 200, the first data center 110 is deployed on the first cloud platform 100, and the user's migration request is to migrate the virtual machine from the first data center 110 to the second data center 120. In a specific implementation, the resource migration system 130 can also be deployed on the first cloud platform 100 together with the first data center 110, or the first data center 110 and the second data center 120 are data centers in different regions within the same cloud platform. This application does not make specific limitations. The unit modules of the resource migration system 130 in other application scenarios can refer to Figure 3 and are not explained in detail here.
[0077] The acquisition unit 131, topology identification unit 132, grouping determination unit 133, sequence determination unit 134, and migration unit 135 can all be implemented via software or hardware. For example, the implementation of topology identification unit 132 will be described below using topology identification unit 132 as an example. Similarly, the implementation of acquisition unit 131, grouping determination unit 133, sequence determination unit 134, and migration unit 135 can refer to the implementation of topology identification unit 132.
[0078] The topology identification unit 132 is an example of a software functional unit. The topology identification unit 132 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Furthermore, the computing instance may be one or more. For example, the topology identification unit 132 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple geographically close data centers. Typically, a region may include multiple AZs.
[0079] Similarly, multiple hosts / virtual machines / containers running the code can be distributed within the same VPC or across multiple VPCs. Typically, a VPC is set up within a region. Cross-region communication between two VPCs within the same region, or between VPCs in different regions, requires a communication gateway within each VPC to interconnect the VPCs.
[0080] As an example of a hardware functional unit, topology identification unit 132 may include at least one computing device, such as a server. Alternatively, topology identification unit 132 may be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0081] The multiple computing devices included in the topology identification unit 132 can be distributed in the same region or in different regions. The multiple computing devices included in the topology identification unit 132 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the topology identification unit 132 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0082] The functions of each unit module in the resource migration system 130 are described below.
[0083] The acquiring unit 131 is configured to acquire a migration request sent by a user.
[0084] In a specific implementation, the user may send the migration request to the resource migration system 130 through the user terminal 140 shown in FIG. 1 and FIG. 2 . The deployment forms of the user terminal 140 and the resource migration system 130 may refer to the description of the aforementioned embodiment and will not be repeated here.
[0085] Optionally, the migration request may carry instance information of at least one target instance, wherein the at least one target instance is an instance requested by the user to be migrated from the first data center to the second data center, and the instance may include any of a virtual machine, a physical machine, and a container. The instance information may include an instance identifier, which may be a unique string, specifically a device feature code of the instance, which is a unique code used by the cloud platform to distinguish cloud application instances. This application does not limit the specific form of the device identifier. The instance information may also include other information that can be used to determine the identity of the instance, such as the instance address and instance name, which is not specifically limited in this application.
[0086] Optionally, the migration request may include user information, such as the user's account name, nickname, token, etc. This user information can be used to obtain instances and network services created and associated by the user within the platform. The above examples are for illustrative purposes only, and this application does not limit the specific content of the user information.
[0087] The topology identification unit 132 is used to respond to the user's migration request and determine the topology information of multiple instances created and associated by the user within the platform. The multiple instances here can be target instances, other instances associated with the target instance, or all instances created and associated by the user. This application does not specifically limit this. The specific instance can be determined based on the instance that the user requests to migrate. For example, if the user has 100 instances and requests to migrate all instances, the migration request can carry one target instance, and then determine the instance information of the 100 instances based on the one target instance, and then perform resource migration on the 100 instances. If the user requests to migrate 10 instances, the migration request can carry the instance information of 10 target instances, and then perform resource migration on these 10 instances.
[0088] Among them, the topological relationship includes the network connection relationship and network service information between multiple instances that carry user services. The network connection relationship includes the communication connection relationship of the network between multiple instances. For example, the network connection relationship may include: virtual machine VM1 is connected to virtual machine VM2, virtual machine VM2 is connected to virtual machine VM3, and so on. The network service information includes the basic network services and virtual network units associated with multiple instances, wherein the basic network services may include but are not limited to NAT services, ELB services, VPN services, cloud dedicated access (CDA) services, etc., and the virtual network units may include but are not limited to VPCs, subnets, peer connections, etc., which are not specifically limited in this application. For example, the network service information may include: virtual machines VM1 and virtual machines VM2 belong to the same VPN, virtual machine VM1 belongs to subnet 1, virtual machine VM2 belongs to subnet 2, and the VPC2 where virtual machine VM3 is located and the VPC1 where virtual machine VM1 is located are in a peer-to-peer connection relationship. The above examples are for illustration only and are not specifically limited in this application.
[0089] In one possible implementation, the topology identification unit 132 may send an instance query request to the first cloud platform 100 and the second cloud platform 200, receive the first query result and the second query result returned by the first cloud platform 100 and the second cloud platform 200, and determine the network connection relationship and network service information between the multiple instances carrying the user's business based on the first query result and the second query result. The instance query request may include instance information of at least one target instance, the first query result may include the first network connection relationship and the first network service information between the multiple first instances associated with the at least one target instance in the first data center, and the second query result may include the second network connection relationship and the second network service information between the multiple second instances associated with the at least one target instance in the second data center 120. The resource migration system may determine the network connection relationship and the network service information between the multiple first instances of the user in the first data center 110 and the multiple second instances in the second data center 120 based on the first query result and the second query result, and generate topology information for the multiple instances.
[0090] Optionally, when the first data center 110 and the second data center 120 belong to the same cloud platform, the instance information of multiple instances created under the cloud platform can be queried based on the user information in the migration request, and then the network connection relationship and network service information between the multiple first instances in the first data center 110 and the multiple second instances in the second data center 120 can be determined based on the instance information.
[0091] Optionally, when the first data center 110 and the second data center 120 belong to different cloud platforms, assuming that the resource migration system 130 is deployed on the second cloud platform, the user information is first obtained according to the migration request, and then the second instance information of all second instances created by the user under the second cloud platform 200 is determined based on the user information, and then the second instance information is sent to the first cloud platform 100 to obtain the first instance information of all first instances created by the user under the first cloud platform 100, and then the network connection relationship and network service information between the multiple first instances in the first data center 110 and the multiple second instances in the second data center 120 are determined based on the first instance information and the second instance information to generate topology information of multiple instances.
[0092] For example, in the application scenario shown in Figure 3, the resource migration system 130 is deployed on the second cloud platform 200. The topology identification unit 132 can first obtain user information based on the migration request issued by the user, and then issue a second instance query request to the second cloud platform 200 based on the user information to determine the second instance information of all instances created by the user on the second cloud platform 200, and then query the second network connection relationship and second network service information of multiple second instances based on the second instance information, and then return it to the resource migration system 130, and then send a first instance query request to the first cloud platform 100. The first instance query request can carry the second instance information of the second instance, thereby obtaining the first instance information of multiple first instances in the first cloud platform associated with the above-mentioned second instance, and then determine the first network connection relationship and first network service information of the multiple first instances based on the first instance information, and then return it to the resource migration system 130, thereby obtaining the network connection relationship and network service information between the multiple instances associated with the user in the first cloud platform 100 and the second cloud platform 200, and generating topology information of multiple instances.
[0093] Optionally, if the migration request does not carry the instance information of the target instance, the topology identification unit 132 may first query the topology information of all instances of the user service carrier based on the user information, and then display it to the user. The user can select the target instance to be migrated, thereby obtaining the instance information of the target instance, and then perform resource migration on the target instance based on the topology information. If the migration request carries the instance information of the target instance, the topology identification unit 132 may query the topology information of all instances of the user service carrier based on the instance information of the target instance carried in the migration request, and then perform resource migration on the target instance based on the topology information. This application does not make specific limitations.
[0094] In one possible implementation, the above-mentioned instance query request may include a query API that each cloud platform can respond to. The query API is used to query the network connection relationship of the instance on the platform and the network service information associated with the instance within the platform, so that after the cloud platform receives the instance query request, it can obtain the network connection relationship and network service information between multiple instances associated with the target instance carried in the query API.
[0095] It should be understood that when a user creates an instance, the database of each cloud platform will record the instance information of the instance created by the user. When the user associates multiple instances, the database of the cloud platform will also record the network connection relationship and network service information between the instances. Therefore, a query API can be sent to the cloud platform to collect the instance information of the instances created by the user in association with each cloud platform, the virtual network unit where each instance is located, and detailed information on the basic network services used by each instance, to construct the user's virtual network topology on the cloud and obtain topology information.
[0096] It should be noted that with the continuous development of multi-cloud architecture, query platforms have been opened between various cloud platforms, making it convenient for users to query activated instances from a unified entrance. Therefore, you can determine the query API of each cloud platform according to the interface description provided by each cloud platform and obtain the instance query request corresponding to each cloud platform.
[0097] Optionally, if the first data center 110 does not provide a query platform, for example, the first data center 110 is a traditional data center, then the resource migration system 130 can provide an interface to the user, which is used to obtain the first query result input by the user, which may specifically include the first network connection relationship and first network service information between multiple first instances created and associated by the user in the first data center 110.
[0098] Optionally, if the second data center has no user-created instances and no user-associated network services, for example, the user uses the second cloud platform 200 for the first time and needs to migrate the virtual machine of the old platform (first cloud platform 100) to the new platform, or the user wants to migrate the virtual machine of the first region to a completely new region. At this time, since there is no user usage record in the second data center, the topology identification unit 132 can only send an instance query request to the first cloud platform 100 where the first data center 110 is located, receive the first query result returned by the first cloud platform 100, determine the network connection relationship and network service information between multiple instances carrying user services based on the first query result, and generate topology information of multiple instances.
[0099] It can be understood that this application queries the cloud platform for user records and then generates topology information, which not only does not require the installation of an agent and improves the user experience, but also because the user's creation and association operations in the platform are recorded by the database, the network topology and service information can be obtained through querying without omissions. The topology information finally obtained has complete coverage, thereby improving the success rate of resource migration.
[0100] The grouping determination unit 133 is configured to divide at least one target instance into multiple migration groups according to the topology information of the multiple instances generated by the topology identification unit 132 to obtain a grouping result.
[0101] In a specific implementation, each migration group includes multiple instances. Multiple instances within the same migration group will be migrated in the same batch. The group determination unit 133 can determine the migration group corresponding to each instance based on the grouping rules and the topology information of the multiple instances. The grouping rules are illustrated below with examples.
[0102] Optionally, the grouping rules may include: multiple instances within the same subnet correspond to the same migration group. It should be understood that if instances within the same subnet are not migrated in the same batch, the subnet's originally configured services will become unavailable. Therefore, grouping multiple instances at the subnet granularity ensures that instances within the same subnet are migrated in the same batch, avoiding the issue of migrated instances being unable to use the originally configured network services.
[0103] Optionally, the grouping rules may include: instances in multiple subnets associated with multi-network card virtual machines correspond to the same migration group. For example, the virtual machines in subnet 1 are VM11 to VM13, the virtual machines in subnet 2 are VM21 to VM23, and the virtual machines in subnet 3 are VM31 to VM33. Under normal circumstances, the virtual machines in subnet 1 can be divided into one migration group, the virtual machines in subnet 2 are divided into one migration group, and the virtual machines in subnet 3 are divided into one migration group. However, if three virtual network cards are associated with subnet 1, subnet 2, and subnet 3, then the virtual machines in subnets 1 to 3 need to be divided into one migration group. It should be understood that the above examples are for illustration only and are not specifically limited in this application.
[0104] Optionally, the grouping rules may include: when the public network address associated with the network service needs to remain unchanged, the instances in multiple subnets associated with the network service correspond to the same migration group. The network service here can be the basic network service mentioned above, such as NAT service, ELB service, VPN service, CDA service, etc. For example, when the public network address of the VPN service needs to remain unchanged, the virtual machines in subnet 1 and subnet 2 associated with the VPN can be divided into the same migration group, so that after the migration group is migrated in the same batch, the public network address of the VPN service remains unchanged. It should be understood that the above examples are for illustration only and are not specifically limited in this application.
[0105] Optionally, the grouping rules may include: if there are associations between multiple subnets, including but not limited to being each other's ELB service address subnets and / or backend member subnets, then these multiple subnets can be divided into the same migration group. For example, if Subnet 1 is the ELB service address subnet of Subnet 2, and Subnet 2 is the backend member subnet of Subnet 1, then Subnet 1 and Subnet 2 can be divided into the same migration group and resources can be migrated in the same migration batch. It should be understood that the above examples are for illustrative purposes only and are not specifically limited in this application.
[0106] It should be understood that the above-mentioned grouping rules are used for illustration purposes, and the present application may also include more types of grouping rules, which are not illustrated one by one here. It should be understood that the grouping rules may be determined by the cloud platform administrators based on the constraints when migrating resources on each cloud platform. The constraints are used to ensure that the instances after user resource migration can still use the originally configured network services.
[0107] It should be noted that there may be priority divisions between grouping rules. When different grouping rules lead to contradictory grouping results, for example, according to grouping rule 1, subnet 1 and subnet 2 should be divided into the same migration group, and according to grouping rule 2, subnet 1 and subnet 2 should be divided into different migration groups, then the final grouping result can be determined based on the priority of the grouping rule. For example, if the priority of grouping rule 2 is higher than that of grouping rule 1, then the final grouping result is that subnet 1 and subnet 2 are divided into different migration groups. Among them, the priority of the grouping rules can be determined by the cloud platform administrator based on the constraints and migration experience when migrating resources on each cloud platform, and this application does not make specific restrictions.
[0108] In one possible implementation, the grouping determination unit 133 can also input the topological information of multiple instances into the grouping model to obtain the migration group corresponding to each instance, wherein the grouping model can be an inference statistical model that records multiple grouping rules, or it can be a model obtained after training the AI model using a sample set. The sample set here may include multiple groups of input samples and corresponding multiple groups of output samples, wherein the input samples include known topological information, and the corresponding output samples include known grouping results, and the known grouping results satisfy the grouping rules. The above-mentioned AI model may include but is not limited to convolutional neural network (CNN), deep neural network (DNN), recurrent neural network (RNN), region-based convolutionnal neural network (RCNN), single-stage target detection network (you only look once, YOLO), etc., and this application does not make specific limitations.
[0109] The sequence determination unit 134 is configured to determine the migration sequence for each migration group based on the topology information and migration groups of the multiple instances generated by the topology identification unit 132. It should be understood that dependencies may exist between migration groups. For example, migration group A may need to prioritize resource migration over migration group B, otherwise user services may be interrupted. Alternatively, instances in migration groups A and B may need to be reconfigured after user resource migration. Therefore, a reasonable migration sequence can ensure that instances of associated cloud services can operate normally after resource migration, minimizing the impact on user services during the resource migration process.
[0110] Optionally, the group determination unit 133 may determine the migration order for each migration group based on a sequence rule and topology information of multiple instances. The number of sequence rules may be one or more, and each sequence rule may be determined by cloud platform administrators based on constraints and migration experience when performing resource migration on each cloud platform. These constraints and migration experience are used to ensure that instances after resource migration can still use the originally configured network services. This application does not impose any specific restrictions.
[0111] Optionally, when there are multiple sequence rules, different sequence rules have different priorities. A sequence rule with a higher priority can override a sequence rule with a lower priority. In other words, if the migration order generated by a sequence rule with a higher priority is different from the migration order generated by a sequence rule with a lower priority, the migration order of the multiple migration groups is determined according to the sequence rule with a higher priority. The priority of each sequence rule can also be determined by the administrator based on the constraints and migration experience of each cloud platform when migrating resources. The constraints and migration experience are used to ensure that instances after resource migration can still use the originally configured network services.
[0112] In a specific implementation, the priority of the sequence rule can be divided into multiple levels, and one sequence rule corresponds to a priority level. The larger the priority level, the higher the priority of the sequence rule, or the smaller the priority level, the higher the priority of the sequence rule. This application does not make specific limitations. Of course, multiple sequence rules can also correspond to one priority level. For example, the priority of the sequence rule is divided into a strong constraint level and a weak constraint level. Multiple sequence rules correspond to the strong constraint level, and multiple sequence rules correspond to the weak constraint level. When determining the migration order of each migration group, the migration order can be further optimized according to the second priority sequence rule on the basis of ensuring that the migration order meets the first priority sequence rule.
[0113] For example, the following describes the sequence rule by taking an application scenario where the sequence rule priorities are divided into strong constraints and second priorities as an example.
[0114] Optionally, the order rules of the first priority may include: the migration group corresponding to the subnet where the ELB service address is located needs to migrate before the migration groups corresponding to other subnets of the ELB backend; if virtual machines of different VPCs mount the same shared volume, the migration groups corresponding to the VPCs are migrated in adjacent batches; the migration groups corresponding to VPCs with peer connection relationships are migrated in adjacent batches; if virtual machines of different VPCs use the same security group, the migration groups corresponding to these VPCs are migrated in adjacent batches.
[0115] Optionally, the order rules for the second priority may include: instances of the same tenant are migrated in adjacent batches; VPCs with simple structures are prioritized for migration, such as VPCs without peer connections, VPCs that do not involve or involve fewer L4-L7 services, etc.; subnets with simple structures are prioritized for migration, such as subnets with a small number of virtual machines, subnets that do not involve or involve fewer L4-L7 services, etc.
[0116] It should be understood that the above examples are for illustrative purposes only, and this application may also include more types of sequence rules, which are not specifically limited in this application. This application combines the topology information and sequence rules of multiple instances to determine the reasonable grouping results of multiple instances and the migration order of each migration group. It not only takes into account the network connection relationship between each instance, but also combines the network service information associated with each instance. This planned migration order can reduce the impact of the migration process on the business and improve the user experience.
[0117] In one possible implementation, the sequence determination unit 134 can also input the topological information of multiple instances into a sequence model to obtain the migration order of each migration group, wherein the sequence model can be an inference statistical model that records multiple sequence rules, or it can be a model obtained after training the AI model using a sample set. The sample set here may include multiple groups of input samples and corresponding multiple groups of output samples, wherein the input samples include known topological information and known grouping results, and the corresponding output samples include a known migration order, which satisfies the sequence rules. The above-mentioned AI model may include but is not limited to CNN, DNN, RNN, RCNN, etc., and this application does not make specific limitations.
[0118] The migration unit 135 is configured to perform resource migration on multiple instances according to the migration order of the migration group to obtain a migration result.
[0119] For example, if migration group 1 includes VM1-VM10, migration group 2 includes VM11-VM20, and migration group 3 includes VM21-VN30, and the migration order is migration group 3 - migration group 1 - migration group 2, then when performing resource migration, VM21-VN30 will be migrated first, followed by VM1-VM10, and finally VM11-VM20. It should be understood that the above examples are for illustrative purposes only and are not intended to be limiting in this application.
[0120] In summary, the present application provides a resource migration system. When a user requests to migrate at least one target instance in a first data center to a second data center, the system can first receive a migration request, which includes instance information of the at least one target instance. Then, based on the instance information, the system obtains the network connection relationship and network service information between multiple instances of the user in the first data center and the second data center. The network service information includes information about the virtual network units where the multiple instances are located and information about the basic network services used by the multiple instances. Finally, based on the network connection relationship and network service information, the system migrates at least one target instance from the first data center to the second data center. In this way, when performing resource migration, the user does not need to install an agent for each instance in advance to achieve resource migration, simplifying the operational steps of resource migration and improving the user experience. Moreover, when migrating resources, not only the network connection relationship between each instance is taken into consideration, but also the network service information associated with each instance is combined, thereby reducing the impact of the migration process on the business and improving the user experience.
[0121] FIG4 is a schematic flow chart of the steps of a resource migration method provided by the present application. The resource migration method can be applied to the resource migration system 130 shown in FIG1 to FIG3 . As shown in FIG4 , the resource migration method may include the following steps:
[0122] S401: The user terminal 140 sends a migration request to the resource migration system 130. This step can be implemented by the acquisition unit 131 in the embodiment of FIG3.
[0123] Optionally, the migration request may carry instance information of at least one target instance, wherein the at least one target instance is a plurality of instances requested by the user to be migrated from the first data center to the second data center, and the instance may include any one of a virtual machine, a physical machine, and a container. The instance information may include an instance identifier, which may be a unique string, specifically a device feature code of the instance, which is a unique code used by the cloud platform to distinguish cloud application instances. This application does not limit the specific form of the device identifier. The instance information may also include other information that can be used to determine the identity of the instance, such as the instance address and the instance name, which is not specifically limited in this application.
[0124] Optionally, the migration request may include user information, such as the user's account name, nickname, token, etc. This user information can be used to obtain instances and network services created and associated by the user within the platform. The above examples are for illustrative purposes only, and this application does not limit the specific content of the user information.
[0125] It should be noted that the above-mentioned user can be a single user or a joint user including multiple actual users, such as an enterprise user. The enterprise user can be associated with multiple tenants, and each tenant can be an enterprise employee who actually uses the cloud service. Therefore, user information may include information of multiple tenants.
[0126] S402A: The resource migration system 130 sends a first instance query request to the first cloud platform 100. This step can be implemented by the topology identification unit 132 in the embodiment of FIG3 .
[0127] In a specific implementation, the first instance query request may include a query API, which is used to query the network connection relationship between multiple instances and the network service information used. It should be understood that when a user creates an instance, the database of each cloud platform will record the instance information of the instance created by the user. When the user associates multiple instances, the database of the cloud platform will also record the network connection relationship and network service information between the instances. Therefore, a query API can be sent to the cloud platform to collect the instance information of the instances created by the user in each cloud platform, the virtual network unit where each instance is located, and the detailed information of the basic network services used by each instance, so as to construct the user's virtual network topology on the cloud and obtain the topology information.
[0128] Optionally, if the migration request does not carry the instance information of the target instance, the query API in the above-mentioned first instance query request may include user information, so that the first cloud platform can query the instance information of multiple first instances associated with the user in the platform based on the user information, and then query the first network connection relationship and first network service information between the multiple first instances.
[0129] Optionally, if the migration request carries instance information of the target instance, the query API in the above-mentioned first instance query request may include the above-mentioned instance information, so that the first cloud platform can query the instance information of multiple first instances associated with the target instance based on the instance information, and then query the first network connection relationship and first network service information between the multiple first instances.
[0130] It should be noted that with the continuous development of multi-cloud architecture, query platforms have been opened between various cloud platforms, making it convenient for users to query activated instances from a unified entrance. Therefore, you can determine the query API of each cloud platform according to the interface description provided by each cloud platform and obtain the instance query request corresponding to each cloud platform.
[0131] S402B: The resource migration system 130 sends a second instance query request to the second cloud platform 200. This step can be implemented by the topology identification unit 132 in the embodiment of FIG3 .
[0132] It should be understood that the description of the second instance query request may refer to the description of the first instance query request in step S402A, and will not be repeated here.
[0133] Optionally, the above step S402A and step S402B may be executed simultaneously or sequentially, which is not specifically limited in this application.
[0134] Optionally, when the first data center 110 and the second data center 120 belong to different cloud platforms and the resource migration system 130 is deployed on the second cloud platform, that is, in the application scenario described in the embodiment of Figure 4, step S402B can be executed first, and the second instance query request carries user information, and then the instance information of multiple second instances in the second cloud platform is queried based on the user information, and then the second network connection relationship and the second network service information between the multiple second instances are determined, and then step S402A is executed to send a first instance query request to the first cloud platform, and the first instance query request carries the instance information of the above-mentioned multiple second instances, and the instance information of multiple first instances associated with the multiple second instances in the first cloud platform is queried based on the instance information of the second instance, and then the first network connection relationship and the first network service information between the multiple first instances are determined.
[0135] Optionally, steps S402A and S402B may be performed simultaneously, wherein both the first instance query request and the second instance query request include instance information of the target instance. Each cloud platform may query instance information of multiple first instances and multiple second instances associated with the target instance, thereby determining the first network connection relationship and first network service information between the multiple first instances, and the second network connection relationship and second network service information between the multiple second instances. This application does not specifically limit this. The instance information of the target instance may be carried in the migration request or may be selected by the user after all instances are displayed to the user. For details, please refer to the description in step S402A, which will not be repeated here.
[0136] Optionally, when the first data center 110 and the second data center belong to the same cloud platform, instance information of multiple instances created on the cloud platform can be queried according to user information in the migration request, thereby obtaining topology information between the multiple instances.
[0137] S403A: The first cloud platform 100 sends the first query result to the resource migration system 130 .
[0138] The first query result includes the first network connection relationship and the first network service information between the plurality of first instances. For a detailed description, please refer to step S402A and step S402B, which will not be repeated here.
[0139] S403B: The second cloud platform 200 sends the second query result to the resource migration system 130 .
[0140] The second query result includes the second network connection relationship and the second network service information between the plurality of second instances. For detailed description, please refer to step S402A and step S402B, which will not be repeated here.
[0141] S404: The resource migration system 130 determines the topology information of the multiple instances based on the first query result and the second query result. This step can be implemented by the topology identification unit 132 in the embodiment of FIG3 .
[0142] Optionally, the topology information can be in the form of a graph that draws out the network connection relationship between each instance and the network service information associated with each instance, such as the virtual network unit where the instance is located, the basic network service used by the instance, etc. The topology information can also be other ways to describe the above-mentioned network connection relationship and network service information, such as recording the virtual network unit where each virtual machine is located, the basic network service used by the instance, other virtual machines connected to it, etc. This application does not make specific limitations.
[0143] In a specific implementation, since the first query result includes topology information of multiple first instances and the second query result includes topology information of multiple second instances, the topology information between the multiple instances can be obtained by combining the first query result and the second query result.
[0144] Among them, the topological relationship includes the network connection relationship and network service information between multiple instances. The multiple instances here can be multiple instances associated with the target instance, or all instances created and associated by the user, which is not specifically limited in this application. The network connection relationship includes the communication connection relationship of the network between multiple instances. For example, the network connection relationship may include: virtual machine VM1 is connected to virtual machine VM2, virtual machine VM2 is connected to virtual machine VM3, and so on. The network service information includes the basic network services and virtual network units associated with multiple instances, wherein the basic network services may include but are not limited to NAT services, ELB services, VPN services, CDA services, etc., and the virtual network units may include but are not limited to VPCs, subnets, peer connections, etc., which are not specifically limited in this application. For example, the network service information may include: virtual machines VM1 and VM2 belong to the same VPN, virtual machine VM1 belongs to subnet 1, virtual machine VM2 belongs to subnet 2, and the VPC2 where virtual machine VM3 is located and the VPC1 where virtual machine VM1 is located are in a peer connection relationship. The above examples are for illustration only and are not specifically limited in this application.
[0145] Optionally, if the first data center 110 does not provide a query platform, for example, the first data center 110 is a traditional data center, then the resource migration system 130 can provide an interface to the user, which is used to obtain the first query result input by the user, which may specifically include the first network connection relationship and first network service information between multiple first instances created and associated by the user in the first data center 110.
[0146] Optionally, if the second data center has no user-created instances and no user-associated network services, for example, the user uses the second cloud platform 200 for the first time and needs to migrate the virtual machine of the old platform (first cloud platform 100) to the new platform, or the user wants to migrate the virtual machine of the first region to a completely new region. At this time, since there is no user usage record in the second data center, it can only send an instance query request to the first cloud platform 100 where the first data center 110 is located, receive the first query result returned by the first cloud platform 100, determine the network connection relationship and network service information between multiple instances, and generate topology information of multiple instances.
[0147] It can be understood that this application obtains query results by sending a query API to the cloud platform and then generates topology information. This not only does not require the installation of an agent, thereby improving the user experience, but also because the user's creation and association operations in the platform are recorded by the database, the network topology and service information obtained through querying will not be missed, and the topology information finally obtained will have complete coverage, thereby improving the success rate of resource migration.
[0148] S405: The resource migration system 130 divides the multiple instances into multiple migration groups according to the topology information and the grouping rule to obtain a grouping result. This step can be implemented by the grouping determination unit 133 in the embodiment of FIG3 .
[0149] Optionally, the grouping rules may include: multiple instances within the same subnet correspond to the same migration group. It should be understood that if instances within the same subnet are not migrated in the same batch, the subnet's originally configured services will become unavailable. Therefore, grouping multiple instances at the subnet granularity ensures that instances within the same subnet are migrated in the same batch, avoiding the issue of migrated instances being unable to use the originally configured network services.
[0150] Optionally, the grouping rules may include: instances in multiple subnets associated with multi-network card virtual machines correspond to the same migration group. For example, the virtual machines in subnet 1 are VM11 to VM13, the virtual machines in subnet 2 are VM21 to VM23, and the virtual machines in subnet 3 are VM31 to VM33. Under normal circumstances, the virtual machines in subnet 1 can be divided into one migration group, the virtual machines in subnet 2 are divided into one migration group, and the virtual machines in subnet 3 are divided into one migration group. However, if three virtual network cards are associated with subnet 1, subnet 2, and subnet 3, then the virtual machines in subnets 1 to 3 need to be divided into one migration group. It should be understood that the above examples are for illustration only and are not specifically limited in this application.
[0151] Optionally, the grouping rules may include: when the public network address associated with the network service needs to remain unchanged, the instances in multiple subnets associated with the network service correspond to the same migration group. The network service here can be the basic network service mentioned above, such as NAT service, ELB service, VPN service, CDA service, etc. For example, when the public network address of the VPN service needs to remain unchanged, the virtual machines in subnet 1 and subnet 2 associated with the VPN can be divided into the same migration group, so that after the migration group is migrated in the same batch, the public network address of the VPN service remains unchanged. It should be understood that the above examples are for illustration only and are not specifically limited in this application.
[0152] Optionally, the grouping rules may include: if there are associations between multiple subnets, including but not limited to being each other's ELB service address subnets and / or backend member subnets, then these multiple subnets can be divided into the same migration group. For example, if Subnet 1 is the ELB service address subnet of Subnet 2, and Subnet 2 is the backend member subnet of Subnet 1, then Subnet 1 and Subnet 2 can be divided into the same migration group and resources can be migrated in the same migration batch. It should be understood that the above examples are for illustrative purposes only and are not specifically limited in this application.
[0153] It should be understood that the above-mentioned grouping rules are used for illustration purposes only, and the present application may also include more types of grouping rules, which are not illustrated one by one here. It should be understood that the grouping rules may be determined by the cloud platform administrators based on the constraints when migrating resources on each cloud platform. The constraints are used to ensure that the instances after user resource migration can still use the originally configured network services.
[0154] It should be noted that there may be priority divisions between grouping rules. When different grouping rules lead to contradictory grouping results, for example, according to grouping rule 1, subnet 1 and subnet 2 should be divided into the same migration group, and according to grouping rule 2, subnet 1 and subnet 2 should be divided into different migration groups, then the final grouping result can be determined based on the priority of the grouping rule. For example, if the priority of grouping rule 2 is higher than that of grouping rule 1, then the final grouping result is that subnet 1 and subnet 2 are divided into different migration groups. Among them, the priority of the grouping rules can be determined by the cloud platform administrator based on the constraints and migration experience when migrating resources on each cloud platform, and this application does not make specific restrictions.
[0155] In one possible implementation, the topological information of multiple instances can also be input into the grouping model to obtain the migration group corresponding to each instance, wherein the grouping model can be an inference statistical model that records multiple grouping rules, or it can be a model obtained after training the AI model using a sample set. The sample set here may include multiple groups of input samples and corresponding multiple groups of output samples, wherein the input samples include known topological information, and the corresponding output samples include known grouping results, which satisfy the grouping rules. The above-mentioned AI models may include but are not limited to CNN, DNN, RNN, RCNN, etc., and this application does not make specific limitations.
[0156] S406: The resource migration system 130 determines the migration order of each migration group based on the topology information and the order rule. This step can be implemented by the order determination unit 134 in the embodiment of FIG3 .
[0157] It should be understood that there may be dependencies between the various migration groups. For example, migration group A needs to take precedence over migration group B in resource migration, otherwise user business will be interrupted. Alternatively, after user resources are migrated, the instances in migration group A and migration group B need to be reconfigured. Therefore, a reasonable migration order can ensure that the instances of the associated cloud services can operate normally after resource migration, reducing the impact on user business during the resource migration process.
[0158] Optionally, the number of sequence rules can be one or more, and each sequence rule can be determined by the cloud platform administrator based on the constraints and migration experience when migrating resources on each cloud platform. The constraints and migration experience are used to ensure that the instances after resource migration can still use the originally configured network services. This application does not make specific limitations.
[0159] Optionally, when there are multiple sequence rules, different sequence rules have different priorities. A sequence rule with a higher priority can override a sequence rule with a lower priority. In other words, if the migration order generated by a sequence rule with a higher priority is different from the migration order generated by a sequence rule with a lower priority, the migration order of the multiple migration groups is determined according to the sequence rule with a higher priority. The priority of each sequence rule can also be determined by the administrator based on the constraints and migration experience of each cloud platform when migrating resources. The constraints and migration experience are used to ensure that instances after resource migration can still use the originally configured network services.
[0160] In a specific implementation, the priority of the sequence rule can be divided into multiple levels, and one sequence rule corresponds to a priority level. The larger the priority level, the higher the priority of the sequence rule, or the smaller the priority level, the higher the priority of the sequence rule. This application does not make specific limitations. Of course, multiple sequence rules can also correspond to one priority level. For example, the priority of the sequence rule is divided into a strong constraint level and a weak constraint level. Multiple sequence rules correspond to the strong constraint level, and multiple sequence rules correspond to the weak constraint level. When determining the migration order of each migration group, the migration order can be further optimized according to the second priority sequence rule on the basis of ensuring that the migration order meets the first priority sequence rule.
[0161] For example, the following describes the sequence rule by taking an application scenario where the sequence rule priorities are divided into strong constraints and second priorities as an example.
[0162] Optionally, the order rules of the first priority may include: the migration group corresponding to the subnet where the ELB service address is located needs to migrate before the migration groups corresponding to other subnets of the ELB backend; if virtual machines of different VPCs mount the same shared volume, the migration groups corresponding to the VPCs are migrated in adjacent batches; the migration groups corresponding to VPCs with peer connection relationships are migrated in adjacent batches; if virtual machines of different VPCs use the same security group, the migration groups corresponding to these VPCs are migrated in adjacent batches.
[0163] Optionally, the order rules for the second priority may include: instances of the same tenant are migrated in adjacent batches; VPCs with simple structures are prioritized for migration, such as VPCs without peer connections, VPCs that do not involve or involve fewer L4-L7 services, etc.; subnets with simple structures are prioritized for migration, such as subnets with a small number of virtual machines, subnets that do not involve or involve fewer L4-L7 services, etc.
[0164] It should be understood that the above examples are for illustrative purposes only, and this application may also include more types of sequence rules, which are not specifically limited in this application. This application combines the topology information and sequence rules of multiple instances to determine the reasonable grouping results of multiple instances and the migration order of each migration group. It not only takes into account the network connection relationship between each instance, but also combines the network service information associated with each instance. This planned migration order can reduce the impact of the migration process on the business and improve the user experience.
[0165] In one possible implementation, the topological information of multiple instances can also be input into a sequential model to obtain the migration order of each migration group, wherein the sequential model can be an inference statistical model that records multiple sequential rules, or it can be a model obtained after training the AI model using a sample set. The sample set here may include multiple groups of input samples and corresponding multiple groups of output samples, wherein the input samples include known topological information and known grouping results, and the corresponding output samples include a known migration order, which satisfies the sequential rules. The above-mentioned AI model may include but is not limited to CNN, DNN, RNN, RCNN, etc., and this application does not make specific limitations.
[0166] S407: The resource migration system 130 performs resource migration according to the migration sequence. This step can be implemented by the migration unit 135 in the embodiment of FIG3 .
[0167] For example, if migration group 1 includes VM1-VM10, migration group 2 includes VM11-VM20, and migration group 3 includes VM21-VN30, and the migration order is migration group 3 - migration group 1 - migration group 2, then when performing resource migration, VM21-VN30 will be migrated first, followed by VM1-VM10, and finally VM11-VM20. It should be understood that the above examples are for illustrative purposes only and are not intended to be limiting in this application.
[0168] S408: The resource migration system 130 displays the migration order and grouping results to the user.
[0169] In short, the resource migration system 130 can display the grouping results and migration sequence generated in steps S405 and S406 to the user. After the user confirms the result, the resource migration is performed according to the migration sequence. Of course, multiple migration sequences and multiple grouping results can also be displayed to the user, and the user can select the desired grouping result and migration sequence from them before performing resource migration. This application does not specifically limit this.
[0170] In order to make the present application more understandable, the resource migration method provided in the present application is illustrated below with reference to the application scenario shown in FIG5 .
[0171] As shown in Figure 5, Figure 5 is an example diagram of topology information in a resource migration system provided by this application. In this application scenario, there is a peer-to-peer connection relationship between VPC1 and VPC2, where VM1 to VM3 are virtual machines within VPC1, VM1 is a virtual machine within subnet 1, and VM2 is a virtual machine within subnet 2. VM3's virtual machine has two network cards, network card 1 is connected to subnet 1, and network card 2 is connected to subnet 2. VM3 spans subnet 1 and subnet 2. VM1 uses VPN service, and VM2 uses cloud dedicated line service. In addition, the public network address of NAT service and VPN service needs to remain unchanged after resource migration.
[0172] VM4 through VM6 are VMs in VPC2. VM4 is in subnet 3, VM5 is in subnet 4, and VM6 is in subnet 5. VM4 and VM5 use the NAT service, while VM5 and VM6 use the ELB service. Subnet 4 is the service address of the ELB service, and the address of VM6 is the backend subnet of the ELB service. VM6, VM1, VM2, and VM3 are VMs used by Tenant 1, while VM4 and VM5 are used by Tenant 2. Tenants 1 and 2 are associated with the same enterprise user.
[0173] Figure 6 is a schematic diagram of the step flow for determining the migration order in the resource migration method provided in the present application. Figure 6 takes the topology information shown in Figure 5 as an example to illustrate the step flow for dividing the migration groups and determining the migration order. In the application scenario shown in Figure 5, when determining the migration group of the instance, step S405 is executed. According to grouping rule 1: multiple instances in the same subnet correspond to the same migration group, and 5 subnets can be divided into 5 migration groups; then according to grouping rule 2: instances in multiple subnets associated with multi-network card virtual machines correspond to the same migration group. Since the two network cards of VM3 are associated with subnet 1 and subnet 2, subnet 1 and subnet 2 can be divided into the same migration group, so VM1, VM2 and VM3 are divided into migration group 1; then according to grouping rule 3: when the public network address associated with the network service needs to remain unchanged before and after resource migration, instances in multiple subnets using the network service correspond to the same migration group, and subnet 3 and subnet 4 using NAT service can be divided into one migration group. Therefore, the final grouping result of the application scenario shown in Figure 5 is that migration group 1 includes VM1 to VM3, migration group 2 includes VM4 and VM5, and migration group 3 includes VM6.
[0174] When determining the order of the migration groups, step S406 is executed. First, according to the first priority order rule 1, the migration order of the migration group corresponding to the subnet where the ELB service address is located is earlier than the migration groups corresponding to other subnets on the ELB backend. Since subnet 4 is the subnet where the ELB service address is located and subnet 5 is the subnet on the ELB backend, the migration order of migration group 2 corresponding to subnet 4 is earlier than the migration order of migration group 3 corresponding to subnet 5. Then, according to the first priority order rule 2, the migration order of migration groups corresponding to multiple subnets with a peer connection relationship is adjacent. VPC1 and VPC2 are in a peer connection relationship. Therefore, the migration order of migration group 1 and migration group 2 is adjacent, or the migration order of migration group 1 and migration group 3 is adjacent. The migration order determined based on the first priority order rule is: migration group 2 - migration group 3 - migration group 1, or migration group 1 - migration group 2 - migration group 3. For ease of understanding, Figure 6 only shows one migration order, and uses a short dashed line to indicate that the order of migration group 2 and migration group 3 is fixed, that is, migration group 2 migrates before migration group 3.
[0175] According to the second-priority order rule 1, the migration order of migration groups corresponding to instances of the same tenant is adjacent. VM6, VM1, VM2, and VM3 are virtual machines used by Tenant 1. Therefore, the migration order of Migration Group 1 and Migration Group 3 is adjacent. The final migration order is Migration Group 2 - Migration Group 3 - Migration Group 1. For ease of understanding, Figure 6 shows a long dashed line between Migration Group 3 and Migration Group 1, indicating that the migration order of Migration Group 3 and Migration Group 1 is adjacent.
[0176] It should be understood that FIG5 and FIG6 are used for illustration only and are not specifically limited in this application.
[0177] In summary, the present application provides a resource migration method. When a user requests to migrate at least one target instance in a first data center to a second data center, the resource migration system can first receive a migration request, which includes instance information of the at least one target instance. Then, based on the instance information, the network connection relationship and network service information between the user's multiple instances in the first data center and the second data center are obtained. The network service information includes information about the virtual network units where the multiple instances are located and information about the basic network services used by the multiple instances. Finally, based on the network connection relationship and network service information, the at least one target instance is migrated from the first data center to the second data center. In this way, when performing resource migration, the user does not need to install an agent for each instance in advance to achieve resource migration, simplifying the operational steps of resource migration and improving the user experience. Moreover, when migrating resources, not only the network connection relationship between each instance is taken into account, but also the network service information associated with each instance is combined, thereby reducing the impact of the migration process on the business and improving the user experience.
[0178] FIG7 is a schematic structural diagram of a computing device provided in the present application. The computing device 700 may be the resource migration system mentioned above.
[0179] Furthermore, the computing device 700 includes a processor 701, a storage unit 702, a storage medium 703 and a communication interface 704, wherein the processor 701, the storage unit 702, the storage medium 703 and the communication interface 704 communicate through a bus 705, and also communicate through other means such as wireless transmission.
[0180] Processor 701 is composed of multiple general-purpose processors, such as a central processing unit (CPU) or a combination of a CPU and a hardware chip. The hardware chip is an ASIC, a programmable logic device (PLD), or a combination thereof. The PLD is a programmable logic device (CPLD), an FPGA, a graphics interface card (GAL), or any combination thereof. Processor 701 executes various types of digitally stored instructions, such as software or firmware programs stored in storage unit 702, enabling computing device 700 to provide a wide variety of services.
[0181] In a specific implementation, as an embodiment, the processor 701 includes one or more CPUs, such as CPU0 and CPU1 shown in FIG. 7 .
[0182] In a specific implementation, as an embodiment, computing device 700 also includes multiple processors, such as processor 701 and processor 706 shown in FIG7 . Each of these processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). A processor here refers to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0183] The storage unit 702 is used to store program code and is controlled by the processor 701 to execute the processing steps of the resource migration system in any of the embodiments in Figures 1 to 7 above. The program code includes one or more software units. The above-mentioned one or more software units are the acquisition unit, topology identification unit, grouping determination unit, sequence determination unit and migration unit in the embodiment of Figure 3. Specifically, the acquisition unit is used to execute step S401 and optional steps in the embodiment of Figure 4, the topology identification unit is used to execute step S402A, step S402B, step S403A, step S403B, step S404 and optional steps, the grouping determination unit is used to execute step S405 and optional steps, the sequence determination unit is used to execute step S406 and optional steps, and the migration unit is used to execute step S407 and optional steps, which will not be repeated here.
[0184] The storage unit 702 includes a read-only memory and a random access memory, and provides instructions and data to the processor 701. The storage unit 702 also includes a non-volatile random access memory. The storage unit 702 is a volatile memory or a non-volatile memory, or includes both volatile and non-volatile memories. Among them, the non-volatile memory is a read-only memory (ROM), a programmable ROM (PROM), an erasable programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory. The volatile memory is a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are used, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronized dynamic random access memory (SLDRAM), and direct RAM bus RAM (DR RAM). A hard disk, a universal serial bus (USB), a flash memory, a secure digital memory card (SD card), a memory stick, etc., and a hard disk can be a hard disk drive (HDD), a solid state drive (SSD), a mechanical hard disk (HDD), etc., which is not specifically limited in this application.
[0185] Storage medium 703 is a carrier for storing data, such as a hard disk, a USB flash drive (universal serial bus), a flash memory, an SD card (secure digital memory card, SD card), a memory stick, etc. The hard disk can be a hard disk drive (HDD), a solid state drive (SSD), a mechanical hard disk (HDD), etc., and this application does not make specific restrictions. The data stored in storage medium 703 may include sequence rules and grouping rules. For details, please refer to the description of the two in the embodiment of Figure 3, which will not be repeated here.
[0186] The communication interface 704 is a wired interface (such as an Ethernet interface), an internal interface (such as a high-speed serial computer expansion bus (Peripheral Component Interconnect Express, PCIe) bus interface), a wired interface (such as an Ethernet interface) or a wireless interface (such as a cellular network interface or a wireless local area network interface) for communicating with other servers or units.
[0187] Bus 705 is a Peripheral Component Interconnect Express (PCIe) bus, an Extended Industry Standard Architecture (EISA) bus, a unified bus (UBus or UB), a Compute Express Link (CXL), or a Cache Coherent Interconnect for Accelerators (CCIX). Bus 705 is divided into an address bus, a data bus, and a control bus.
[0188] In addition to the data bus, the bus 705 also includes a power bus, a control bus, a status signal bus, etc. However, for the sake of clarity, various buses are labeled as bus 705 in the figure.
[0189] It should be noted that FIG7 is only one possible implementation of the embodiment of the present application. In actual applications, the computing device 700 may also include more or fewer components, which is not limited here. For matters not shown or described in the embodiment of the present application, please refer to the relevant description in the embodiments of FIG1 to FIG6 above, and will not be repeated here.
[0190] FIG8 is a schematic diagram of the structure of a computing device cluster provided by the present application, which includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.
[0191] As shown in Figure 8, the computing device cluster includes at least one computing device 800. The memory 803 in one or more computing devices 800 in the computing device cluster may store the same instructions for executing the resource migration method.
[0192] In some possible implementations, the memory 803 of one or more computing devices 800 in the computing device cluster may also store partial instructions for executing the resource migration method. In other words, the combination of one or more computing devices 800 can jointly execute the instructions for executing the resource migration method.
[0193] It should be noted that the memory 803 in different computing devices 800 in the computing device cluster can store different instructions, which are respectively used to execute part of the functions of the resource migration system. That is, the instructions stored in the memory 803 in different computing devices 800 can realize the functions of one or more units in the acquisition unit, the topology identification unit, the grouping determination unit, the order determination unit and the migration unit. Specifically, the acquisition unit is used to execute step S401 and the optional steps in the embodiment of Figure 4, the topology identification unit is used to execute step S402A, step S402B, step S403A, step S403B, step S404 and its optional steps, the grouping determination unit is used to execute step S405 and its optional steps, the order determination unit is used to execute step S406 and its optional steps, and the migration unit is used to execute step S407 and its optional steps, which will not be repeated here.
[0194] It should be noted that each computing device 800 may include a processor 801, a communication interface 802, a memory 803 and a bus 804, wherein the description of the processor 801 may refer to the description of the processor 701 and the processor 706 in the embodiment of Figure 7, the description of the communication interface 802 may refer to the description of the communication interface 704 in the embodiment of Figure 7, the description of the memory 803 may refer to the description of the storage unit 702 and the storage medium 703 in the embodiment of Figure 7, and the description of the bus 804 may refer to the description of the bus 705 in the embodiment of Figure 7, and will not be repeated here.
[0195] In some possible implementations, one or more computing devices in a computing device cluster may be connected via a network. The network may be a wide area network or a local area network, etc. FIG. 9 shows a possible implementation. FIG. 9 is another structural diagram of a computing device cluster provided by the present application. As shown in FIG. 9 , two computing devices 800A and 800B are connected via a network. Specifically, the connection to the network is made through a communication interface in each computing device. In this type of possible implementation, the memory 803 in the computing device 800A stores instructions for executing the functions of the acquisition unit and the topology identification unit. At the same time, the memory 803 in the computing device 800B stores instructions for executing the functions of the grouping determination unit, the sequence determination unit, and the migration unit.
[0196] It should be understood that the functionality of the computing device 800A shown in FIG9 may also be implemented by multiple computing devices 800. Similarly, the functionality of the computing device 800B may also be implemented by multiple computing devices 800.
[0197] It should be noted that the implementation method shown in Figure 9 may be an implementation method when the processing power of the computing device 800A is insufficient, or the storage space of the computing device 800A is insufficient, or an implementation method in other business scenarios, and this application does not make specific limitations.
[0198] The present application also provides another computing device cluster. The connection relationship between the computing devices in this computing device cluster can be similar to the connection relationship between the computing device clusters in Figures 8 and 9. However, the memory 803 in one or more computing devices 800 in this computing device cluster can store the same instructions for executing the resource apology method.
[0199] In some possible implementations, the memory 803 of one or more computing devices 800 in the computing device cluster may also store partial instructions for executing the resource migration method. In other words, the combination of one or more computing devices 800 can jointly execute the instructions for executing the resource migration method.
[0200] Embodiments of the present application also provide a computer program product including instructions. The computer program product may be software or a program product including instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device executes the resource migration method.
[0201] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center that contains one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the resource migration method, or instruct the computing device to execute the resource migration method.
[0202] The above embodiments can be implemented in whole or in part through software, hardware, firmware, or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes multiple computer instructions. When the computer program instructions are loaded or executed on a computer, the process or function according to the embodiments of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or server cluster to another website, computer, server, or server cluster via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage node such as a server or server cluster that contains a collection of multiple available media. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a high-density digital video disc (DVD), or a semiconductor medium. The semiconductor medium may be an SSD.
[0203] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent repairs or replacements within the technical scope disclosed in the present invention, and such repairs or replacements should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A resource migration method, characterized in that: The method is applied to a resource migration system, wherein the resource migration system establishes communication connections with a first data center and a second data center respectively, and the method comprises: receiving a migration request, the migration request including instance information of at least one target instance that a user requests to migrate to the second data center, the at least one target instance being an instance in the first data center; According to the instance information, obtain network connection relationships and network service information between multiple instances of the user in the first data center and the second data center, wherein the network service information includes information about virtual network units where the multiple instances are located and information about basic network services used by the multiple instances; The at least one target instance is migrated from the first data center to the second data center according to the network connection relationship and the network service information.
2. The method according to claim 1, characterized in that The network connection relationship and the network service information are determined after sending an instance query request to the cloud platform where the first data center is located and the cloud platform where the second data center is located, the instance query request includes instance information of the at least one target instance, and the instance query request is used to query the network connection relationship and network service information between the multiple instances associated with the at least one target instance.
3. The method according to claim 1 or 2, characterized in that: Migrating the at least one target instance from the first data center to the second data center according to the network connection relationship and the network service information includes: According to the network connection relationship and the network service information, the at least one target instance is divided into multiple migration groups according to a grouping rule to obtain a grouping result, and a migration order of the multiple migration groups is determined according to a sequence rule; According to the grouping result and the migration order, the at least one target instance is migrated from the first data center to the second data center in batches.
4. The method according to claim 3, characterized in that The grouping rules include one or more of the following rules: Multiple instances in the same subnet correspond to the same migration group; Instances in multiple subnets associated with a multi-NIC VM correspond to the same migration group; When the public network address associated with a network service needs to remain unchanged before and after resource migration, instances in multiple subnets using the network service correspond to the same migration group; The associated multiple subnets correspond to the same migration group, wherein any subnet among the associated multiple subnets is a service address subnet or a backend member subnet of other subnets.
5. The method according to claim 3 or 4, characterized in that: The sequence rules include a first priority sequence rule and a second priority sequence rule, wherein when the migration sequence generated by the first priority sequence rule is different from the migration sequence generated by the second priority sequence rule, the migration sequence of the multiple migration groups is determined according to the first priority sequence rule.
6. The method according to claim 5, characterized in that The first priority order rule includes one or more of the following rules: The migration order of the migration group corresponding to the subnet where the ELB service address is located is earlier than the migration groups corresponding to other subnets of the ELB backend; The migration order of the migration groups corresponding to multiple subnets that mount the same shared volume is adjacent; The migration order of the migration groups corresponding to multiple subnets with a peer connection relationship is adjacent; The migration order of migration groups corresponding to multiple subnets using the same security group is adjacent.
7. The method according to claim 5 or 6, characterized in that: The second priority order rule includes one or more of the following rules: The migration order of the migration groups corresponding to the instances of the same tenant is adjacent; The migration group corresponding to the subnet whose structural complexity is lower than the threshold will be given priority in resource migration; The migration groups corresponding to the subnets contained in the VPC with a structural complexity lower than the threshold are given priority for resource migration.
8. The method according to any one of claims 1 to 7, characterized in that: The virtual network unit includes one or more of VPC, subnet, and peer connection, and the basic network service includes one or more of network address translation NAT service, elastic load balancing ELB service, virtual private network VPN service, and cloud dedicated line service.
9. The method according to any one of claims 1 to 8, characterized in that: The first data center and the second data center belong to different cloud platforms respectively; The resource migration system is a server in the cloud platform where the first data center is located, or the resource migration system is a server in the cloud platform where the second data center is located.
10. A resource migration system, characterized in that: The resource migration system establishes communication connections with the first data center and the second data center respectively, and the resource migration system includes: an acquiring unit, configured to receive a migration request, wherein the migration request includes instance information of at least one target instance that a user requests to migrate to the second data center, wherein the at least one target instance is an instance in the first data center; a determining unit, configured to obtain, according to the instance information, network connection relationships and network service information between the multiple instances of the user in the first data center and the second data center, wherein the network service information includes information about virtual network units where the multiple instances are located and information about basic network services used by the multiple instances; A migration unit is used to migrate the at least one target instance from the first data center to the second data center according to the network connection relationship and the network service information.
11. The system according to claim 10, characterized in that The network connection relationship and the network service information are determined after sending an instance query request to the cloud platform where the first data center is located and the cloud platform where the second data center is located, the instance query request includes instance information of the at least one target instance, and the instance query request is used to query the network connection relationship and network service information between the multiple instances associated with the at least one target instance.
12. The system according to claim 10 or 11, characterized in that The determining unit is configured to divide the at least one target instance into a plurality of migration groups according to a grouping rule based on the network connection relationship and the network service information to obtain a grouping result, and determine a migration order of the plurality of migration groups according to a sequence rule; The determining unit is configured to migrate the at least one target instance from the first data center to the second data center in batches according to the grouping result and the migration order.
13. The system according to claim 12, characterized in that The grouping rules include one or more of the following rules: Multiple instances in the same subnet correspond to the same migration group; Instances in multiple subnets associated with a multi-NIC VM correspond to the same migration group; When the public network address associated with a network service needs to remain unchanged before and after resource migration, instances in multiple subnets using the network service correspond to the same migration group; The associated multiple subnets correspond to the same migration group, wherein any subnet among the associated multiple subnets is a service address subnet or a backend member subnet of other subnets.
14. The system according to claim 12 or 13, characterized in that The sequence rules include a first priority sequence rule and a second priority sequence rule, wherein when the migration sequence generated by the first priority sequence rule is different from the migration sequence generated by the second priority sequence rule, the migration sequence of the multiple migration groups is determined according to the first priority sequence rule.
15. The system according to claim 14, characterized in that The first priority order rule includes one or more of the following rules: The migration order of the migration group corresponding to the subnet where the ELB service address is located is earlier than the migration groups corresponding to other subnets of the ELB backend; The migration order of the migration groups corresponding to multiple subnets that mount the same shared volume is adjacent; The migration order of the migration groups corresponding to multiple subnets with a peer connection relationship is adjacent; The migration order of migration groups corresponding to multiple subnets using the same security group is adjacent.
16. The system according to claim 14 or 15, characterized in that The second priority order rule includes one or more of the following rules: The migration order of the migration groups corresponding to the instances of the same tenant is adjacent; The migration group corresponding to the subnet whose structural complexity is lower than the threshold will be given priority in resource migration; The migration groups corresponding to the subnets contained in the VPC with a structural complexity lower than the threshold are given priority for resource migration.
17. The system according to any one of claims 10 to 16, characterized in that: The virtual network unit includes one or more of VPC, subnet, and peer connection, and the basic network service includes one or more of network address translation NAT service, elastic load balancing ELB service, virtual private network VPN service, and cloud dedicated line service.
18. The system according to any one of claims 10 to 17, characterized in that: The first data center and the second data center belong to different cloud platforms respectively; The resource migration system is a server in the cloud platform where the first data center is located, or the resource migration system is a server in the cloud platform where the second data center is located.
19. A computing device cluster, characterized in that: The method comprises at least one computing device, each of which comprises a processor and a memory, and the processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster implements the method according to any one of claims 1 to 9.
20. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and the instructions are executed by a computing device cluster to implement the method according to any one of claims 1 to 9.
21. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a computing device cluster, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Virtual machine dynamic migration method and device thereof and storage medium
CN114048006A
Resource management method, device and equipment
CN115202833A
Virtual machine instance migration using a hypervisor
US10404579B1
Performing server migration and dependent server discovery in parallel
US20160335105A1
Auto-Calculation of Recovery Plans for Disaster Recovery Solutions
US20190034297A1
