Virtual machine migration method, system, computer device and storage medium

By creating a shared memory resource pool between the source and destination nodes, dividing the migration into stages, and using an address information table, the problem of service interruption during virtual machine migration was solved, and virtual machine migration without service interruption was achieved.

CN119806731BActive Publication Date: 2026-06-23INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INSPUR SUZHOU INTELLIGENT TECH CO LTD
Filing Date
2024-12-16
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

During virtual machine migration, existing technologies require interrupting the operation of virtual machine services, which can impact business operations.

Method used

By creating a shared memory resource pool between the source node and the destination node, the virtual machine migration process is divided into two stages: the source node migrates memory data to the shared memory resource pool, and the destination node migrates memory data from the shared memory resource pool. An address information table is used to record the correspondence between memory addresses to ensure that the virtual machine can continue to run during the migration process.

Benefits of technology

The virtual machine migration process does not require interrupting business operations, reducing the impact on business operations and minimizing the network resource consumption of other services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806731B_ABST
    Figure CN119806731B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of cloud computing, and discloses a virtual machine migration method, system, computer device and storage medium, comprising: a source node receiving a migration instruction of a target virtual machine, and obtaining an address information table of the target virtual machine; obtaining a shared memory address according to a source memory address in the address information table; updating the address information table according to the source memory address and the shared memory address, migrating memory data of the target virtual machine from itself to a shared memory resource pool; obtaining register data of the target virtual machine; sending the updated address information table and the register data of the target virtual machine to a destination node; and stopping running the target virtual machine. The destination node migrates the memory data of the target virtual machine from the shared memory resource pool to itself according to the shared memory address, and runs the target virtual machine according to the register data of the target virtual machine and the memory data of the target virtual machine. The present application does not need to interrupt the service of the virtual machine in the process of migrating the virtual machine.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cloud computing technology, specifically to virtual machine migration methods, systems, computer equipment, and storage media. Background Technology

[0002] In the field of cloud computing, the application of virtual machines reduces the demand for physical servers. During the operation of a virtual machine, when the source node is being maintained, it may be necessary to migrate the virtual machine to another destination node.

[0003] During online virtual machine migration, the source node typically transfers memory data to the destination node over the network. Because the virtual machine continues to process data during this network transfer, the memory data may change, meaning the data transferred to the destination node becomes "dirty" (old data). Therefore, the source node needs to retransmit the changed data from memory to the destination node. The source node stops the virtual machine and transfers the remaining memory data to the destination node once the amount of untransferred memory data is less than or equal to a preset amount. Upon receiving the untransferred memory data, the destination node begins running the virtual machine, thus completing the migration.

[0004] In related technologies, virtual machine migration requires interrupting the virtual machine's services, which affects the operation of the virtual machine's services. Summary of the Invention

[0005] In view of this, the present invention provides a virtual machine migration method, system, computer equipment, storage medium and program product to solve the problem of interrupting virtual machine services during virtual machine migration.

[0006] In a first aspect, the present invention provides a virtual machine migration method, the method being applied to a virtual machine migration system, the virtual machine migration system comprising a shared memory resource pool, a source node, and a destination node, the method comprising:

[0007] When the source node receives a migration instruction for the target virtual machine, it obtains an address information table corresponding to the target virtual machine, wherein the address information table includes at least one source memory address; based on each source memory address, it obtains a shared memory address corresponding to each source memory address; based on each source memory address and the shared memory address corresponding to each source memory address, it updates the address information table and migrates the memory data of the target virtual machine from the source node to the shared memory resource pool; it obtains the register data of the target virtual machine; it sends the updated address information table and the register data of the target virtual machine to the destination node; and it stops running the target virtual machine.

[0008] The destination node migrates the memory data of the target virtual machine from the shared memory resource pool to the destination node according to each shared memory address in the updated address information table; and runs the target virtual machine according to the register data of the target virtual machine and the memory data of the target virtual machine migrated to the destination node.

[0009] The virtual machine migration method provided by this invention has the following advantages:

