Virtual machine migration method and system and computing equipment

By using a custom UDP protocol during virtual machine migration and adding packet loss indication and transmission status fields, the delay problem caused by TCP congestion control is solved, efficient and reliable virtual machine migration is achieved, and the user experience is improved.

CN120762853APending Publication Date: 2025-10-10HENAN KUNLUN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

When the network load is high or the packet loss rate increases, the existing virtual machine migration technology uses TCP's congestion control mechanism to increase data transmission delay, affecting migration efficiency and becoming a bottleneck restricting virtual machine migration performance.

Method used

A custom UDP protocol is used to add packet loss indication fields and transmission status fields to data packets. Data is transmitted through the custom UDP protocol to reduce transmission delays. When network packet loss occurs, lost data packets are quickly retransmitted based on these fields, ensuring the reliability and efficiency of virtual machine migration.

Benefits of technology

By using a custom UDP protocol, the delay in the virtual machine migration process is reduced, the migration efficiency and reliability are improved, the requirements for high reliability and high efficiency of virtual machine migration are met, and the user experience is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120762853A_ABST
    Figure CN120762853A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a virtual machine migration method and system and computing equipment. The method comprises the following steps: under the condition that a communication channel between a source server and a target server is established, the source server sends a UDP data packet to the target server through a user-defined UDP protocol; the UDP data packet comprises a packet loss indication field and a transmission state field; the data part of the UDP data packet carries memory data of the source virtual machine, a CPU running state, equipment state information and the like; the source server receives the UDP acknowledgement data packet, and generates a UDP retransmission data packet based on a packet loss indication field in the UDP acknowledgement data packet; the source server sends the UDP retransmission data packet to a target server through a user-defined UDP protocol; and the source server closes the source virtual machine and notifies the target server to recover the target virtual machine, and after the target virtual machine is recovered, the source server deletes the source virtual machine. By the adoption of the mode, the high-reliability and high-efficiency virtual machine migration requirements can be met at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communication technology, and in particular to a virtual machine migration method, system, and computing device. Background Art

[0002] Live VM migration is a technology that migrates a VM from one server to another with minimal disruption to business operations. During this process, the VM's operating system, applications, and services continue to run, with users experiencing only brief delays or no noticeable delays. This maximizes business continuity and meets the high availability and dynamic resource management requirements of cloud computing data centers.

[0003] Currently, virtual machine migration generally uses the TCP protocol for data transmission. With its reliable transmission mechanism, TCP ensures the integrity and accuracy of migration data. However, in real-world applications, when network loads are excessive or packet loss rates increase, TCP's congestion control mechanism can significantly increase data transmission delays, compromising virtual machine migration efficiency and becoming a significant bottleneck restricting virtual machine migration performance. Summary of the Invention

[0004] The embodiments of the present application provide a virtual machine migration method that can simultaneously meet the requirements of high reliability and high efficiency of virtual machine migration.

[0005] To achieve the above objectives, the present invention adopts the following technical solutions:

[0006] In the first aspect, an embodiment of the present application provides a virtual machine migration method, which is applied to a source server, and the method includes: when the communication channel between the source server and the target server is established, the source server sends a UDP data packet to the target server through a custom UDP protocol; the UDP data packet includes a preset custom field and a data part, and the custom field includes a packet loss indication field and a transmission status field; the data part carries the memory data, CPU operating status and device status information of the source virtual machine; the source server receives a UDP confirmation data packet, and generates a UDP retransmission data packet based on the packet loss indication field in the UDP confirmation data packet; the UDP retransmission data packet includes the UDP data packet lost during the migration of the source virtual machine; the source server sends the UDP retransmission data packet to the target server through a custom UDP protocol; the source server shuts down the source virtual machine, notifies the target server to restore the target virtual machine, and after the recovery of the target virtual machine is completed, the source server deletes the source virtual machine.

[0007] Based on this solution, by adding a packet loss indication field and a transmission status field in the UDP data packet, the relevant data of the source virtual machine is migrated to another server. In this way, when using the above-mentioned custom UDP protocol for data transmission, the delay in the transmission process can be reduced; when using the above-mentioned custom UDP protocol for data transmission, the delay in the transmission process can be reduced; if packet loss occurs in network transmission, the corresponding UDP data packet can be quickly retransmitted according to the packet loss indication field and the transmission status field, thereby ensuring the reliability of virtual machine migration. In this way, the requirements of high reliability and high efficiency of virtual machine migration can be met at the same time, and the user experience can be improved.

[0008] In one possible implementation, when the communication channel between the source server and the target server is established, the source server migrates the UDP data packet to the target server through a custom UDP protocol, including: when the communication protocol between the source server and the target server is established, the source server transfers the full memory page to the target server through the custom UDP protocol; after the full memory page is transferred, the source server transfers the incremental memory page to the target server through the custom UDP protocol; wherein the incremental memory page is the memory data generated during the transfer of the full memory page; when it is determined that the generation rate of the remaining incremental memory pages is greater than a preset threshold, the source server suspends the operation of the source virtual machine, and transfers the remaining incremental memory pages, CPU operation status and device status information of the source virtual machine to the target server through the custom UDP protocol.

[0009] Based on this solution, virtual machine migration is divided into three stages. First, the full memory pages corresponding to all virtual machines are transferred to the target server. Second, during the migration of historical virtual machines, new incremental memory pages are generated and transferred to the target server. Finally, the remaining incremental memory pages, CPU operating status, and device status information are uniformly transferred to the target server. In this way, the efficiency of virtual machine migration can be guaranteed through the migration data at different stages.

[0010] In one possible implementation, the source server receives a UDP confirmation data packet, and generates a UDP retransmission data packet based on the packet loss indication field in the UDP confirmation data packet, including: the source server receives a UDP confirmation data packet, and searches for the lost UDP data packet in the first memory buffer based on the packet loss indication field and the transmission status field in the UDP confirmation data packet; the source server generates a retransmission data packet based on the lost UDP data packet.

[0011] Based on this solution, the source server confirms the custom packet loss indication field in the UDP data packet, which can determine the data packets lost during the virtual machine migration process. After determining the lost data packets, the lost data packets are retransmitted to the target server, which can improve the efficiency of virtual machine migration.

