Instance migration method and apparatus, and device, storage medium and program product

By creating target instances in the target physical machine, the problem of high disaster recovery complexity among the existing technology across the Availability Zone is solved, and business continuity and low-complexity disaster recovery solutions are achieved without the need for two-way data synchronization.

WO2025163418A1PCT designated stage Publication Date: 2025-08-07CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/IB2025/050508
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-31
Filing Date
2025-01-17
Publication Date
2025-08-07

AI Technical Summary

Technical Problem

In the prior art, the cross-availability zone disaster recovery method requires maintenance of two sets of business systems with the same functions, resulting in high disaster recovery complexity and business data need to be synchronized in both directions, increasing the complexity of system maintenance.

Method used

By determining the target physical machine corresponding to the target instance, and based on the reserved resources and network configuration information of the target physical machine, the target instance is created in the target physical machine to realize instance migration, reducing the dependence on the source physical machine and reducing the need for bidirectional data synchronization.

Benefits of technology

There is no need to maintain two business systems with the same functions at the same time, reducing disaster recovery complexity and ensuring business continuity through real-time data synchronization and rapid instance migration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure IB2025050508_07082025_PF_FP_ABST
    Figure IB2025050508_07082025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present disclosure are an instance migration method and apparatus, and a device, a storage medium and a program product. The method comprises: determining a target physical machine corresponding to a target instance to be migrated, wherein the target instance is currently located in a source physical machine, and the source physical machine is used for periodically synchronizing, to the target physical machine, data generated by the target instance in the source physical machine; determining target network configuration information, in the target physical machine, of the target instance; and on the basis of a reserved resource, which corresponds to the target instance, in the target physical machine, and the target network configuration information, creating a target instance in the target physical machine, wherein the target instance in the target physical machine is used for replacing the target instance in the source physical machine to perform service processing. The method of the present disclosure reduces the disaster tolerance complexity.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Instance Migration Method, Apparatus, Device, Storage Medium, and Program Product This disclosure claims priority to Chinese patent application number 202410139833.X, filed with the China Patent Office on January 31, 2024, entitled "Instance Migration Method, Apparatus, Device, Storage Medium, and Program Product," the entire contents of which are incorporated herein by reference. Technical Field This disclosure relates to the field of computers, and more particularly to an instance migration method, apparatus, device, storage medium, and program product. Background: Cross-availability zone (AZ) disaster recovery can ensure business continuity and improve business reliability. Currently, users can maintain a business system in two AZs, each with the same functionality. In other words, users can maintain two identical business systems. If either business system unexpectedly stops functioning, service requests from the stopped business system can be switched to the business system in the other AZ, achieving cross-AZ disaster recovery. However, the above method requires maintaining two sets of functional business systems, which increases the maintenance complexity of the business systems and leads to higher disaster recovery complexity. SUMMARY OF THE INVENTION Various aspects of the present disclosure provide an instance migration method, apparatus, device, storage medium, and program product to reduce disaster recovery complexity. In a first aspect, an embodiment of the present disclosure provides an instance migration method, comprising: determining a target physical machine corresponding to a target instance to be migrated, the target instance currently located on a source physical machine, the source physical machine being configured to periodically synchronize data generated by the target instance on the source physical machine to the target physical machine; determining target network configuration information for the target instance on the target physical machine; creating the target instance on the target physical machine based on reserved resources corresponding to the target instance on the target physical machine and the target network configuration information; and causing the target instance on the target physical machine to take over business processing from the target instance on the source physical machine. In one possible implementation, creating the target instance in the target physical machine based on the reserved resources corresponding to the target instance in the target physical machine and the target network configuration information includes: determining the instance configuration information corresponding to the target instance; and creating the target instance in the reserved resources of the target physical machine according to the instance configuration information.In one possible implementation, creating the target instance in the reserved resources of the target physical machine based on the instance configuration information and the target network configuration information includes: sending an instance creation request to the target physical machine, the instance creation request including the instance configuration information, the target network configuration information, and a target instance identifier of the target instance, the target instance identifier being used by the target physical machine to determine the reserved resources; and receiving an instance creation success response from the target physical machine, the instance creation success response indicating that the target instance was successfully created in the reserved resources on the target physical machine. In another possible implementation, determining the target network configuration information of the target instance in the target physical machine includes: determining the source network configuration information of the target instance in the source physical machine; and determining the target network configuration information based on the source network configuration information. In one possible implementation, the source network configuration information includes the source network address of the target instance in the source physical machine, and the target network information includes the target network address of the target instance in the target physical machine. Determining the target network configuration information based on the source network configuration information includes setting the target network address to the source network address. In one possible implementation, determining the target physical machine corresponding to the target instance to be migrated includes: determining the source physical machine, where the source physical machine satisfies at least one of the following conditions: the source physical machine's physical machine state is a preset state, a service on the source physical machine has been updated, or the computer room where the source physical machine is located is to be migrated; determining the instance running on the source physical machine as the target instance; and determining the target physical machine corresponding to the target instance based on the target instance identifier. In one possible implementation, determining the target physical machine corresponding to the target instance based on the target instance identifier includes: obtaining a preset correspondence relationship, where the preset correspondence relationship includes multiple instance identifiers and the physical machine corresponding to each instance identifier; and determining the target physical machine based on the target instance identifier and the preset correspondence relationship. In one possible implementation, the method further includes: determining resource usage information of resources occupied by the target instance on the source physical machine, the resource usage information including multiple resource types and historical resource usage corresponding to each resource type; determining a reserved resource amount corresponding to each resource type based on the resource usage information; and requesting the target physical machine to reserve resources for the target instance based on the reserved resource amount corresponding to each resource type. In another possible implementation, the method further includes: deregistering the target instance on the source physical machine.In one possible implementation, the method further includes: the source physical machine and the target physical machine are set in different availability zones. In one possible implementation, the source physical machine is used to periodically synchronize the data generated by the target instance in the source physical machine to the target physical machine via a dedicated network. In a second aspect, an embodiment of the present disclosure provides an instance migration device, the device including: a determination module and a creation module, wherein the determination module is used to, after determining the target physical machine corresponding to the target instance to be migrated, the target instance is currently located in the source physical machine, and the source physical machine is used to periodically synchronize the data generated by the target instance in the source physical machine to the target physical machine; the determination module is also used to determine the target network configuration information of the target instance in the target physical machine; the creation module is used to create the target instance in the target physical machine based on the reserved resources corresponding to the target instance in the target physical machine and the target network configuration information; the target instance in the target physical machine is used to take over the target instance in the source physical machine for business processing. In one possible implementation, the creation module is specifically configured to determine instance configuration information corresponding to the target instance; create the target instance in the reserved resources of the target physical machine based on the instance configuration information. In another possible implementation, the creation module is specifically configured to send an instance creation request to the target physical machine, the instance creation request including the instance configuration information, the target network configuration information, and a target instance identifier of the target instance, the target instance identifier being used by the target physical machine to determine the reserved resources; receive an instance creation success response from the target physical machine, the instance creation success response indicating that the target instance was successfully created in the reserved resources on the target physical machine. In another possible implementation, the determination module is specifically configured to determine source network configuration information of the target instance in the source physical machine; and determine the target network configuration information based on the source network configuration information. In a possible implementation, the source network configuration information includes the source network address of the target instance in the source physical machine, and the target network information includes the target network address of the target instance in the target physical machine; the determination module is specifically configured to set the target network address to the source network address.In one possible implementation, the determination module is specifically configured to determine the source physical machine, where the source physical machine satisfies at least one of the following conditions: the physical machine state of the source physical machine is a preset state, a service on the source physical machine has been updated, or the computer room where the source physical machine is located is to be migrated; determine the instance running on the source physical machine as the target instance; and determine the target physical machine corresponding to the target instance based on the target instance identifier of the target instance. In another possible implementation, the determination module is specifically configured to obtain a preset correspondence, where the preset correspondence includes multiple instance identifiers and the physical machine corresponding to each instance identifier; and determine the target physical machine based on the target instance identifier and the preset correspondence. In one possible implementation, the apparatus further includes a sending module and a deregistration module, wherein the determining module is further configured to determine resource usage information of resources occupied by the target instance on the source physical machine, the resource usage information including multiple resource types and the historical resource usage corresponding to each resource type; the determining module is further configured to determine the reserved resource amount corresponding to each resource type based on the resource usage information; and the sending module is configured to request the target physical machine to reserve resources for the target instance based on the reserved resource amount corresponding to each resource type. In one possible implementation, the deregistration module is configured to deregister the target instance on the source physical machine. In one possible implementation, the source physical machine and the target physical machine are located in different availability zones. In one possible implementation, the source physical machine is configured to periodically synchronize data generated by the target instance on the source physical machine to the target physical machine via a dedicated network. In a third aspect, embodiments of the present disclosure provide an instance migration device, comprising: a memory and a processor; the memory storing computer-executable instructions; and the processor executing the computer-executable instructions stored in the memory, causing the instance migration device to perform any of the methods described in the first aspect. In a fourth aspect, embodiments of the present disclosure provide a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are executed by a processor, the computer-executable instructions are used to implement any of the methods described in the first aspect. In a fifth aspect, embodiments of the present disclosure provide a computer program product, including a computer program. When executed by a processor, the computer program implements any of the methods described in the first aspect.Embodiments of the present disclosure provide an instance migration method, apparatus, device, storage medium, and program product. The instance migration device can determine the target physical machine corresponding to the target instance to be migrated; determine the target network configuration information for the target instance on the target physical machine; and create the target instance on the target physical machine based on the reserved resources corresponding to the target instance on the target physical machine and the target network configuration information. In this method, the source physical machine can synchronize the data of the target instance to the target physical machine, and the target physical machine can pre-configure reserved resources for the target instance. If the source physical machine is unable to continue running the target instance, the instance migration device can determine the target network configuration information and, based on the target network configuration information and the reserved resources corresponding to the target instance, create the target instance on the target physical machine to migrate the target instance. This method eliminates the need to maintain two functionally identical business systems and eliminates the need for bidirectional data synchronization, reducing disaster recovery complexity. In addition, the source physical machine can synchronize data generated by the target instance with the target physical machine in real time. If the source physical machine is unable to continue running the target instance, the instance migration device can immediately create the target instance on the target physical machine, ensuring better business continuity. BRIEF DESCRIPTION OF THE DRAWINGS The drawings described herein are provided to provide a further understanding of the present disclosure and constitute a part of this disclosure. The exemplary embodiments of this disclosure and their descriptions are intended to explain this disclosure and do not constitute undue limitations of this disclosure. In the drawings: FIG1 is a schematic diagram of a disaster recovery architecture provided by an exemplary embodiment of this disclosure; FIG2 is a schematic diagram of another disaster recovery architecture provided by an exemplary embodiment of this disclosure; FIG3 is a schematic diagram of an instance migration process provided by an exemplary embodiment of this disclosure; FIG4 is a schematic diagram of another instance migration method provided by an exemplary embodiment of this disclosure; FIG5 is a schematic diagram of an instance migration provided by an exemplary embodiment of this disclosure; FIG6 is a schematic diagram of the structure of an instance migration apparatus provided by an exemplary embodiment of this disclosure; FIG7 is a schematic diagram of the structure of another instance migration apparatus provided by an exemplary embodiment of this disclosure; and FIG8 is a schematic diagram of the structure of an instance migration device provided by an exemplary embodiment of this disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS: It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, storage, and display) involved in this disclosure are all authorized by the user or fully authorized by all parties. The collection, use, and processing of relevant data must comply with relevant laws, regulations, and standards, and corresponding operation portals are provided for users to choose to authorize or reject. To further clarify the objectives, technical solutions, and advantages of this disclosure, the technical solutions of this disclosure will be clearly and completely described below in conjunction with specific embodiments of this disclosure and the corresponding drawings.Obviously, the described embodiments are only a portion of the embodiments of this disclosure, and not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure. To facilitate understanding, the technical terms used in the embodiments of this disclosure are first explained. Live migration: Also known as dynamic migration or real-time migration, generally refers to the preservation and restoration of a virtual machine. This typically involves preserving the entire operating state of the virtual machine while enabling rapid restoration to the original hardware platform or even a different hardware platform. After restoration, the virtual machine continues to run smoothly, and the user will not notice any difference. Availability zone: A physical area within the same region with independent power and network connectivity. Typically, it is a computer room. Elastic Compute Service (ECS): A secure, reliable, and scalable cloud computing service. The embodiments of this disclosure can be applied to cross-availability zone disaster recovery scenarios. It should be noted that the instance migration method provided in the embodiments of this disclosure is applicable not only to the aforementioned disaster recovery scenarios, but also to other disaster recovery scenarios, and this disclosure is not limited to this. The following describes disaster recovery methods in related technologies in conjunction with FIG1 . FIG1 is a schematic diagram of a disaster recovery architecture provided by an exemplary embodiment of the present disclosure. Referring to FIG1 , Availability Zone A can be configured with a multi-AZ server load balancing (SLB) instance, an ECS global wide area network (Web) server, an ECS application (APP) server, an object storage service (OSS) instance, and a multi-AZ relational database service (RDS) instance. Availability Zone B can also be configured with a multi-AZ SLB instance, an ECS web server, an ECS application server, an OSS instance, and a multi-AZ RDS instance. The functions implemented by the aforementioned systems in Availability Zone A are the same as those implemented by the aforementioned systems in Availability Zone B. Business data in Availability Zone A can be synchronized to Availability Zone B, and business data in Availability Zone B can also be synchronized to Availability Zone A.If either Availability Zone A or Availability Zone B unexpectedly ceases operations, the Domain Name System (DNS) can redirect service requests from the stopped zone to the other zone, achieving disaster recovery across all zones. However, in the aforementioned architecture, business data in Availability Zone A must be synchronized with Availability Zone B, and business data in Availability Zone B must also be synchronized with Availability Zone A. This requires bidirectional synchronization of business data, which increases the complexity of data synchronization on the business side. Furthermore, users must maintain two sets of functionally identical business systems in both Availability Zones, increasing the maintenance complexity of these systems and, consequently, the complexity of disaster recovery. To address this, embodiments of the present disclosure provide an instance migration method to reduce disaster recovery complexity. The following describes the disaster recovery architecture involved in embodiments of the present disclosure with reference to Figure 2. Figure 2 is a schematic diagram of another disaster recovery architecture provided by an exemplary embodiment of the present disclosure. Referring to Figure 2, physical machine 1 can be set up in Availability Zone A, on which instance 1 can run. Physical machine 2 can be set up in Availability Zone B. For example, Availability Zone 1 can be Computer Room 1, Availability Zone 2 can be Computer Room 2, and Instance 1 can be an ECS instance. It should be noted that in the above disaster recovery architecture, the number of physical machines in Availability Zone A and the number of physical machines in Availability Zone B can both be one or more. Figure 2 illustrates the example of a single number of physical machines in Availability Zone A and B, and does not limit the embodiments of the present disclosure. As shown in Figure 2, if physical machine 1 fails, instance 1 can be migrated to physical machine 2, allowing instance 1 to run on physical machine 2 and take over business processing from instance 1 on physical machine 1. This achieves cross-availability zone disaster recovery. In the above disaster recovery architecture, business data does not require bidirectional synchronization, and users do not need to maintain two functionally identical business systems simultaneously, reducing disaster recovery complexity. The technical solutions presented in this disclosure are described in detail below through specific embodiments. It should be noted that the following embodiments may exist independently or in combination, and identical or similar content will not be repeated in different embodiments. Figure 3 is a schematic flow diagram of an instance migration process provided by an exemplary embodiment of the present disclosure. Referring to FIG3 , the method may include:

[0002] S301: Determine the target physical machine corresponding to the target instance to be migrated. The execution entity of the disclosed embodiment may be an instance migration device, or an instance migration apparatus provided within the instance migration device. The instance migration apparatus may be implemented via software or a combination of software and hardware. For ease of understanding, the following description uses the instance migration device as an example. In this embodiment, if the target instance is currently located on a source physical machine and the source physical machine is no longer able to run the target instance, the target physical machine corresponding to the target instance may be determined. For example, if the source physical machine is in a faulty state or the computer room where the source physical machine is located is awaiting migration, the target physical machine corresponding to the target instance may be determined. Both the source and target physical machines may be electronic devices capable of running service instances. For example, both the source and target physical machines may be servers, computers, or the like. The source and target physical machines may be located in different availability zones. For example, the source physical machine may be a server in Availability Zone 1, and the target physical machine may be a server in Availability Zone 2. Availability Zone 1 may be, for example, Computer Room 1, and Availability Zone 2 may be, for example, Computer Room 2. It should be understood that one availability zone may have one or more computer rooms. Multiple may be two or more. The target instance may be any business instance running on the source physical machine. For example, the target instance may be an ECS instance. The target physical machine may be a disaster recovery physical machine pre-configured for the target instance. In other words, the target physical machine may be a backup physical machine for running the target instance. In this embodiment, a preset correspondence may exist between the target instance and the target physical machine. During specific implementation, the target physical machine corresponding to the target instance may be determined based on the preset correspondence between the target instance and the target physical machine. In this embodiment, the source physical machine is configured to periodically synchronize data generated by the target instance on the source physical machine with the target physical machine. In other words, while the target instance is running on the source physical machine, the source physical machine may synchronize data generated by the target instance to the target physical machine. It should be noted that the data synchronization period can be set based on actual needs and is not limited in this embodiment. For example, the source physical machine can synchronize data with the target physical machine immediately after the target instance generates data. Optionally, while the target instance is running, the source physical machine can store the data generated by the target instance in its cloud disk and copy the data from the source physical machine's cloud disk to the target physical machine's cloud disk through a data copy process. It should be noted that in this embodiment, the source physical machine can synchronize the data generated by the target instance on the source physical machine with the target physical machine via a dedicated network, thereby improving network stability and data security.The dedicated network can be a dedicated network line between the availability zone where the source physical machine is located and the availability zone where the target physical machine is located. For ease of description, the availability zone where the source physical machine is located is referred to as the source availability zone, and the availability zone where the target physical machine is located is referred to as the target availability zone. The source availability zone can contain one or more physical machines, and the target availability zone can also contain one or more physical machines. Data can be transmitted between physical machines in the source availability zone and physical machines in the target availability zone via the dedicated network. Other devices cannot transmit data via the dedicated network. In this embodiment, the instance migration device can monitor the source physical machine and the computer room where the source physical machine is located to determine whether the source physical machine can continue to run the target instance. It should be noted that this embodiment does not limit the monitoring methods for the source physical machine and the computer room where the source physical machine is located. During implementation, corresponding monitoring methods can be configured according to actual needs. For example, the instance migration device can monitor the heartbeat information of the source physical machine. If the heartbeat information of the source physical machine is abnormal, it can be determined that the source physical machine has failed and cannot continue to run the target instance. The instance migration device can also monitor whether the power supply of the computer room where the source physical machine is located is normal. If the power supply of the computer room where the source physical machine is located is cut off, it can be determined that the source physical machine cannot continue to run the target instance.