[0010] This solution divides the migration process of the target virtual machine into two phases by creating a shared memory resource pool between the source and destination nodes. The first phase involves the source node migrating the target virtual machine's memory data from itself to the shared memory resource pool; the second phase involves the destination node migrating the target virtual machine's memory data from the shared memory resource pool back to itself. During the migration, the target virtual machine's memory data storage location changes. Therefore, an address information table records the correspondence between the source memory address and the shared memory address. This allows the source node to still perform business operations on the target virtual machine during the migration process, using the address information table and either the incompletely migrated data in its own memory or the completed migrated data in the shared memory resource pool. When the destination node receives the updated address information table and the target virtual machine's register data, it can begin migrating the target virtual machine's memory data from the shared memory resource pool to its own memory. During this migration, the destination node can still perform business operations on the target virtual machine using the address information table, the completed migrated data in its own memory, or the incompletely migrated data in the shared memory resource pool. The entire migration process does not require the target virtual machine to pause its operations, thus reducing the impact of the migration on the target virtual machine's business operations. In addition, this solution does not consume network resources, which can reduce the impact on other services when migrating virtual machines online.

[0011] In one optional implementation, updating the address information table based on each of the source memory addresses and the corresponding shared memory address, and migrating the memory data of the target virtual machine from the source node to the shared memory resource pool, includes:

[0012] The first shared memory address is filled into the shared memory address field corresponding to the first source memory address in the address information table, wherein the first source memory address is any one of the at least one source memory address, and the first shared memory address is the shared memory address corresponding to the first source memory address;

[0013] The memory data in the storage location corresponding to the first source memory address is migrated to the storage location corresponding to the first shared memory address.

[0014] Specifically, by updating the address information table, it is possible to know the specific location in the shared memory resource where the data of each source memory address in the source node has been migrated. This facilitates the subsequent migration process on the destination node and ensures that services can continue throughout the entire migration process of the target virtual machine.

[0015] In one optional implementation, the step of migrating the memory data of the target virtual machine from the shared memory resource pool to the destination node according to each of the shared memory addresses in the updated address information table includes:

[0016] The shared memory address in the updated address information table is traversed. For each shared memory address traversed, a destination memory address is allocated to the traversed shared memory address according to the preset storage space size.

[0017] The memory data in the storage location corresponding to the first shared memory address is migrated to the storage location corresponding to the first destination memory address, wherein the first destination memory address is the destination memory address allocated to the first shared memory address.

[0018] Specifically, this solution can completely migrate the memory data of the target virtual machine from the shared memory resource pool to the target node.

[0019] In an optional implementation, during the process of migrating the memory data of the target virtual machine from the source node to the shared memory resource pool, the method further includes:

[0020] When the source node receives a first service execution instruction for the target virtual machine, it determines the first logical address of the memory data operated by the first service execution instruction based on the first service execution instruction.

[0021] Obtain first migration progress information, wherein the first migration progress information includes at least one logical address and a migration status corresponding to each logical address, wherein the migration status is either migrated or not migrated;

[0022] Based on the first logical address, obtain the migration status corresponding to the first logical address from the first migration progress information;

[0023] When it is determined that the migration status corresponding to the first logical address is "has been migrated", the second shared memory address corresponding to the first logical address is determined based on the first logical address;

[0024] According to the first service execution instruction, the memory data in the storage location corresponding to the second shared memory address is modified.

[0025] Specifically, during the data migration process, this solution can still determine the location of the memory data to be operated on based on the first business execution instruction and the first migration progress information, and perform the corresponding operations.

[0026] In an optional implementation, when the migration status corresponding to the first logical address is determined to be "not migrated", the method further includes:

[0027] Based on the first logical address, determine the second source memory address corresponding to the first logical address;

[0028] According to the first service execution instruction, the memory data in the storage location corresponding to the second source memory address is modified.

[0029] Specifically, during the data migration process, this solution can still determine the location of the memory data to be operated on based on the first business execution instruction and the first migration progress information, and perform the corresponding operations.

[0030] In an optional implementation, during the process of migrating the memory data of the target virtual machine from the shared memory resource pool to the destination node, the method further includes:

[0031] When the destination node receives a second service execution instruction for the target virtual machine, it determines the second logical address of the memory data operated by the second service execution instruction based on the second service execution instruction.

[0032] Obtain second migration progress information, wherein the second migration progress information includes at least one logical address and a migration status corresponding to each logical address, the migration status being either migrated or not migrated;

[0033] Based on the second logical address, obtain the migration status corresponding to the second logical address from the second migration progress information;

[0034] When it is determined that the migration status corresponding to the second logical address is "not migrated", the second shared memory address corresponding to the second logical address is determined according to the second logical address;

[0035] According to the second service execution instruction, the memory data in the storage location corresponding to the second shared memory address is modified.