[0012] In a possible implementation, the source server copies the UDP data packet to the first memory buffer based on the custom field in the UDP data packet, and the first memory buffer is a storage area for representing data.

[0013] According to the scheme, the source server copies the UDP data packet to the first memory buffer, which provides data for subsequent possible retransmission of the UDP data packet.

[0014] In a possible implementation, the determination of the establishment of the communication channel between the source server and the target server includes: the source server sends an initialization message to the target server, wherein the initialization message contains verification information, and the verification information is used to request the establishment of the communication channel with the target server; and the source server receives an acknowledgement message to determine that the communication channel between the source server and the target server is established.

[0015] According to the scheme, the source server creates a communication channel before sending the UDP data packet to the target server, and sends an initialization message to request the establishment of the communication channel, so that it can be ensured that the source server and the target server are both ready for data transmission.

[0016] In the second aspect, the embodiments of the application also provide a virtual machine migration method applied to a target server, and the method includes: the target server receives a UDP data packet and periodically generates a UDP acknowledgement data packet; the UDP acknowledgement data packet includes a packet loss indication field; the target server periodically sends the UDP acknowledgement data packet to a source server; the target server receives a UDP retransmission data packet, and the UDP retransmission data packet includes a UDP data packet lost in a source virtual machine migration process; and the target server restores a target virtual machine.

[0017] According to the scheme, the related data of the source virtual machine is migrated to another server by customizing the UDP protocol in the UDP data packet, so that the delay in the transmission process can be reduced when the data is transmitted by using the custom UDP protocol; the delay in the transmission process can be reduced when the data is transmitted by using the custom UDP protocol; if packet loss occurs in the network transmission, the corresponding UDP data packet can be quickly retransmitted according to the packet loss indication field and the transmission state field, so as to ensure the reliability of the virtual machine migration, so that the high-reliability and high-efficiency virtual machine migration requirements can be met at the same time, and the user experience is improved.

[0018] In a possible implementation, the target server copies the UDP data packet to the second memory buffer based on the custom field in the UDP data packet, and the second memory buffer is a storage area for representing data.

[0019] Based on this solution, the target server copies the UDP data packet to the second memory buffer to provide a basis for subsequent processing.

[0020] In one possible implementation, establishing a communication channel between a source server and a target server includes: the target server receiving an initialization message, initializing the communication channel based on the initialization message, and creating a second memory buffer; wherein the second memory buffer is a storage area for representing data; the target server generating a confirmation message, wherein the initialization message includes verification information, and the verification information is used to request to establish a communication channel with the target server; and the target server sending a confirmation message to the source server.

[0021] Based on this solution, the source server creates a communication channel and sends an initialization message before sending a UDP packet to the target server. This allows the target server to complete preparations in advance, such as initializing the communication channel and creating a buffer, which can reduce the delay after the actual data transmission begins.

[0022] On the third aspect, an embodiment of the present application also provides a virtual machine migration device, which is applied to a source server, and the device includes: a first migration module, configured to: when the communication channel between the source server and the target server is established, send a UDP data packet to the target server through a custom UDP protocol; the custom part in the UDP data packet includes a custom field preset by the source, and the custom field includes a packet loss indication field and a transmission status field; the data part of the UDP data packet carries the memory data, CPU operating status and device status information of the source virtual machine; a generation module, configured to: receive UDP data packets, and periodically generate UDP confirmation data packets, and periodically send UDP confirmation data packets to the source server; wherein the UDP confirmation data packet includes a packet loss indication field; a processing module, configured to: shut down the source virtual machine, notify the target server to restore the target virtual machine; after the recovery of the target virtual machine is completed, delete the source virtual machine.

[0023] Based on this solution, by adding a packet loss indication field and a transmission status field in the UDP data packet, when using the above-mentioned custom UDP protocol for data transmission, the delay in the transmission process can be reduced; when using the above-mentioned custom UDP protocol for data transmission, the delay in the transmission process can be reduced; if packet loss occurs in network transmission, the corresponding UDP data packet can be quickly retransmitted according to the packet loss indication field and the transmission status field, thereby ensuring the reliability of virtual machine migration. In this way, the requirements of high reliability and high efficiency of virtual machine migration can be met at the same time, and the user experience can be improved.

[0024] In one possible implementation, the first migration module is specifically configured as follows: when the communication protocol between the source server and the target server is established, the full memory pages are transferred to the target server through a custom UDP protocol; after the full memory page transfer is completed, the source server transfers the incremental memory pages to the target server through a custom UDP protocol; wherein, the incremental memory pages are memory data generated during the transmission of the full memory pages; when it is determined that the remaining incremental memory pages meet the preset conditions, the source server suspends the operation of the source virtual machine, and transmits the remaining incremental memory pages, CPU operating status and device status information of the source virtual machine to the target server through a custom UDP protocol.

[0025] In one possible implementation, the generation module is specifically configured to: receive a UDP confirmation data packet, and based on the custom part in the UDP confirmation data packet including a packet loss indication field and a transmission status field, search for the lost UDP data packet in the first memory buffer; the source server generates a retransmission data packet based on the lost UDP data packet.

[0026] In a possible implementation, a first copy module is further included, and the first copy module is further configured to: copy the UDP data packet to a first memory buffer based on a custom field in the UDP data packet, and the first memory buffer is a storage area for representing data.

[0027] In a possible implementation, a preparation module is also included, which is configured as follows: the source server sends an initialization message to the target server, wherein the initialization message includes verification information, and the verification information is used to request to establish a communication protocol with the target server; the source server receives a confirmation message to determine that the communication protocol between the source server and the target server is established.

[0028] In the fourth aspect, an embodiment of the present application also provides a virtual machine migration device, which is applied to a target server. The device includes: a generation module, which is configured to: receive UDP data packets and periodically generate UDP confirmation data packets; wherein the UDP confirmation data packets include a packet loss indication field; and a sending module, which is configured to: periodically send UDP confirmation data packets to the source server.