[0003] S302. Determine the target network configuration information of the target instance in the target physical machine. In this embodiment, before creating the target instance in the target physical machine, the target network configuration information of the target instance in the target physical machine can be determined to facilitate creating the target instance in the target physical machine based on the network configuration information. In this embodiment, the target network configuration information can be determined based on the source network configuration information of the target instance in the source physical machine. Specifically, the source network configuration information can include the source network address of the target instance in the source physical machine, and the target network configuration information can include the target network address of the target instance in the target physical machine. The instance migration device can determine the target network address based on the source network address. The target network address can be the same as the source network address. It should be noted that the target instance can use a virtual private cloud (VPC). The instance migration device can obtain the target instance's VPC Internet Protocol (IP) address (i.e., the source network address) from the source physical machine and determine the target instance's VPC IP address as the target network address. For example, assuming that the private network IP address of the target instance in the source physical machine is IP address 1, the target network address can be determined to be IP address lo

[0004] S303. Create a target instance in the target physical machine based on the reserved resources corresponding to the target instance in the target physical machine and the target network configuration information. The target instance in the target physical machine can be used to take over business processing for the target instance in the source physical machine. The reserved resources corresponding to the target instance in the target physical machine can include memory resources and central processing unit (CPU) resources reserved for the target instance in the target physical machine. In this embodiment, the instance migration device can store or obtain instance configuration information of the target instance. After the source physical machine where the target instance resides fails, the instance migration device can create the target instance in the reserved resources corresponding to the target instance based on the instance configuration information of the target instance. Optionally, the instance migration device can also request the target physical machine to configure reserved resources for the target instance based on resource usage information of the target instance in the source physical machine. Specifically, the instance migration device can determine resource usage information of the target instance on the source physical machine. The resource usage information includes multiple resource types and the historical resource usage corresponding to each resource type. Based on the resource usage information, the device can determine the reserved resource amount corresponding to each resource type. Based on the reserved resource amount corresponding to each resource type, the device can request the target physical machine to reserve resources for the target instance. Resource types can include memory resources, CPU resources, and so on. For any resource type, the historical resource usage corresponding to the resource type can be the amount of that resource type occupied by the target instance on the source physical machine. For example, the historical resource usage corresponding to memory resources can be the amount of memory resources occupied by the target instance on the source physical machine. For any resource type, the reserved resource amount corresponding to the resource type can be the amount of that resource type that needs to be reserved for the target instance. It should be understood that, for any resource type, the reserved resource amount corresponding to the resource type is greater than or equal to the historical resource usage corresponding to the resource type. In this embodiment, the instance migration device can determine the target physical machine corresponding to the target instance to be migrated; determine the target network configuration information for the target instance on the target physical machine; and create the target instance on the target physical machine based on the reserved resources corresponding to the target instance on the target physical machine and the target network configuration information. In the above method, the source physical machine can synchronize the target instance's data with the target physical machine, and the target physical machine can pre-configure reserved resources for the target instance. If the source physical machine is unable to continue running the target instance, the instance migration device can determine the target network configuration information and, based on the target network configuration information and the reserved resources corresponding to the target instance, create the target instance on the target physical machine to migrate the target instance.The above method eliminates the need to maintain two functionally identical business systems simultaneously and eliminates the need for bidirectional data synchronization, reducing disaster recovery complexity. Furthermore, the source physical machine can synchronize data generated by the target instance with the target physical machine in real time. If the source physical machine is unable to run the target instance, the instance migration device can immediately create the target instance on the target physical machine, ensuring improved business continuity. The following describes the instance migration method provided by an embodiment of the present disclosure in detail, based on the embodiment shown in FIG3 and in conjunction with FIG4 . FIG4 is a flow chart illustrating another instance migration method provided by an exemplary embodiment of the present disclosure. Referring to FIG4 , the method may include:

[0005] S401: Determine the source physical machine. The execution entity of the disclosed embodiment may be an instance migration device, or an instance migration apparatus provided within the instance migration device. The instance migration apparatus may be implemented via software or a combination of software and hardware. For ease of understanding, the following description uses the instance migration device as an example. In this embodiment, the source physical machine satisfies at least one of the following conditions: the physical machine status of the source physical machine is in a preset state, a service on the source physical machine has been updated, or the computer room where the source physical machine is located is awaiting migration. Preset states may include a faulty state and a fully loaded state. It should be understood that if the source physical machine is in a faulty state or a fully loaded state, the source physical machine cannot continue to run the target instance. In this embodiment, the instance migration device may monitor the physical machine status of the source physical machine to determine whether the physical machine status of the source physical machine is in a preset state. Specifically, the instance migration device may monitor the heartbeat messages of the source physical machine and the load of the source physical machine. If the heartbeat messages of the source physical machine are normal, the physical machine status of the source physical machine may be determined to be normal. If the heartbeat message of the source physical machine is abnormal, the physical machine status of the source physical machine can be determined to be faulty. If the load of the source physical machine is greater than a preset threshold, the physical machine status of the source physical machine can be determined to be fully loaded. If the load of the source physical machine is less than or equal to the preset threshold, the physical machine status of the source physical machine can be determined to be partially loaded. A service update on the source physical machine may require the source physical machine to migrate the target instance to release resources occupied by the target instance. In this embodiment, if a service update on the source physical machine occurs, the source physical machine can send an instance migration request to the instance migration device so that the instance migration device can determine that the service update on the source physical machine has occurred. The instance migration request may include the identifier of the source physical machine and the identifier of the target instance. The computer room where the source physical machine is located may require migration due to unexpected circumstances such as a power outage, fire, or flood. In this embodiment, the instance migration device can monitor the computer room where the source physical machine is located to determine whether the source physical machine is experiencing a power outage, fire, or flood. For example, the instance migration device can monitor whether the source physical machine's computer room is powered off using a voltage sensor, monitor whether a fire occurs in the source physical machine's computer room using a temperature sensor or smoke sensor, or monitor whether a flood occurs in the source physical machine's computer room using a water level sensor.