[0036] Specifically, during the data migration process, this solution can still determine the location of the memory data to be operated on based on the second business execution instruction and the second migration progress information, and perform the corresponding operations.

[0037] In an optional implementation, when it is determined that the migration status with the second logical address is that the migration has occurred, the method further includes:

[0038] Based on the second logical address, determine the second destination memory address corresponding to the second logical address;

[0039] According to the second service execution instruction, the memory data in the storage location corresponding to the second destination memory address is modified.

[0040] Specifically, during the data migration process, this solution can still determine the location of the memory data to be operated on based on the second business execution instruction and the second migration progress information, and perform the corresponding operations.

[0041] Secondly, the present invention provides a virtual machine migration system, the virtual machine migration system comprising a shared memory resource pool, a source node, and a destination node;

[0042] The source node, upon receiving a migration instruction for the target virtual machine, is configured to: obtain an address information table corresponding to the target virtual machine, wherein the address information table includes at least one source memory address; obtain a shared memory address corresponding to each source memory address; update the address information table based on each source memory address and the shared memory address corresponding to each source memory address; migrate the memory data of the target virtual machine from the source node to the shared memory resource pool; obtain the register data of the target virtual machine; send the updated address information table and the register data of the target virtual machine to the destination node; and stop running the target virtual machine.

[0043] The destination node is configured to migrate the memory data of the target virtual machine from the shared memory resource pool to the destination node according to each of the shared memory addresses in the updated address information table; and to run the target virtual machine according to the register data of the target virtual machine and the memory data of the target virtual machine migrated to the destination node.

[0044] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the virtual machine migration method performed by the destination node or source node in the first aspect or any corresponding embodiment.

[0045] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the virtual machine migration method of the first aspect or any corresponding embodiment thereof.

[0046] Fifthly, the present invention provides a computer program product, including computer instructions for causing a computer to execute the virtual machine migration method of the first aspect or any corresponding embodiment thereof. Attached Figure Description

[0047] To more clearly illustrate the technical solutions in the specific embodiments or related technologies of the present invention, the drawings used in the description of the specific embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0048] Figure 1 This is a schematic diagram of the architecture of a virtual machine migration system according to an embodiment of the present invention;

[0049] Figure 2 This is a flowchart illustrating a virtual machine migration method according to an embodiment of the present invention;

[0050] Figure 3 This is a schematic diagram illustrating the flow of memory data in a virtual machine according to an embodiment of the present invention;

[0051] Figure 4 This is a flowchart illustrating a method for executing virtual machine services according to an embodiment of the present invention;

[0052] Figure 5 This is a flowchart illustrating another method for executing virtual machine services according to an embodiment of the present invention;

[0053] Figure 6 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation

[0054] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0055] This invention provides a virtual machine migration system, which may include a shared memory resource pool, a source node, and a destination node, and may also include a shared memory management device. The shared memory resource pool may be a storage server composed of multiple memory modules. The shared memory management device may include a first port, a second port, and a third port. The shared memory management device can connect to the source node through the first port, to the destination node through the second port, and to the shared memory resource pool through the third port.

[0056] The source and destination nodes can be business servers used to deploy Virtual Machines (VMs). Additionally, both the source and destination nodes can have software installed to perform VM migrations, including two modules: a memory management engine and a virtualization infrastructure. That is, each node's software layer can include multiple deployed VMs, a memory management engine, and virtualization infrastructure. The VM infrastructure can be a management component for simulating, creating, and migrating VMs. The memory management engine can be further divided into two sub-modules: memory management and a memory tiering engine. The memory management engine is primarily used to connect the memory of the shared memory resource pool to its own node, providing unified management of the local memory of the node and the memory of the shared memory resource pool. The memory tiering engine provides two main functions: Swap Out and Swap In. Swap Out migrates data at a specified memory address in the source node's local memory to the memory of the shared memory resource pool, while Swap In migrates data at a specified memory address in the shared memory resource pool to the local memory of the destination node. Once connected to the shared resource memory pool, the memory management engine can scan for the shared resource memory pool and register the memory in the shared resource memory pool for use when migrating virtual machines later.