[0029] Based on this solution, a custom UDP protocol is obtained by adding a packet loss indication field and a transmission status field to the UDP protocol. The source virtual machine is further migrated to another server through the custom UDP protocol. In this way, when using the above-mentioned custom UDP protocol for data transmission, the delay in the transmission process can be reduced; when using the above-mentioned custom UDP protocol for data transmission, the delay in the transmission process can be reduced; if packet loss occurs in network transmission, the corresponding UDP data packet can be quickly retransmitted according to the packet loss indication field and the transmission status field, thereby ensuring the reliability of virtual machine migration. In this way, the requirements of high reliability and high efficiency of virtual machine migration can be met at the same time, and the user experience is improved.

[0030] In one possible implementation, the generation module is specifically configured as follows: the target server receives a UDP data packet and obtains the lost packet sequence number and loss quantity corresponding to the UDP data packet; the target server periodically generates a UDP confirmation data packet based on the lost packet sequence number and loss quantity.

[0031] In a fifth aspect, an embodiment of the present application further provides a computing device comprising: a processor and a memory; the processor and the memory are coupled; the memory is used to store program instructions; and the processor is used to execute program instructions to execute a method as described in any one of the first aspects above.

[0032] In a sixth aspect, an embodiment of the present application provides a chip, which is used to execute any method as described in the first aspect above.

[0033] In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a computer, the method as described in any one of the first aspects is implemented.

[0034] In an eighth aspect, an embodiment of the present application provides a program product, comprising a computer program, which implements any method in the first aspect when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 This is a flow chart of a virtual machine migration method provided in an embodiment of the present application;

[0036] Figure 2 This is a schematic diagram of a framework of a virtual machine migration method provided in an embodiment of the present application;

[0037] Figure 3 This is a flow chart of a communication channel method provided in an embodiment of the present application;

[0038] Figure 4 This is a flow chart of a virtual machine migration method provided in an embodiment of the present application;

[0039] Figure 5 This is a schematic diagram of a memory buffer of a source server provided in an embodiment of the present application;

[0040] Figure 6 This is a schematic diagram of the structure of a data packet in a custom UDP protocol format provided in an embodiment of the present application;

[0041] Figure 7 This is a flow chart of a virtual machine migration process provided by an embodiment of the present application;

[0042] Figure 8 This is a flow chart of generating a UDP confirmation data packet provided by an embodiment of the present application;

[0043] Figure 9 This is a schematic diagram of periodically processing UDP data packets provided by an embodiment of the present application;

[0044] Figure 10 This is a schematic diagram of a virtual machine migration device provided in an embodiment of the present application;

[0045] Figure 11 This is a schematic diagram of another virtual machine migration device provided in an embodiment of the present application;

[0046] Figure 12 This is a schematic diagram of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] The following will describe the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings. To facilitate the clear description of the technical solutions in the embodiments of the present application, the first, second, etc. descriptions in the embodiments of the present application are only used for illustration and to distinguish the described objects. There is no order, nor does it represent a special limitation on the number of devices in the embodiments of the present application, and it does not constitute any limitation on the embodiments of the present application.

[0048] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0049] It should be noted that many specific details are set forth in the following description to facilitate a full understanding of the present application. However, the present application can also be implemented in other ways different from those described herein. Therefore, the scope of protection of the present application is not limited to the specific implementation methods disclosed below.

[0050] In the description of this application, it should be understood that the terms "upper", "lower", "horizontal", "bottom", "inner", "outer" (if any), etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are intended only to facilitate the description of this application and simplify the description. They do not indicate or imply that the devices or elements referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore should not be understood as limiting this application. In this application, unless otherwise expressly specified or limited, a first feature being "upper" or "lower" than a second feature may mean that the first and second features are in direct contact, or that the first and second features are in indirect contact through an intermediate medium.

[0051] In this application, unless otherwise expressly specified or limited, terms such as "connected," "connected," and "fixed" should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integration; they can refer to direct connections or indirect connections through an intermediate medium; they can refer to internal communication between two components or interactions between two components. However, the term "directly connected" indicates that the two connected entities are not connected through a transition structure, but are connected solely through a connecting structure to form a single entity. Those skilled in the art will understand the specific meanings of these terms in this application based on the specific circumstances.

[0052] In this application, references to "first," "second," and the like are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, features specified as "first" or "second" may explicitly or implicitly include at least one of these features.

[0053] The following explains the professional terms mentioned in the embodiments of the present application to facilitate understanding by those skilled in the art.

[0054] A virtual machine (VM) is a computer program or system that simulates the hardware operating environment of a physical computer through software, allowing multiple operating systems to run simultaneously on the same physical machine.

[0055] The Transmission Control Protocol (TCP) is a transport layer protocol in the TCP / IP protocol stack, providing reliable, connection-oriented communication services within a network. Before data can be transmitted, TCP must establish a connection, which is accomplished through a three-way handshake. Specifically, the sender sends a message requesting a connection to the receiver. After receiving the message, the receiver sends an acknowledgment message to the sender. The sender then sends another acknowledgment message to the server, confirming the successful connection.

[0056] The User Datagram Protocol (UDP) is another transport layer protocol in the TCP / IP stack, providing a connectionless, unreliable data transmission service. Unlike TCP, UDP does not guarantee reliable data transmission and does not maintain connection state. It is primarily used in scenarios where transmission speed and latency are critical. UDP does not guarantee that a data packet will successfully reach its destination. If a data packet is lost during network transmission, UDP will not automatically retransmit it.

[0057] Dirty pages are memory pages that have been modified while a virtual machine is running but have not yet been synchronized to the target host. While a virtual machine is running, the data in its memory may be frequently modified. During virtual machine migration, the virtual machine's memory pages must be transferred from the source host to the target host. If certain memory pages change during this transfer, these pages are marked as dirty.

[0058] An embodiment of virtual machine migration is described below with reference to the accompanying drawings.

[0059] like Figure 1 and Figure 2 As shown, the virtual machine migration method provided in one embodiment of the present application includes the following steps:

[0060] Step S1: Build a communication channel between the source server and the target server.

[0061] In various embodiments of the present application, there may be multiple ways to construct the communication channel depending on the source server and the target server.

[0062] In one implementation, Figure 3 and Figure 4 As shown, step S1 includes steps S11 to S14.

[0063] Step S11: The source server sends an initialization message to the target server.