[0006] S402: Determine the instance running on the source physical machine as the target instance. In this embodiment, the source physical machine may be running at least one service instance. The target instance may be any service instance running on the source physical machine. It should be noted that the migration method for each service instance on the source physical machine is the same. This embodiment uses any service instance on the source physical machine as an example to illustrate the instance migration method.

[0007] S403. Determine the target physical machine corresponding to the target instance based on the target instance identifier of the target instance. The target instance identifier can be the name of the target instance or a unique identity document (ID) of the target instance. It should be understood that the target instance identifier can be used to uniquely identify the target instance. In this embodiment, a disaster recovery physical machine can be configured for each service instance in the source physical machine. If the source physical machine cannot run any service instance, the service instance can be migrated to the corresponding disaster recovery physical machine. For any service instance in the source physical machine, the disaster recovery physical machine configured for the service instance can be the physical machine corresponding to the service instance. In this embodiment, a preset correspondence can be set between each instance in the source physical machine and the physical machine corresponding to each instance. The preset correspondence can include multiple instance identifiers and the physical machine corresponding to each instance identifier. The instance migration device can store the preset correspondence. During specific implementation, the instance migration device can obtain the preset correspondence from a local machine. The preset correspondence includes multiple instance identifiers and the physical machine corresponding to each instance identifier. The target physical machine is determined based on the target instance identifier and the preset correspondence. Specifically, the instance migration device may search for the target instance identifier in the preset corresponding relationship, and may determine the physical machine corresponding to the target instance identifier in the preset corresponding relationship as the target physical machine.