[0057] In some alternative implementations, such as Figure 1As shown, the shared memory resource pool can be a Compute Express Link (CXL) memory resource pool, and the shared memory management device can be a CXL switch. The first and second ports of the CXL switch can be Upstream, and the third port can be Downstream. The CXL memory resource pool supports both global and local memory modes. When performing virtual machine migration, the CXL memory resource pool can be set to global memory mode so that multiple hosts (i.e., the source and destination nodes mentioned above) can simultaneously use the CXL shared memory resource pool. This means each node can use its own local memory and the CXL memory provided by the CXL shared memory resource pool. The CXL switch can connect to the source and destination nodes via the Common Display Form Factor Project (CDFP) bus. For example, Figure 1 The virtual machine in the dashed box can be the target virtual machine, that is, the virtual machine that needs to be migrated online.

[0058] This invention provides a virtual machine migration method that, by connecting a shared memory resource pool between the source node and the destination node, allows the virtual machine to migrate without interrupting its services.

[0059] According to an embodiment of the present invention, a virtual machine migration method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0060] This embodiment provides a virtual machine migration method that can be applied to the virtual machine migration system described above, in which the virtual machine migration is completed through interaction between various devices in the virtual machine migration system.

[0061] Figure 2 This is a flowchart of a virtual machine migration method according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:

[0062] Step S201: When the source node receives the migration instruction for the target virtual machine, it obtains the address information table corresponding to the target virtual machine.

[0063] The address information table's data structure may include a local memory address field and a shared memory address field, or it may include a source memory address field, a shared memory address field, and a destination memory address field. Alternatively, given any of the aforementioned data structures, a length field may be included to indicate the size of the memory space occupied by the virtual machine. For example, the address information table's data structure can be as shown in Table 1.

[0064] Table 1

[0065] Fields meaning LocalAddress Local memory address Size length CXL Address Shared memory address

[0066] Specifically, when the source node starts a virtual machine, it can allocate memory space from local memory to the virtual machine and record at least one allocated source memory address in the address information table. When the source node needs maintenance, technicians can perform corresponding virtual machine migration operations on the terminal, which will then generate migration instructions based on the technicians' operations and send them to the source node. When the virtualization infrastructure in the source node receives the migration instruction for the target virtual machine, it can send a SwapOut instruction to the memory management engine in the source node. After receiving the SwapOut instruction, the memory management engine in the source node can select the address information table corresponding to the target virtual machine from the address information tables corresponding to the multiple deployed virtual machines, based on the identification information of the target virtual machine carried in the SwapOut instruction.

[0067] In some optional implementations, when the source node receives a migration instruction for the target virtual machine, it can first obtain the historical running data of the target virtual machine (including the number of received business execution instructions corresponding to multiple time periods). Based on a preset quantity threshold, it selects at least one candidate time period from multiple time periods and determines whether the target time period to which the current time point belongs is any of the at least one candidate time period. If so, it can select the time period closest to the current time from the multiple time periods excluding all candidate time periods and then execute the migration operation of the target virtual machine. If not, it can be executed directly. This can avoid the resource shortage problem caused by migrating the target virtual machine during peak business hours.

[0068] In step S202, the source node obtains the shared memory address corresponding to each source memory address.

[0069] Specifically, the memory management engine in the source node can traverse the address information table corresponding to the target virtual machine. For each source memory address encountered, it requests a shared memory address from the managed shared memory resource pool based on the preset storage space size. After traversing all source memory addresses in the address information table, the shared memory address corresponding to each source memory address can be obtained.

[0070] In step S203, the source node updates the address information table based on each source memory address and the shared memory address corresponding to each source memory address, and migrates the memory data of the target virtual machine from the source node to the shared memory resource pool.

[0071] Specifically, during the traversal process, the memory management engine in the source node can fill the first shared memory address encountered into the shared memory address field corresponding to the first source memory address in the address information table. Thus, after filling the shared memory address of each source memory address into the corresponding shared memory address field, an updated address information table can be obtained. Here, the first source memory address is any one of at least one source memory address, and the first shared memory address is the shared memory address corresponding to the first source memory address. After completing the traversal process, the memory management engine of the source node can send the updated address information table to the virtualization infrastructure in the source node. Additionally, the memory management engine in the source node can migrate (replace, cut) the memory data in the storage location corresponding to the first source memory address to the storage location corresponding to the first shared memory address. Thus, after migrating the memory data in the storage location corresponding to each source memory address to the corresponding shared memory address in the shared memory resource pool, the operation of migrating the target virtual machine's memory data from the source node to the shared memory resource pool is completed.

[0072] Step S204: The source node obtains the register data of the target virtual machine.