[0064] Exemplarily, the initialization message is used to request that a source server establish a communication connection with a target server. The initialization message includes verification information, which is used to request that the target server authenticate the source server initiating the connection to ensure a secure communication channel can be established between the two parties. The verification information may include at least one of the source server's identity, a timestamp, and session key parameters. The verification information is then encapsulated into an initialization message in a UDP message format.

[0065] Step S12: The target server receives the initialization message, initializes the communication channel and generates a confirmation message.

[0066] Exemplarily, the confirmation message may include a confirmation flag and a timestamp.

[0067] Since the UDP protocol does not guarantee the order of data packets, the receiving end may receive a data packet that is sent later, or receive a data packet that is sent earlier later. A memory area can be used to store data packets to ensure the reliability of the data stream, which is explained below in conjunction with steps S13 and S14.

[0068] Step S13: The source server creates a first memory buffer.

[0069] Figure 5 This is a schematic diagram of a memory buffer provided in an embodiment of the present application.

[0070] like Figure 5 As shown in (a), the first memory buffer is a ring buffer, also known as a circular queue. Specifically, taking it as the sending end as an example, this ring buffer is a cache area connected head to tail, wherein the number of elements in the buffer is N (for example, 1024), head_c is the head pointer, and tail_c is the tail pointer, and head_c and tail_c point to the cached UDP data packets. For example, when a UDP data packet needs to be added to the circular queue, the tail_c pointer is increased by 1 and the remainder is N. When a UDP data packet needs to be deleted from the ring buffer, the head_c pointer is increased by 1 and the remainder is N. When head_c is equal to tail_c, it means that the buffer is empty. When tail_c is increased by 1 and the remainder is equal to head_c, it means that the buffer is full and no more UDP data packets can be added.

[0071] It should be noted that the order of step S13 is not specifically limited, and it can be performed before step S12, after step S13, or simultaneously with step S12.

[0072] Step S14: The target server creates a second memory buffer.

[0073] like Figure 5As shown in (b), the second memory buffer is a ring buffer, also known as a circular buffer. Specifically, taking it as the receiving end as an example, this ring buffer is a cache area connected head to tail, wherein the number of elements in the buffer is N (for example, 1024), head_s is the head pointer, tail_s is the tail pointer, and head_s and tail_s point to the cached UDP data packets. For example, when a UDP data packet needs to be added to the circular queue, the tail_s pointer is incremented by 1 and the modulus is N. When a UDP data packet needs to be deleted from the ring buffer, the head_s pointer is incremented by 1 and the modulus is N. When head_s is equal to tail_s, it means that the buffer is empty. When tail_s is incremented by 1 and the modulus is equal to head_s, it means that the buffer is full and no more UDP data packets can be added. For example, due to the complexity of network transmission, the data packets may not arrive at the destination server in the order in which they were sent. It is necessary to periodically reorder the data packets in the circular buffer according to the sequence number to ensure that they can be processed in the correct order.

[0074] It should be noted that the period for reordering the UDP data packets copied to the buffer can be 1s or 2s, which is specifically set according to the actual scenario and is not specifically limited here.

[0075] For example, if the arrival order of the data packets at this time is data packet 11, data packet 13 and data packet 12, by sorting these data packets using the sequence numbers, their final presentation order is data packet 11, data packet 12 and data packet 13.

[0076] When the communication protocol between the source server and the target server is established, virtual machine migration can be performed, which will be described below in conjunction with step S2.

[0077] Step S2: The source server sends a UDP packet to the target server through the custom UDP protocol.

[0078] A custom UDP protocol is implemented by adding custom fields to the standard UDP protocol. These fields include a packet loss indication field and a transmission status field, ensuring the reliability and efficiency of UDP data transmission.

[0079] Figure 6 This is a structural diagram of a data packet under a custom UDP protocol provided in an embodiment of the present application.

[0080] like Figure 6 As shown in Figure 1, during the virtual machine migration process, a custom UDP packet is needed to migrate the virtual machine from the source server to the target server. The structure of the UDP packet can be divided into a UDP standard header, a custom part, and a data part.

[0081] The standard UDP header includes the source port number, destination port number, length, and checksum. The source port number is the port number used by the sender (source server). The destination port number is the port number used by the receiver. The length is the length of the entire UDP packet, which is the total length of the UDP standard header, custom part, and data part. The checksum is used to detect errors that may occur during transmission.

[0082] The UDP custom part includes the seq field, ack_seq field, len field, nak_cnt field, nak_seq field and data field. seq field: indicates the sequence of the data packet, 32 bits, starting from 1. len field: indicates the actual data length. ack_seq field: indicates the largest continuous sequence number currently received. nak_cnt field: indicates the number of missing packets. nak_seq field: is a variable-length array, indicating the seq numbers of multiple missing packets, supporting up to 16. Among them, the packet loss indication field includes the nak_cnt field and the nak_seq field; the transmission status field includes the seq field, the ack-sql field and the len field. In other words, the seq field, the ack_seq field, and the len field can represent the transmission status field, and the nak_cnt field and the nak_seq field can represent the packet loss indication field.

[0083] The UDP data portion, also known as the data field, is used to represent the actual data content in network transmission, such as the memory data, CPU operating status, and device status information of the source virtual machine during virtual machine online migration.

[0084] After the communication channel between the source and target servers is established, the source server needs to send the actual virtual machine data to the target server. This data can include memory data, CPU operating status, and device information. Memory data refers to all physical memory pages allocated to applications and the operating system in the virtual machine, including full memory pages and incremental memory pages.

[0085] Full memory pages refer to all current physical memory pages of the virtual machine at the time of migration. Incremental memory pages refer to memory pages that have changed between the initial full copy and the time the virtual machine is actually stopped and the final synchronization is completed. In other words, the full memory page copy process involves copying all memory pages currently occupied by the source virtual machine (regardless of whether these pages have been modified) to the target server. Due to the large amount of data transferred, this process can be time-consuming and may capture a large number of "dirty pages" (i.e., pages that have been modified during the transfer process). These are memory pages that have been modified since the initial copy. These pages are called "dirty pages." During the migration process, the virtualization software tracks and records these changes, then transfers only these newly dirty pages rather than the entire memory contents. This process is repeated multiple times until the number of dirty pages is low enough to complete the final synchronization in a shorter time, significantly reducing downtime and improving migration efficiency.