[0008] 5404. Determine the source network configuration information of the target instance in the source physical machine. The source network configuration information of the target instance in the source physical machine may include, for example, the private network IP address used by the target instance when running on the source physical machine. In this embodiment, the instance migration device may pre-acquire the source network configuration information of the target instance from the source physical machine and may store the source network configuration information of the target instance. During implementation, the instance migration device may determine the source network configuration information of the target instance in the source physical machine based on the target instance identifier. 5405. Determine the target network configuration information based on the source network configuration information. The target network configuration information may include, for example, the private network IP address used by the target instance when running on the target physical machine. In this embodiment, the source network configuration information includes the source network address of the target instance in the source physical machine, and the target network configuration information includes the target network address of the target instance in the target physical machine. When determining the target network configuration information based on the source network configuration information, the target network address may be determined as the source network address. Specifically, the instance migration device may configure the private network IP address of the target instance in the target physical machine as the target network address.

[0009] S406. Determine instance configuration information corresponding to the target instance. The instance configuration information corresponding to the target instance may be information required when creating the target instance. For example, the instance configuration information corresponding to the target instance may include the number of virtual CPU cores of the target instance and the network type of the target instance. In this embodiment, the instance migration device may store the instance configuration information of the target instance. The instance migration device may determine the configuration information corresponding to the target instance based on the target instance identifier of the target instance.

[0010] S407. Create the target instance in the reserved resources of the target physical machine based on the instance configuration information and the target network configuration information. In this embodiment, the instance migration device may send an instance creation request to the target physical machine. The instance creation request includes the instance configuration information, the target network configuration information, and the target instance identifier of the target instance. The target instance identifier is used by the target physical machine to determine the reserved resources. The instance migration device then receives an instance creation success response from the target physical machine. The instance creation success response indicates that the target instance has been successfully created in the reserved resources on the target physical machine. Specifically, the instance migration device may send the target instance identifier, the target network configuration information, and the instance configuration information corresponding to the target instance to the target device. The target physical machine may determine the reserved resources of the target instance based on the target instance identifier. Create the target instance in the reserved resources of the target instance based on the target network configuration information and the instance configuration information corresponding to the target instance. After the creation is complete, the instance migration device may send a creation success response to the instance migration device, allowing the instance migration device to confirm that the migration of the target instance has been successful. Optionally, the instance migration device may also deregister the target instance from the source physical machine. In this embodiment, the instance migration device can determine a source physical machine and identify the instance running on the source physical machine as the target instance; determine the target physical machine corresponding to the target instance based on the target instance's target instance identifier; determine the source network configuration information of the target instance on the source physical machine and determine the target network configuration information based on the source network configuration information; determine the instance configuration information corresponding to the target instance and, based on the instance configuration information and the target network configuration information, create the target instance within the reserved resources of the target physical machine. In the above method, the target physical machine can create the target instance within the reserved resources of the target instance. The IP address of the target instance created on the target physical machine can be the same as the IP address of the target instance on the source physical machine. With this method, the service end is unaware of the migration of the target instance and can continue to request the target instance on the target physical machine to perform service processing, thereby reducing disaster recovery complexity. Based on any of the above embodiments, the instance migration method provided by an embodiment of the present disclosure will be described below using a specific example with reference to Figure 5. Figure 5 is a schematic diagram of an instance migration provided by an exemplary embodiment of the present disclosure. 5 , server 1 can be set up in computer room A, and cloud disk 1 and ECS instance 1 can be run on server 1. Server 2 can be set up in computer room B, and cloud disk 2 can be run on server 2.