[0073] The register data of the target virtual machine is the result of the calculations performed by the processor of the target virtual machine.

[0074] In step S205, the source node sends the updated address information table and the register data of the target virtual machine to the destination node.

[0075] Specifically, after receiving the updated address information table, the virtualization infrastructure of the source node can obtain the register data of the target virtual machine and send the updated address information table and the register data of the target virtual machine to the virtualization infrastructure of the destination node. After receiving the updated address information table and the register data of the target virtual machine, the virtualization infrastructure of the destination node can send an acknowledgment command to the virtualization infrastructure of the source node to inform the source node that data reception is complete.

[0076] Step S206: The source node stops running the target virtual machine.

[0077] Specifically, after receiving the acknowledgment command, the source node can shut down the target virtual machine running on it. Alternatively, the source node can also directly shut down the target virtual machine running on it after sending the updated address information table and the target virtual machine's register data.

[0078] In step S207, the destination node migrates the memory data of the target virtual machine from the shared memory resource pool to the destination node according to each shared memory address in the updated address information table.

[0079] Specifically, after receiving the updated address information table and the register data of the target virtual machine, the virtualization infrastructure of the destination node can send the Swap In instruction and the updated address information table to the memory management engine of the destination node. The memory management engine of the destination node can traverse each shared memory address in the updated address information table. Upon encountering a shared memory address, it allocates a destination memory address based on a preset storage space size. In this way, the memory management engine of the destination node can migrate the memory data in the storage location corresponding to the first shared memory address to the storage location corresponding to the first destination memory address. Here, the first destination memory address is the destination memory address allocated to the first shared memory address.

[0080] In some optional implementations, during the traversal in step S207, the memory management engine of the destination node can update the address information table again, specifically:

[0081] When the address information table's data structure includes both a local memory address field and a shared memory address field, the destination node's memory management engine can also replace the first source memory address corresponding to the first shared memory address in the address information table with the first destination memory address. In other words, it modifies the local memory address field corresponding to the first shared memory address to the first destination memory address. Thus, for each shared memory address, the corresponding local memory address field can be overwritten to obtain a further updated address information table.

[0082] Alternatively, when the address information table's data structure includes a source memory address field, a shared memory address field, and a destination memory address field, the destination node's memory management engine can also fill the first destination memory address with the destination memory address field corresponding to the first shared memory address from the address information table. In this way, for each shared memory address, the corresponding destination memory address field can be overwritten, resulting in a further updated address information table.

[0083] In this way, when the target node needs to be maintained in the future, the updated address information table can be used directly to migrate the target virtual machine.

[0084] In step S208, the destination node runs the target virtual machine based on the register data of the target virtual machine and the memory data of the target virtual machine migrated to the destination node.

[0085] Specifically, after the migration of the target virtual machine is completed, the virtualization infrastructure in the destination node can start running the target virtual machine on it.

[0086] like Figure 3 As shown, the data flow process of the target virtual machine during the entire migration process is given. That is, non-memory data (register data and address information table) flows from the source node to the destination node through the network, and memory data flows from the local memory of the source node to the shared memory resource pool (CXL memory), and then to the local memory of the destination node.

[0087] The virtual machine migration method provided in this embodiment creates a shared memory resource pool between the source node and the destination node, dividing the migration process of the target virtual machine into two stages: one is the source node migrating the target virtual machine's memory data from itself to the shared memory resource pool, and the other is the destination node migrating the target virtual machine's memory data from the shared memory resource pool to itself. During the migration process, the memory data storage location of the target virtual machine changes; therefore, an address information table is used to record the correspondence between the source memory address and the shared memory address. Thus, during this migration process, the source node can still perform business operations on the target virtual machine through the address information table, as well as the incompletely migrated data in its own memory or the completed migrated data in the shared memory resource pool. When the destination node receives the updated address information table and the target virtual machine's register data, it can begin migrating the target virtual machine's memory data from the shared memory resource pool to its own memory. During this migration process, the destination node can still perform business operations on the target virtual machine through the address information table, the completed migrated data in its own memory, or the incompletely migrated data in the shared memory resource pool. The entire migration process does not require the target virtual machine to pause its operations, thus reducing the impact on the target virtual machine's business operations during the migration process. In addition, this solution does not consume network resources, which can reduce the impact on other services when migrating virtual machines online.