[0086] The virtual machine migration process can include three stages: the full copy stage corresponding to the full memory pages, the iterative copy stage corresponding to the incremental memory pages, and the shutdown switching stage corresponding to the remaining incremental memory pages. The migration process of each stage is described in detail below.

[0087] Figure 7 This is a flow chart of a virtual machine migration process provided by an embodiment of the present application.

[0088] In one implementation, continue to combine Figure 4 and Figure 7 As shown, step S2 includes the following steps: step S21-step S23.

[0089] Step S21: The source server transmits the full memory page to the target server through the custom UDP protocol.

[0090] In one example, step S21 includes steps S211 to S213.

[0091] Step S211: The source server reads all memory pages of the source virtual machine and converts them into at least one UDP data packet.

[0092] For example, when the communication protocol between the source server and the target server is established, the source server reads the full memory page of the source virtual machine, such as 1GB. If each UDP is limited to carrying 1024 bytes of data, and packet loss and retransmission in the network are not considered, then a total of 1048576 UDP data packets need to be transmitted.

[0093] Step S212: The source server copies the UDP data packet to the first memory buffer.

[0094] The content of the first memory buffer can refer to the specific content of step S13 described above, and will not be described here again.

[0095] Step S213: The source server sends the UDP packets to the target server through the custom UDP protocol.

[0096] When the UDP acknowledgement packet from the target server is received, the UDP packets before the ack_seq field value in the UDP acknowledgement packet are deleted, because these packets have been completely received. According to the nak and nak_cnt field information in the UDP acknowledgement packet, the missing UDP packets are immediately sent to the target server, so as to speed up the packet retransmission process and improve the virtual machine migration efficiency.

[0097] In the process of transmitting the full-amount memory page, since the source virtual machine is still running, its memory data can be modified and changed. Therefore, after the transmission of the full-amount memory page is completed, the changed memory data needs to be further processed, that is, the iteration copying phase corresponding to the incremental memory page is entered, so as to ensure that the migrated virtual machine can accurately and correctly resume running. The following will be described in conjunction with step S22.

[0098] Step S22: After the transmission of the full-amount memory page is completed, the source server determines the incremental memory page and transmits the incremental memory page to the target server through the custom UDP protocol.

[0099] Exemplarily, after the transmission of the full-amount memory page is completed, the source server determines the incremental memory page, generates a UDP packet, copies the UDP packet into the first memory buffer, and sends the UDP packet to the target server.

[0100] In this process, the first memory buffer of S212 is repeatedly used to cache data. When the UDP acknowledgement packet from the target server is received, the UDP packets before the ack_seq in the UDP acknowledgement packet are deleted. According to the nak and nak_cnt information in the UDP acknowledgement packet, the missing UDP packets of the target server are immediately re-sent.

[0101] Step 22 can refer to the specific content of step S21 described above, and will not be described here again.

[0102] Following the above example, since the source virtual machine is always in a running state, when the full-amount copying process has 128MB of incremental memory page modified, assuming that each UDP packet transmits 1024 bytes of data, without considering the packet retransmission, at least 131072 packets are needed to transmit the incremental memory page to the target server through the UDP protocol.

[0103] During the virtual machine migration process, the shutdown switching phase is an important step to ensure data consistency and complete the final synchronization. During this phase, the source server will suspend the operation of the source virtual machine and transmit the remaining incremental memory pages (including the dirty pages generated in the last iteration), CPU operating status, device status information and other information to the target server. After multiple iterative copies, the generation rate of the remaining unsynchronized dirty pages has been reduced to an acceptable range (for example, the generation rate of dirty pages is less than a certain threshold), that is, the shutdown switching phase corresponding to the remaining incremental memory pages is entered to ensure that the pause time is as short as possible, which is schematically explained below in conjunction with step S23.

[0104] Step S23: When it is determined that the generation rate of the remaining incremental memory pages is less than the preset threshold, the source server suspends the operation of the source virtual machine and transmits the remaining incremental memory pages, CPU operation status and device status information of the source virtual machine to the target server through the custom UDP protocol.

[0105] The device status information is the status information of the input and output devices. In the embodiment of the present application, the device status information is the device status information of the source server and the target server.

[0106] Exemplarily, when it is determined that the generation rate of the remaining incremental memory pages is less than a preset threshold, the source virtual machine generates a UDP data packet based on the remaining incremental memory pages, CPU operating status and device status information, copies the UDP data packet to the first memory buffer, and sends the UDP data packet to the target server.

[0107] In one implementation, step S23 includes step S231 and step S232.

[0108] Step S231: When it is determined that the generation rate of the remaining incremental memory pages is less than a preset threshold, the source server suspends the operation of the source virtual machine.

[0109] The preset threshold value generally refers to a limit value or critical value, which is used to indicate the boundary of a certain state, condition or behavior. In the embodiment of the present application, the preset threshold value is used to indicate the limit value of the generation rate of the memory page.

[0110] It should be noted that in the embodiment of the present application, only the generation rate of the remaining incremental memory pages is used as the condition for whether to suspend the operation of the source virtual machine. In fact, other factors can also be comprehensively considered, such as network status and whether the target server resources are sufficient, etc., which are not specifically limited here.

[0111] Step S232: Transmit the remaining incremental memory pages, CPU operating status, and device status information of the source virtual machine to the target server via the custom UDP protocol.

[0112] Continuing with the above example, after the source server suspends the source virtual machine, it transmits the remaining incremental memory pages (1MB), CPU operating status, and device status information of the source virtual machine to the target server via a custom UDP protocol.

[0113] In the three stages of virtual machine migration mentioned above, when the source server sends UDP data packets to the target server, packet loss may occur in each stage. Figure 4 As shown in FIG, the packet loss is explained by taking the full copy phase corresponding to the full memory page as an example.

[0114] The following describes in detail the situation where packet loss occurs during the migration process.

[0115] Step S3: The target server receives the UDP data packet and periodically generates a UDP confirmation data packet.

[0116] During the full copy phase for full memory pages, the source server transfers the full memory page to the target server, which takes a long time and is prone to packet loss and retransmission. The following describes packet loss in detail.