[0011] When ECS instance 1 is operating normally on server 1, the business data generated by ECS instance 1 can be stored in cloud disk 1. Server 1 can also periodically synchronize the business data generated by ECS instance 1 to cloud disk 2 on server 2, allowing server 2 to access the business data generated by ECS instance 1 during operation. Server 2 can have reserved resources configured for ECS instance 1. Reserved resources can include reserved memory resources and reserved CPU resources. If computer room A ceases operation due to an unexpected cause, ECS instance 1 can be created on server 2 using the instance migration method provided in any of the above embodiments. The IP address of ECS instance 1 on server 2 can be the same as the IP address of ECS instance 1 on server 1. For example, the unexpected cause could be a fire or flood. Using the above method, ECS instance 1 can be migrated and the ECS instance 1 on server 2 can take over business processing from the ECS instance 1 on server 1. In this embodiment, server 1 can synchronize the business data of ECS instance 1 to server 2, and server 2 can pre-configure reserved resources for ECS instance 1. If server 1 fails, ECS instance 1 can be created on server 2 to migrate ECS instance 1. This method eliminates the need to maintain two functionally identical business systems simultaneously, and bidirectional data synchronization is not required, reducing disaster recovery complexity. Figure 6 is a schematic diagram of the structure of an instance migration apparatus provided in an exemplary embodiment of the present disclosure. Referring to Figure 6 , the instance migration apparatus 10 includes a determination module 11 and a creation module 12. The determination module 11 is configured to determine a target physical machine corresponding to a target instance to be migrated, where the target instance is currently located on a source physical machine, and the source physical machine is configured to periodically synchronize data generated by the target instance on the source physical machine with the target physical machine. The determination module 11 is also configured to determine target network configuration information for the target instance on the target physical machine. The creation module 12 is configured to create the target instance on the target physical machine based on the reserved resources corresponding to the target instance on the target physical machine and the target network configuration information. The target instance on the target physical machine is configured to take over business processing from the target instance on the source physical machine. The example migration device provided in the embodiment of the present disclosure can implement the technical solution shown in the above method embodiment. Its implementation principles and beneficial effects are similar and will not be described in detail here.In one possible embodiment, the creation module 12 is specifically configured to determine instance configuration information corresponding to the target instance; create the target instance in the reserved resources of the target physical machine based on the instance configuration information. In one possible implementation, the creation module 12 is specifically configured to send an instance creation request to the target physical machine, the instance creation request including the instance configuration information, the target network configuration information, and a target instance identifier of the target instance, the target instance identifier being used by the target physical machine to determine the reserved resources; and receive an instance creation success response from the target physical machine, the instance creation success response indicating that the target instance was successfully created in the reserved resources on the target physical machine. In one possible implementation, the determination module 11 is specifically configured to determine source network configuration information of the target instance in the source physical machine; and determine the target network configuration information based on the source network configuration information. In one possible implementation, the source network configuration information includes the source network address of the target instance in the source physical machine, and the target network information includes the target network address of the target instance in the target physical machine. The determination module 11 is specifically configured to set the target network address to the source network address. In one possible implementation, the determination module 11 is specifically configured to determine the source physical machine, where the source physical machine satisfies at least one of the following conditions: the physical machine state of the source physical machine is a preset state, a service on the source physical machine has been updated, or the computer room where the source physical machine is located is to be migrated; determine the instance running on the source physical machine as the target instance; and determine the target physical machine corresponding to the target instance based on the target instance identifier of the target instance. In one possible implementation, the determination module 11 is specifically configured to obtain a preset correspondence, where the preset correspondence includes multiple instance identifiers and the physical machine corresponding to each instance identifier; and determine the target physical machine based on the target instance identifier and the preset correspondence. The instance migration device provided in the embodiment of the present disclosure can implement the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar and will not be described in detail here. FIG7 is a schematic structural diagram of another instance migration device provided in the exemplary embodiment of the present disclosure.Based on FIG6 , the instance migration apparatus 10 may further include a sending module 13 and a deregistration module 14. The determining module 11 is further configured to determine resource usage information of the target instance on the source physical machine, where the resource usage information includes multiple resource types and the historical resource usage corresponding to each resource type. The determining module 11 is further configured to determine the reserved resource amount corresponding to each resource type based on the resource usage information. The sending module 13 is configured to request the target physical machine to reserve resources for the target instance based on the reserved resource amount corresponding to each resource type. In one possible implementation, the deregistration module 14 is configured to deregister the target instance on the source physical machine. In one possible implementation, the source physical machine and the target physical machine are located in different availability zones. In another possible implementation, the source physical machine is configured to periodically synchronize data generated by the target instance on the source physical machine to the target physical machine via a dedicated network. The instance migration apparatus provided in the embodiments of the present disclosure may implement the technical solutions described in the above method embodiments. The implementation principles and beneficial effects are similar and will not be further described here. Figure 8 is a schematic diagram of the structure of an instance migration device provided in accordance with an exemplary embodiment of the present disclosure. Referring to Figure 8 , the instance migration device 20 may include a processor 21 and a memory 22. Exemplarily, the processor 21 and the memory 22 are interconnected via a bus 23. The memory 22 stores computer-executable instructions; the processor 21 executes the computer-executable instructions stored in the memory 22, causing the processor 21 to perform the method described in the aforementioned method embodiment. The instance migration device shown in Figure 8 may be a server, a computer, or other electronic device. The instance migration device provided in accordance with an exemplary embodiment of the present disclosure can implement the technical solutions described in the aforementioned method embodiment. The implementation principles and beneficial effects are similar and will not be further described here. Accordingly, an exemplary embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions. When executed by a processor, the computer-executable instructions are used to implement the method described in the aforementioned method embodiment. Accordingly, an exemplary embodiment of the present disclosure may also provide a computer program product, including a computer program. When executed by a processor, the computer program can implement the method described in the aforementioned method embodiment. Those skilled in the art will appreciate that the exemplary embodiment of the present disclosure may be provided as a method, system, or computer program product. Therefore, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects.Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, such that the instructions, executed by the processor of the computer or other programmable data processing device, produce means for implementing the functions specified in one or more processes in the flowcharts and / or one or more blocks in the block diagrams. These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more blocks in the block diagrams. These computer program instructions may also be loaded onto a computer or other programmable data processing device, causing the computer or other programmable device to execute a series of operational steps to produce a computer-implemented process, such that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more flowcharts and / or one or more blocks in the block diagrams. In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory. Memory may include non-volatile memory in a computer-readable medium, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash memory. Memory is an example of a computer-readable medium. Computer-readable media, including both permanent and non-permanent, removable and non-removable media, may be implemented using any method or technology for information storage. The information may be computer-readable instructions, data structures, program modules or other data.Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves. It should also be noted that the terms "comprises," "comprising," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements may include not only those elements but also other elements not expressly listed or inherent to such process, method, article, or apparatus. In the absence of further limitations, elements defined by the phrase "comprising a..." do not preclude the presence of other identical elements in the process, method, product, or device comprising the elements. The foregoing description is merely an embodiment of the present disclosure and is not intended to limit the present disclosure. Persons skilled in the art will readily appreciate that various modifications and variations of the present disclosure are possible. Any modifications, equivalent substitutions, improvements, and the like made within the spirit and principles of the present disclosure are intended to be encompassed by the claims of the present disclosure.