[0088] During the migration of the target virtual machine's memory data from the source node to the shared memory resource pool, the target virtual machine still needs to execute corresponding business functions. Therefore, this embodiment provides a method for executing virtual machine business functions, which can be executed by the aforementioned source node. For example... Figure 4 As shown, the process includes the following steps:

[0089] Step S401: When the source node receives the first service execution instruction for the target virtual machine, it determines the first logical address of the memory data operated by the first service execution instruction based on the first service execution instruction.

[0090] Specifically, during the process of the source node migrating the target virtual machine's memory data from itself to the shared memory resource pool, it may receive a service execution instruction for the target virtual machine. At this time, the virtualization infrastructure of the source node can parse the first service execution instruction to obtain the first logical address and operation information of the memory data that the first service execution instruction needs to operate on.

[0091] Step S402: Obtain the first migration progress information.

[0092] The first migration progress information includes at least one logical address and a migration status corresponding to each logical address, wherein the migration status is either migrated or not migrated.

[0093] Step S403: Based on the first logical address, obtain the migration status corresponding to the first logical address from the first migration progress information.

[0094] Specifically, after each migration operation of a source memory address is completed, the source node's memory management engine can determine the logical address corresponding to that source memory address based on the first correspondence table between source memory addresses and logical addresses, and mark it as migrated. Thus, each logical address in the first correspondence table and its marked status constitute the first migration progress information. When the virtualization infrastructure of the source node receives a service execution instruction, it can first obtain the first migration progress information of the target virtual machine, determine the migration status corresponding to the first logical address from the first migration progress information, and thus determine whether the data to be operated on is in the source node or the shared memory resource pool.

[0095] Step S404: When it is determined that the migration status corresponding to the first logical address is that it has been migrated, the second shared memory address corresponding to the first logical address is determined according to the first logical address.

[0096] Specifically, when the virtualization infrastructure of the source node determines that the migration status corresponding to the first logical address is "migrated," it indicates that the data operated on by the first service execution instruction is in the shared memory resource pool. At this time, the second source memory address corresponding to the first logical address can be determined in the first correspondence table based on the first logical address, and then the corresponding second shared memory address can be determined in the updated address information table based on the second source memory address.

[0097] Step S405: Modify the memory data in the storage location corresponding to the second shared memory address according to the first service execution instruction.

[0098] Specifically, the virtualization infrastructure of the source node can modify the memory data in the second shared memory address based on the operation information in the first service execution instruction.

[0099] Step S406: When it is determined that the migration status corresponding to the first logical address is not migrated, the second source memory address corresponding to the first logical address is determined according to the first logical address.

[0100] Specifically, when the virtualization infrastructure of the source node determines that the migration status corresponding to the first logical address is not migrated, it indicates that the data operated on by the first service execution instruction is in the shared memory resource pool. At this time, the second source memory address corresponding to the first logical address can be determined in the first correspondence table based on the first logical address.

[0101] Step S407: Modify the memory data in the storage location corresponding to the second source memory address according to the first service execution instruction.

[0102] Specifically, the virtualization infrastructure of the source node can modify the memory data in the second source memory address based on the operation information in the first service execution instruction.

[0103] The method for executing virtual machine services provided in this embodiment can, during the online migration of a virtual machine, modify the data based on the actual physical location of the data operated by the execution instruction to execute the service related to the target virtual machine when a service execution instruction related to the target virtual machine is received.

[0104] During the migration of the target virtual machine's memory data from the shared memory resource pool to the destination node, the target virtual machine still needs to execute corresponding business functions. Therefore, this embodiment provides a method for executing virtual machine business functions, which can be executed by the aforementioned destination node. Figure 5 As shown, the process includes the following steps:

[0105] Step S501: When the destination node receives the second service execution instruction for the target virtual machine, it determines the second logical address of the memory data operated by the second service execution instruction according to the second service execution instruction.

[0106] Specifically, during the process of migrating the target virtual machine's memory data from the shared memory resource pool to itself, the destination node may receive a service execution instruction for the target virtual machine. At this time, the virtualization infrastructure of the destination node can parse the second service execution instruction to obtain the second logical address and operation information of the memory data that the second service execution instruction needs to operate on.

[0107] Step S502: Obtain the second migration progress information.

[0108] The second migration progress information includes at least one logical address and the migration status corresponding to each logical address, which is either "has been migrated" or "has not been migrated".

[0109] Step S503: Based on the second logical address, obtain the migration status corresponding to the second logical address from the second migration progress information.