[0117] Figure 8 This is a flow chart of generating a UDP confirmation data packet provided in an embodiment of the present application.

[0118] In one implementation, continue to combine Figure 4 and Figure 8 As shown, step S3 includes steps S31 and S32.

[0119] Step S31: The target server receives the UDP data packet and obtains the lost packet sequence number and the lost quantity corresponding to the UDP data packet.

[0120] In one example, step S31 includes steps S311 - S315 .

[0121] Step S311: The target server copies the received UDP data packet to a second memory buffer.

[0122] Figure 9 This is a schematic diagram of periodically processing UDP data packets provided in an embodiment of the present application.

[0123] like Figure 9 As shown, Figure 9(a) is the final state at the end of the previous cycle, for example, the second memory buffer contains UDP packets 12, 13, and 22. At this point, the global variable cur_pos is 11, indicating the sequence number of the next UDP packet to be processed; head is 0, indicating that the head pointer of the second memory buffer is 0; and tail is 3, indicating that the tail pointer of the second memory buffer is 3.

[0124] like Figure 9 As shown in (b), the target server receives and stores UDP packets in the following order: UDP packet 15, UDP packet 11, UDP packet 14, UDP packet 18, UDP packet 17, UDP packet 21, and UDP packet 20. At this point, the tail value changes from 3 to 9.

[0125] Step S312: Sort the packets in the second memory buffer according to the transmission status field in the UDP data packet.

[0126] like Figure 9 As shown in (c), the above UDP data packets are arranged in the second memory buffer according to the sequence numbers in the UDP data packets.

[0127] It should be noted that when sorting UDP packets in the second memory buffer, there may be duplicate UDP packet sequence numbers. In this case, the virtualization software only needs to use one. For example, if two UDP packets 11 appear, namely UDP packet 11-1 and UDP packet 11-2, either one can be used, such as UDP packet 11-1.

[0128] Step S313: Obtain the position identifier of the sorted UDP data packet in the second memory buffer.

[0129] The location identifier is used to indicate the processing progress of the UDP data packet.

[0130] For example, continue to combine Figure 9 As shown in (c), the position identifier of the UDP data packet (the global variable curpos on the destination server) is 16.

[0131] Step S314: Based on the location identifier, determine K consecutive UDP data packets in the second memory buffer.

[0132] Following the above example, continue to combine Figure 9 As shown in (c), the five consecutive UDP data packets identified by the positions are UDP data packet 11, UDP data packet 12, UDP data packet 13, UDP data packet 14, and UDP data packet 15.

[0133] Step S315: The target server periodically deletes K consecutive UDP data packets from the second memory buffer.

[0134] Continuing with the above example, the target server processes 5 consecutive UDP packets, such as Figure 9 As shown in (d), five consecutive UDP data packets are deleted from the second memory buffer.

[0135] Step S316: Obtain the lost packet sequence number and the number of lost packets.

[0136] Continuing with the above example, Figure 9 As shown in (d), the lost packet sequence numbers nak_seq=16 and nak_seq=19 corresponding to the UDP data packets are obtained, and the loss quantity nak_cnt is 2.

[0137] Step S32: The target server periodically generates UDP confirmation data packets based on the lost packet sequence number and the lost quantity.

[0138] The UDP confirmation data packet includes the largest continuous sequence number currently received, the lost packet sequence number, and the number of lost packets.

[0139] Continuing with the above example, the target server generates a UDP acknowledgment packet based on nak_seq=16 and nak_seq=19, and the number of lost packets nak_cnt is 2. The nak_seq field in the UDP acknowledgment packet is 16 and 19, the nak_cnt field is 2, and the largest consecutive sequence number ack_seq is 15.

[0140] Step S4: The target server periodically sends UDP confirmation data packets to the source server.

[0141] The nak_seq field in the header of the UDP acknowledgment packet corresponds to 16 and 19, the nak_cnt field corresponds to 2, and the largest continuous sequence number ack_seq is 15.

[0142] Step S5: The source server receives the UDP confirmation data packet, and generates a UDP retransmission data packet based on the packet loss indication field in the UDP confirmation data packet.

[0143] The UDP retransmission data packets include UDP data packets lost during the migration process of the source virtual machine.

[0144] In one implementation, step S5 includes the following steps:

[0145] First, the source server receives the UDP confirmation packet, parses the UDP confirmation packet, and searches for the lost UDP packet in the first memory buffer. It should be noted that each of the above steps S21 to S23 may involve the content of step S31, which is not listed here one by one.

[0146] Continuing with the above example, the source server receives the UDP confirmation packet and determines that the nak_seq fields in the UDP confirmation packet correspond to 16 and 19.

[0147] Second: The source server generates retransmission packets based on the lost UDP packets.

[0148] Continuing with the above example, the source server generates retransmission data packet 16 and retransmission data packet 19 based on the lost UDP data packets 16 and 19 .

[0149] Step S6: The source server sends the UDP retransmission data packet to the target server through the custom UDP protocol.

[0150] Step S6 can refer to the similar discussion of step S2 above, and will not be repeated here.

[0151] Step S7: The target server receives the UDP retransmission data packet.

[0152] It should be noted that after receiving the UDP retransmission data packet, the target server copies it to the second memory buffer and processes the UDP retransmission data packet to determine whether packet loss occurs again. If it occurs again, execute similar contents of the above steps S3-S6. If packet loss does not occur again, execute steps S8-S9.

[0153] Step S8: The source server shuts down the source virtual machine.

[0154] Step S9: The source server notifies the target server to restore the destination virtual machine.

[0155] The order of step S7, step S8 and step S9 is not specifically limited.

[0156] Step S10: The target server restores the target virtual machine.

[0157] Step S11: The source server deletes the source virtual machine.

[0158] It should be noted that packet loss may also occur during the iterative copy phase corresponding to the incremental memory pages and the shutdown switching phase corresponding to the remaining incremental memory pages. For details, please refer to the above steps S3-S6 and will not be repeated here.