Claims

Claims 1. An instance migration method, wherein: include: Determine a target physical machine corresponding to a target instance to be migrated, where the target instance is currently located on a source physical machine, and the source physical machine is used to periodically synchronize data generated by the target instance on the source physical machine to the target physical machine; Determine target network configuration information of the target instance in the target physical machine; create the target instance in the target physical machine based on reserved resources corresponding to the target instance in the target physical machine and the target network configuration information; the target instance in the target physical machine is used to take over business processing from the target instance in the source physical machine.

2. The method according to claim 1, wherein: Based on the reserved resources corresponding to the target instance in the target physical machine and the target network configuration information, the target instance is created in the target physical machine, including: determining the instance configuration information corresponding to the target instance; and creating the target instance in the reserved resources of the target physical machine according to the instance configuration information and the target network configuration information.

3. The method according to claim 2, wherein: Creating the target instance in the reserved resources of the target physical machine according to the instance configuration information and the target network configuration information includes: sending an instance creation request to the target physical machine, the instance creation request including the instance configuration information, the target network configuration information, and a target instance identifier of the target instance, where the target instance identifier is used by the target physical machine to determine the reserved resources; and receiving an instance creation success response sent by the target physical machine, where the instance creation success response is used to indicate that the target instance is successfully created in the reserved resources on the target physical machine.

4. The method according to any one of claims 1 to 3, wherein: Determining target network configuration information of the target instance in the target physical machine includes: determining source network configuration information of the target instance in the source physical machine; and determining the target network configuration information according to the source network configuration information.

5. The method according to claim 4, wherein: The source network configuration information includes the source network address of the target instance in the source physical machine, and the target network information includes the target network address of the target instance in the target physical machine; determining the target network configuration information according to the source network configuration information includes: setting the target network address to the source network address.

6. The method according to any one of claims 1 to 5, wherein: Determining the target physical machine corresponding to the target instance to be migrated includes: determining the source physical machine, where the source physical machine satisfies at least one of the following: the physical machine state of the source physical machine is a preset state, the business in the source physical machine is updated, or the computer room where the source physical machine is located is to be migrated; determining the instance running in the source physical machine as the target instance; and determining the target physical machine corresponding to the target instance based on the target instance identifier of the target instance.

7. The method according to claim 6, wherein: According to the target instance identifier of the target instance, determine the The target physical machine corresponding to the target instance includes: obtaining a preset corresponding relationship, where the preset corresponding relationship includes multiple instance identifiers and a physical machine corresponding to each instance identifier; and determining the target physical machine according to the target instance identifier and the preset corresponding relationship.

8. The method according to any one of claims 1 to 7, wherein: The method also includes: determining resource occupancy information of the resources occupied by the target instance in the source physical machine, the resource occupancy information including multiple resource types and historical resource occupancy corresponding to each resource type; determining the reserved resource amount corresponding to each resource type based on the resource occupancy information; and requesting the target physical machine to reserve resources for the target instance based on the reserved resource amount corresponding to each resource type.

9. The method according to any one of claims 1 to 8, wherein: The method further includes: deregistering the target instance in the source physical machine.

10. The method according to any one of claims 1 to 9, wherein: The source physical machine and the target physical machine are set in different availability zones.

11. The method according to any one of claims 1 to 10, wherein: The source physical machine is used to periodically synchronize data generated by the target instance in the source physical machine to the target physical machine through a dedicated network.

12. An instance migration device, wherein: The device includes: a determination module and a creation module, wherein the determination module is used to determine a target physical machine corresponding to a target instance to be migrated, the target instance is currently located in a source physical machine, and the source physical machine is used to periodically synchronize data generated by the target instance in the source physical machine to the target physical machine; the determination module is also used to determine target network configuration information of the target instance in the target physical machine; the creation module is used to create the target instance in the target physical machine based on reserved resources corresponding to the target instance in the target physical machine and the target network configuration information; the target instance in the target physical machine is used to take over business processing from the target instance in the source physical machine.

13. An instance migration device, wherein: include: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the instance migration device to perform the method according to any one of claims 1 to 11.

14. A computer-readable storage medium, wherein: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the method according to any one of claims 1 to 11 is implemented.

15. A computer program product, comprising a computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Servicing I / O operations in a cloud-based storage system

    CN111868676A

  • Data migration method and device, electronic equipment and storage medium

    CN116701361A

  • Live recovery of virtual machines in a public cloud computing environment

    US20210357132A1