[0110] Specifically, after each shared memory address migration operation is completed, the destination node's memory management engine can determine the destination memory address corresponding to the shared memory address based on the address information table updated in step S207. It can also determine the logical address corresponding to the destination memory address based on the second correspondence table between the destination memory address and logical addresses, marking it as migrated. Thus, each logical address in the second correspondence table and its marked status constitute the second migration progress information. When the virtualization infrastructure of the destination node receives a service execution instruction, it can first obtain the second migration progress information of the target virtual machine, determine the migration status corresponding to the second logical address from the second migration progress information, and thus determine whether the data to be operated on is in the destination node or the shared memory resource pool.

[0111] Step S504: When it is determined that the migration status corresponding to the second logical address is not migrated, the second shared memory address corresponding to the second logical address is determined according to the second logical address.

[0112] Specifically, when the virtualization infrastructure of the destination node determines that the migration status corresponding to the second logical address is not migrated, it indicates that the data operated on by the second service execution instruction is still in the shared memory resource pool. At this time, the second destination memory address corresponding to the second logical address can be determined in the second correspondence table based on the second logical address, and then the corresponding second shared memory address can be determined in the updated address information table based on the second destination memory address.

[0113] Step S505: Modify the memory data in the storage location corresponding to the second shared memory address according to the second service execution instruction.

[0114] Specifically, the virtualization infrastructure of the destination node can modify the memory data in the second shared memory address based on the operation information in the second service execution instruction.

[0115] Step S506: When it is determined that the migration status of the second logical address is that it has been migrated, the second destination memory address corresponding to the second logical address is determined according to the second logical address.

[0116] Specifically, when the virtualization infrastructure of the destination node determines that the migration status corresponding to the second logical address is "migrated," it indicates that the data operated on by the second service execution instruction is in the destination node. At this time, the second destination memory address corresponding to the second logical address can be determined in the second correspondence table based on the second logical address.

[0117] Step S507: Modify the memory data in the storage location corresponding to the second destination memory address according to the second service execution instruction.

[0118] Specifically, the virtualization infrastructure of the destination node can modify the memory data in the second destination memory address based on the operation information in the second service execution instruction.

[0119] The method for executing virtual machine services provided in this embodiment can, during the online migration of a virtual machine, modify the data based on the actual physical location of the data operated by the execution instruction to execute the service related to the target virtual machine when a service execution instruction related to the target virtual machine is received.

[0120] This invention also provides a computer device, which can be the aforementioned destination node or source node.

[0121] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 6 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 6 Take a processor 10 as an example.

[0122] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware integrated circuit. The aforementioned hardware integrated circuit may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0123] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.

[0124] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

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

[0126] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.

[0127] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0128] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

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

Claims

1. A virtual machine migration method, characterized in that, The method is applied to a virtual machine migration system, which includes a shared memory resource pool, a source node, and a destination node. The method includes: When the source node receives a migration instruction for the target virtual machine, it obtains an address information table corresponding to the target virtual machine, wherein the address information table includes at least one source memory address; based on each source memory address, it obtains a shared memory address corresponding to each source memory address; based on each source memory address and the shared memory address corresponding to each source memory address, it updates the address information table and migrates the memory data of the target virtual machine from the source node to the shared memory resource pool; it obtains the register data of the target virtual machine; it sends the updated address information table and the register data of the target virtual machine to the destination node; after completing the sending operation of the address information table and the register data, or after receiving a response instruction sent by the destination node, it stops running the target virtual machine, wherein the response instruction is used to inform the source node that the destination node has received the address information table and the register data; The destination node migrates the memory data of the target virtual machine from the shared memory resource pool to the destination node according to each shared memory address in the updated address information table; and runs the target virtual machine according to the register data of the target virtual machine and the memory data of the target virtual machine migrated to the destination node. During the migration of the target virtual machine's memory data from the source node to the shared memory resource pool, when the source node receives a first service execution instruction for the target virtual machine, it determines the first logical address of the memory data operated by the first service execution instruction based on the first service execution instruction; it obtains first migration progress information, wherein the first migration progress information includes at least one logical address and a migration status corresponding to each logical address, the migration status being either migrated or not migrated; it obtains the migration status corresponding to the first logical address from the first migration progress information based on the first logical address; when it is determined that the migration status corresponding to the first logical address is "migrated", it determines the second shared memory address corresponding to the first logical address based on the first logical address; and it modifies the memory data in the storage location corresponding to the second shared memory address according to the first service execution instruction.