[0159] In summary, using the above-mentioned custom UDP protocol for data transmission can reduce the delay in the transmission process. If packet loss occurs in network transmission, the corresponding UDP data packet can be quickly retransmitted based on the packet loss indication field and the transmission status field, thereby ensuring the reliability of virtual machine migration. In this way, the requirements of high reliability and high efficiency of virtual machine migration can be met at the same time, and the user experience can be improved.

[0160] Corresponding to the aforementioned embodiment of the virtual machine migration method, the present application also provides an embodiment of a virtual machine migration device.

[0161] Figure 10 This is a schematic diagram of a virtual machine migration device provided in an embodiment of the present application.

[0162] like Figure 10 As shown, when applied to a source server, the apparatus may include: a first migration module 1010 , a receiving module 1020 , a processing module 1030 , a first replication module 1040 and a preparation module 1050 .

[0163] The first migration module 1010 is configured to: when the communication protocol between the source server and the target server is established, send a UDP data packet to the target server through a custom UDP protocol; the custom part in the UDP data packet includes a preset custom field, and the custom field includes a packet loss indication field and a transmission status field; the data part of the UDP data packet carries the memory data, CPU operating status and device status information of the source virtual machine; the receiving module 1020 is configured to: receive a UDP confirmation data packet, and generate a UDP retransmission data packet based on the packet loss indication field and transmission status field in the UDP confirmation data packet; the UDP retransmission data packet includes the UDP data packet lost during the migration of the source virtual machine; the first migration module 1010 is configured to: send the UDP retransmission data packet to the target server through a custom UDP protocol; shut down the source virtual machine, and notify the target server to restore the target virtual machine; after the recovery of the target virtual machine is completed, delete the source virtual machine.

[0164] In one possible implementation, the first migration module 1010 is specifically configured as follows: when the communication channel between the source server and the target server is established, the full memory page is transferred to the target server through a custom UDP protocol; after the full memory page is transferred, the incremental memory page is transferred to the target server through a custom UDP protocol; wherein, the incremental memory page is a dirty memory page generated in the process of transferring the full memory page, that is, a modified memory page; when it is determined that the generation rate of the remaining incremental memory pages is less than a preset threshold, the operation of the source virtual machine is suspended, and the remaining incremental memory pages, CPU operating status and device status information of the source virtual machine are transmitted to the target server through a custom UDP protocol.

[0165] In a possible implementation, the receiving module 1020 is specifically configured to receive a UDP acknowledgement packet, and based on the fact that the custom part in the UDP acknowledgement packet includes a packet loss indication field and a transmission state field, the source server generates a retransmission packet based on the lost UDP packet.

[0166] In a possible implementation, the first copying module 1050 is further configured to copy the UDP packet to a first memory buffer based on a custom field in the UDP packet, and the first memory buffer is a storage area for representing data.

[0167] In a possible implementation, the preparation module 1060 is configured to send an initialization message to the target server, where the initialization message includes verification information used to request the establishment of a communication protocol with the target server, and the source server receives an acknowledgement message to determine that the communication channel between the source server and the target server is established.

[0168] Corresponding to the foregoing embodiments of the virtual machine migration method, the present application further provides another embodiment of a virtual machine migration device.

[0169] Figure 11 is another schematic diagram of a virtual machine migration device provided by an embodiment of the present application.

[0170] As shown in Figure 11 , applied to the target server, the device 1100 can include a generation module 1110, a second migration module 1120, a receiving module 1130, a recovery module 1140, and a second copying module 1150.

[0171] The generation module 1110 is configured to receive a UDP packet and periodically generate a UDP acknowledgement packet, where the UDP acknowledgement packet includes a packet loss indication field; the second migration module 1120 is configured to periodically send the UDP acknowledgement packet to the source server; the receiving module 1130 is configured to receive a UDP retransmission packet, where the UDP retransmission packet includes the UDP packet lost in the source virtual machine migration process; and the recovery module 1140 is configured to recover the target virtual machine.

[0172] In a possible implementation, the second copying module 1150 is configured to copy the UDP packet to a second memory buffer based on a custom field in the UDP packet, and the second memory buffer is a storage area for representing data.

[0173] Figure 12 is a schematic diagram of a computing device provided by an embodiment of the present application.

[0174] As shown in Figure 12As shown, the computing device 1200 includes a processor 1201 and a memory 1202. Exemplarily, the computing device 1200 may further include a communication interface 1203 and a communication bus 1204.

[0175] The processor 1201, memory 1202, and communication interface 1203 communicate with each other via a communication bus 1204. The communication interface 1203 may include a transmitter and a receiver for communicating with other devices or a communication network, and may be a wired interface (port), such as a fiber distributed data interface (FDDI) or a gigabit Ethernet interface (GE).

[0176] In some embodiments, the processor 1201 is configured to execute a program 1205, specifically, the relevant steps in the above-mentioned inference task execution method embodiment. Specifically, the program 1205 may include program code, which includes computer-executable instructions.

[0177] For example, processor 1201 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement some embodiments of the present application. The computing device 1000 may include one or more processors of the same type, such as one or more CPUs, or different types of processors, such as one or more CPUs and one or more ASICs. The CPU may be a single-core CPU (single-CPU) or a multi-core CPU (multi-CPU).

[0178] In some embodiments, the memory 1202 is used to store the program 1205. The memory 1202 may include a high-speed random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory.

[0179] The program 1205 may be specifically called by the processor 1201 to enable the computing device 1200 to perform the inference task execution method operation.

[0180] Some embodiments of the present application provide a computer-readable storage medium storing at least one executable instruction. When the executable instruction is executed on a computing device 1200, the computing device 1200 executes the reasoning task execution method in the above embodiment.

[0181] The executable instructions may be specifically used to enable the computing device 1200 to perform the inference task execution method operations.

[0182] For example, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.

[0183] Some embodiments of the present application provide a chip system for use in a server. The chip system includes one or more interface circuits and one or more processors. The interface circuits and processors are interconnected via circuits. The interface circuits are configured to receive signals from the server's memory and send signals to the processors. The signals include computer instructions stored in the memory. When the server processor executes the computer instructions, the server performs the steps of the inference task execution method described in the above method embodiment.

[0184] The beneficial effects that can be achieved by the readable storage medium provided in some embodiments of the present application can be referred to the beneficial effects in the corresponding reasoning task execution method provided above, and will not be repeated here.

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