2. The method according to claim 1, characterized in that, The step of updating the address information table based on each source memory address and the corresponding shared memory address, and migrating the memory data of the target virtual machine from the source node to the shared memory resource pool, includes: The first shared memory address is filled into the shared memory address field corresponding to the first source memory address in the address information table, wherein the first source memory address is any one of the at least one source memory address, and the first shared memory address is the shared memory address corresponding to the first source memory address; The memory data in the storage location corresponding to the first source memory address is migrated to the storage location corresponding to the first shared memory address.

3. The method according to claim 1, characterized in that, The step of migrating the memory data of the target virtual machine from the shared memory resource pool to the destination node according to each shared memory address in the updated address information table includes: The shared memory address in the updated address information table is traversed. For each shared memory address traversed, a destination memory address is allocated to the traversed shared memory address according to the preset storage space size. The memory data in the storage location corresponding to the first shared memory address is migrated to the storage location corresponding to the first destination memory address, wherein the first destination memory address is the destination memory address allocated to the first shared memory address.

4. The method according to any one of claims 1 to 3, characterized in that, When the migration status corresponding to the first logical address is determined to be "not migrated", the method further includes: Based on the first logical address, determine the second source memory address corresponding to the first logical address; According to the first service execution instruction, the memory data in the storage location corresponding to the second source memory address is modified.

5. The method according to claim 1 or 3, characterized in that, In the process of migrating the memory data of the target virtual machine from the shared memory resource pool to the destination node, the method further includes: When the destination node receives a second service execution instruction for the target virtual machine, it determines the second logical address of the memory data operated by the second service execution instruction based on the second service execution instruction. Obtain second migration progress information, wherein the second migration progress information includes at least one logical address and a migration status corresponding to each logical address, the migration status being either migrated or not migrated; Based on the second logical address, obtain the migration status corresponding to the second logical address from the second migration progress information; When it is determined that the migration status corresponding to the second logical address is "not migrated", the second shared memory address corresponding to the second logical address is determined according to the second logical address; According to the second service execution instruction, the memory data in the storage location corresponding to the second shared memory address is modified.

6. The method according to claim 5, characterized in that, When the migration status of the second logical address is determined to be "already migrated", the method further includes: Based on the second logical address, determine the second destination memory address corresponding to the second logical address; According to the second service execution instruction, the memory data in the storage location corresponding to the second destination memory address is modified.

7. A virtual machine migration system, characterized in that, The virtual machine migration system includes a shared memory resource pool, a source node, and a destination node; The source node, upon receiving a migration instruction for a target virtual machine, is configured to: obtain an address information table corresponding to the target virtual machine, wherein the address information table includes at least one source memory address; obtain a shared memory address corresponding to each source memory address; update the address information table based on each source memory address and the shared memory address corresponding to each source memory address, and migrate the memory data of the target virtual machine from the source node to the shared memory resource pool; obtain the register data of the target virtual machine; send the updated address information table and the register data of the target virtual machine to the destination node; and stop running the target virtual machine after completing the sending operation of the address information table and the register data, or after receiving a response instruction from the destination node, wherein the response instruction is used to inform the source node that the destination node has received the address information table and the register data. The destination node is configured to migrate the memory data of the target virtual machine from the shared memory resource pool to the destination node according to each shared memory address in the updated address information table; and to run the target virtual machine according to the register data of the target virtual machine and the memory data of the target virtual machine migrated to the destination node. During the migration of the target virtual machine's memory data from the source node to the shared memory resource pool, when the source node receives a first service execution instruction for the target virtual machine, it determines the first logical address of the memory data operated by the first service execution instruction based on the first service execution instruction; it obtains first migration progress information, wherein the first migration progress information includes at least one logical address and a migration status corresponding to each logical address, the migration status being either migrated or not migrated; it obtains the migration status corresponding to the first logical address from the first migration progress information based on the first logical address; when it is determined that the migration status corresponding to the first logical address is "migrated", it determines the second shared memory address corresponding to the first logical address based on the first logical address; and it modifies the memory data in the storage location corresponding to the second shared memory address according to the first service execution instruction.

8. A computer device, characterized in that, include: The memory and the processor are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform any virtual machine migration method executed by the source node or any virtual machine migration method executed by the destination node as described in claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the virtual machine migration method according to any one of claims 1 to 6.