[0186] Each embodiment in this specification is described in a related manner. Similar portions between the embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences from other embodiments. In particular, the device embodiments are generally similar to the method embodiments, so their description is relatively simple. For related portions, refer to the description of the method embodiments.

[0187] The logic and / or steps represented in the flowchart or otherwise described herein may be considered, for example, as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device).

[0188] For the purposes of this specification, a "computer-readable medium" can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with an instruction execution system, apparatus, or device.

[0189] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection having one or more wires (electronic device), a portable computer disk cartridge (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), fiber optic device, and a portable compact disc read-only memory (CDROM).

[0190] In addition, the computer readable medium can even be paper or other suitable medium on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, and then editing, interpreting or processing it in other suitable ways as necessary, and then storing it in the computer memory. It should be understood that various parts of the present application can be implemented in hardware, software, firmware or a combination thereof.

[0191] In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one or a combination of the following technologies known in the art can be used: a discrete logic circuit having logic gate circuits for implementing logic functions on data signals, an application-specific integrated circuit having suitable combinational logic gate circuits, a programmable gate array (PGA), a field-programmable gate array (FPGA), etc. The above-described embodiments are merely specific embodiments of the present application and are not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made based on the technical solutions of the present application shall be included within the scope of protection of the present application.

Claims

1. A virtual machine migration method, characterized in that: Applied to the source server, the migration method includes: When the communication channel between the source server and the target server is established, the source server sends a UDP data packet to the target server via a custom UDP protocol; the UDP data packet includes preset custom fields, including a packet loss indication field and a transmission status field; the data portion of the UDP data packet carries the memory data, CPU operating status, and device status information of the source virtual machine; The source server receives a UDP confirmation data packet corresponding to the UDP data packet, and generates a UDP retransmission data packet based on a packet loss indication field in the UDP confirmation data packet; the UDP retransmission data packet includes the UDP data packet lost during the migration process of the source virtual machine; The source server sends the UDP retransmission data packet to the target server through the custom UDP protocol; The source server shuts down the source virtual machine and notifies the target server to restore the target virtual machine; after the restoration of the target virtual machine is completed, the source server deletes the source virtual machine.

2. The migration method according to claim 1, wherein: When the communication channel between the source server and the target server is established, the source server sends a UDP data packet to the target server through a custom UDP protocol, including: When the communication channel between the source server and the target server is established, the source server transmits the full memory page to the target server through the custom UDP protocol; After the full memory page is transmitted, the source server transmits the incremental memory page to the target server through a custom UDP protocol; wherein the incremental memory page is the memory data generated during the transmission of the full memory page; When it is determined that the generation rate of the remaining incremental memory pages is greater than a preset threshold, the source server suspends the operation of the source virtual machine and migrates the remaining incremental memory pages of the source virtual machine, the CPU operating status and the device status information to the target server through the custom UDP protocol.

3. The migration method according to claim 1, wherein: The source server receives a UDP confirmation data packet corresponding to the UDP data packet, and generates a UDP retransmission data packet based on a packet loss indication field and a transmission status field in the UDP confirmation data packet, including: The source server receives a UDP confirmation packet corresponding to the UDP packet, and searches for lost UDP packets in a first memory buffer based on a packet loss indication field in the UDP confirmation packet; The source server generates the retransmission data packet based on the lost UDP data packet.

4. The migration method according to claim 1, wherein: Also includes: The source server copies the UDP data packet to a first memory buffer based on a custom field in the UDP data packet, where the first memory buffer is a storage area for characterizing data.

5. The migration method according to claim 1, wherein: Determining that a communication channel between the source server and the target server is established includes: The source server sends an initialization message to the target server, wherein the initialization message includes verification information, and the verification information is used to request to establish a communication channel with the target server; The source server receives the confirmation message and determines that the communication channel between the source server and the target server is established.

6. A virtual machine migration method, characterized in that: Applied to the target server, the migration method includes: The target server receives the UDP data packet and periodically generates a UDP confirmation data packet corresponding to the UDP data packet; wherein the confirmation data packet includes the packet loss indication field; The target server periodically sends UDP confirmation data packets to the source server; The target server receives a UDP retransmission data packet, where the UDP retransmission data packet includes the UDP data packet lost during the migration process of the source virtual machine; The target server recovers the target virtual machine.

7. The migration method according to claim 6, characterized in that: Also includes: The target server copies the UDP data packet to a second memory buffer based on the custom field in the UDP data packet, where the second memory buffer is a storage area for characterizing data.

8. A virtual machine migration device, characterized in that: Applied to a source server, the device includes: The migration module is configured to: when the communication channel between the source server and the target server is established, send a UDP data packet to the target server through a custom UDP protocol; the UDP data packet includes preset custom fields and a data portion, the custom fields including a packet loss indication field and a transmission status field; the data portion carries memory data, CPU operating status, and device status information of the source virtual machine; a receiving module configured to: receive a UDP acknowledgment packet corresponding to the UDP packet, and generate a UDP retransmission packet based on a packet loss indication field in the UDP acknowledgment packet; the UDP retransmission packet includes the UDP packet lost during the migration of the source virtual machine; The migration module is further configured to: send the UDP retransmission data packet to the target server via the custom UDP protocol; The processing module is configured to: shut down the source virtual machine, notify the target server to restore the target virtual machine; and delete the source virtual machine after the target virtual machine is restored.

9. A virtual machine migration device, characterized in that: Applied to a target server, the device comprises: A generating module is configured to: receive a UDP data packet and periodically generate a UDP confirmation data packet corresponding to the UDP data packet; wherein the UDP confirmation data packet includes the packet loss indication field; The migration module is configured to: periodically send UDP confirmation data packets to the source server; The receiving module is configured to: receive a UDP retransmission data packet, wherein the UDP retransmission data packet includes the UDP data packet lost during the migration process of the source virtual machine; The recovery module is configured to: recover the target virtual machine.

10. A computing device, characterized in that The computing device includes a memory and a processor; the memory and the processor are coupled; the memory is used to store computer program code, and the computer program code includes computer instructions, when the processor is used to execute the computer instructions, so that the computing device performs the migration method as described in any one of claims 1 to 5 or 6 to 7.