Virtual machine migration method and device, upgrading method and server

CN115599494BActive Publication Date: 2026-10-30ALIBABA (CHINA) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211153267.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-21
Publication Date
2026-10-30
Estimated Expiration
2042-09-21

AI Technical Summary

Technical Problem

当处理器在新建、扩容、升级、运维等升级过程中,由于虚拟机软件问题、处理器硬件问题等,导致虚拟机的使用存在安全风险

Benefits of technology

[0032]本说明书提供了一种虚拟机迁移方法,应用于控制单元,所述控制单元部署在包含多个处理器的服务器上,所述多个处理器之间通过智能网卡交互数据,包括:接收针对目标虚拟机的迁移请求;根据所述迁移请求从所述多个处理器中,确定所述目标虚拟机当前所在的源处理器和待迁移到的目的处理器,其中,所述源处理器和所述目的处理器为所述多个处理器中的处理器;向所述源处理器发送迁移指令,以使所述源处理器将所述目标虚拟机的数据,通过所述智能网卡发送至所述目的处理器。在源处理器需要支持安全补丁、新特性时,或者进行故障硬件维修时,需要进行虚拟机迁移,源处理器将目标虚拟机的数据经过智能网卡的硬件专用模块直接转发到该服务器的目的处理器上,而不是将目标虚拟机通过跨网络交换机等物理网络,迁移到另一个服务器上,该过程不经过智能网卡的网络端口,不依赖网络交换机,时延短,吞吐大,并且由于路径变短,成功率变高,即可以提高迁移的效率、成功率和并发数量,减少迁移时间,并且避免了网络拥塞,由于迁移在同一服务器内部完成,大幅缩减迁移路径,攻击面大幅度降低,提高了迁移的安全性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115599494B_ABST
    Figure CN115599494B_ABST
Patent Text Reader

Abstract

Embodiments of the present specification provide a virtual machine migration method, device and equipment, wherein the virtual machine migration method is applied to a control unit deployed on a server containing a plurality of processors, the plurality of processors interact data through an intelligent network card, and the method comprises the following steps: receiving a migration request for a target virtual machine; determining a source processor where the target virtual machine currently locates and a destination processor to be migrated from the plurality of processors according to the migration request, wherein the source processor and the destination processor are processors in the plurality of processors; and sending a migration instruction to the source processor to make the source processor send data of the target virtual machine to the destination processor through the intelligent network card. The method has high migration efficiency, short migration time, can avoid network congestion, has small attack surface and high migration security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments in this specification relate to the field of computer technology, and in particular to virtual machine migration methods. Background Technology

[0002] With the continuous development of computer technology, virtual machine technology has also developed rapidly. Virtual machines primarily run and are used within processors. However, during processor upgrades (such as new construction, expansion, upgrades, and maintenance), security risks arise due to virtual machine software issues and processor hardware problems. Therefore, an effective solution for migrating virtual machines is urgently needed. Summary of the Invention

[0003] In view of this, embodiments of this specification provide a virtual machine migration method. One or more embodiments of this specification simultaneously relate to an upgrade method, a virtual machine migration apparatus, a server, a computing device, a computer-readable storage medium, and a computer program, to address the technical deficiencies existing in the prior art.

[0004] According to a first aspect of the embodiments of this specification, a virtual machine migration method is provided, applied to a control unit, the control unit being deployed on a server comprising multiple processors, the multiple processors exchanging data via smart network interface cards, comprising:

[0005] Receive migration requests for the target virtual machine;

[0006] Based on the migration request, the source processor where the target virtual machine is currently located and the destination processor to which it is to be migrated are determined from the plurality of processors, wherein the source processor and the destination processor are processors among the plurality of processors;

[0007] A migration command is sent to the source processor so that the source processor sends the data of the target virtual machine to the destination processor through the smart network card.

[0008] According to a second aspect of the embodiments of this specification, a virtual machine migration method is provided, applied to a source processor where a target virtual machine is currently located, the source processor being deployed on a server comprising multiple processors and control units, the multiple processors exchanging data via smart network interface cards, including:

[0009] The control unit receives a migration instruction, wherein the source processor is determined by the control unit from among the plurality of processors based on the migration request for the target virtual machine.

[0010] The data of the target virtual machine is sent to the destination processor to which the target virtual machine is to be migrated via the smart network card. The destination processor is determined by the control unit from a plurality of processors according to the migration request for the target virtual machine. The source processor and the destination processor are processors among the plurality of processors.

[0011] According to a third aspect of the embodiments of this specification, an upgrade method is provided, applied to a server, the server comprising multiple processors and a control unit, the multiple processors exchanging data via a smart network interface card, including:

[0012] The control unit receives a pin upgrade request, determines the source processor and the destination processor to which the target virtual machine in the source processor is to be migrated from the plurality of processors according to the upgrade request, and sends a migration instruction to the source processor, wherein the source processor and the destination processor are processors among the plurality of processors;

[0013] In response to the migration command, the source processor sends the state data of the target virtual machine stored in memory to the destination processor through the smart network card;

[0014] The target processor generates the target virtual machine based on the state data;

[0015] The source processor is upgraded once the migration is complete.

[0016] According to a fourth aspect of the embodiments of this specification, a virtual machine migration apparatus is provided, applied to a control unit, the control unit being deployed on a server comprising multiple processors, the multiple processors exchanging data via smart network interface cards, including:

[0017] The first receiving module is configured to receive migration requests for the target virtual machine;

[0018] The confirmation module is configured to determine, based on the migration request, the source processor where the target virtual machine is currently located and the destination processor to which it is to be migrated from the plurality of processors, wherein the source processor and the destination processor are processors among the plurality of processors;

[0019] The first sending module is configured to send a migration instruction to the source processor, so that the source processor sends the data of the target virtual machine to the destination processor through the smart network card.

[0020] According to a fifth aspect of the embodiments of this specification, a virtual machine migration apparatus is provided, applied to a source processor where a target virtual machine is currently located. The source processor is deployed on a server comprising multiple processors and control units, the multiple processors exchanging data via smart network interface cards (NICs), including:

[0021] The second receiving module is configured to receive migration instructions sent by the control unit, wherein the source processor is determined by the control unit from the plurality of processors according to the migration request for the target virtual machine;

[0022] The second sending module is configured to send the data of the target virtual machine to the destination processor to which the target virtual machine is to be migrated via the smart network card, wherein the destination processor is determined by the control unit from the plurality of processors according to the migration request for the target virtual machine, and the source processor and the destination processor are processors among the plurality of processors.

[0023] According to a sixth aspect of the embodiments of this specification, a server is provided, comprising:

[0024] Multiple processors and control units, wherein the multiple processors exchange data via smart network interface cards;

[0025] The control unit is configured to receive a migration request for a target virtual machine; determine, from the plurality of processors, the source processor where the target virtual machine is currently located and the destination processor to which it is to be migrated, based on the migration request; and send a migration instruction to the source processor, wherein the source processor and the destination processor are processors among the plurality of processors.

[0026] The source processor is configured to send the data of the target virtual machine to the destination processor via the smart network interface card in response to the migration command.

[0027] According to a seventh aspect of the embodiments of this specification, a computing device is provided, comprising:

[0028] Memory and processor;

[0029] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the virtual machine migration method described above.

[0030] According to an eighth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores computer-executable instructions that, when executed by a processor, implement the steps of the virtual machine migration method described above.

[0031] According to a ninth aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the virtual machine migration method described above.

[0032] This specification provides a virtual machine migration method applied to a control unit deployed on a server containing multiple processors. These processors interact with each other via smart network interface cards (NICs). The method includes: receiving a migration request for a target virtual machine; determining, based on the migration request, the source processor where the target virtual machine is currently located and the destination processor to which it is to be migrated, from among the multiple processors, wherein the source processor and the destination processor are processors among the multiple processors; and sending a migration instruction to the source processor, causing the source processor to send the data of the target virtual machine to the destination processor via the smart NIC. When the source processor needs to support security patches or new features, or when repairing faulty hardware, virtual machine migration is required. The source processor forwards the data of the target virtual machine directly to the target processor on the server through the dedicated hardware module of the smart network card, instead of migrating the target virtual machine to another server across physical networks such as network switches. This process does not go through the network ports of the smart network card, does not rely on network switches, has low latency, high throughput, and a higher success rate due to the shorter path. This improves the efficiency, success rate, and concurrency of migration, reduces migration time, and avoids network congestion. Since the migration is completed within the same server, the migration path is significantly reduced, the attack surface is greatly reduced, and the security of the migration is improved. Attached Figure Description

[0033] Figure 1A This is a flowchart illustrating an upgrade method provided in one embodiment of this specification;

[0034] Figure 1B This is a flowchart illustrating a virtual machine migration method under a virtual machine migration system, provided in one embodiment of this specification.

[0035] Figure 2 This is a flowchart of a virtual machine migration method provided in one embodiment of this specification;

[0036] Figure 3A This is a flowchart illustrating data transfer in a virtual machine migration method provided in one embodiment of this specification;

[0037] Figure 3B This is a flowchart of another virtual machine migration method provided in one embodiment of this specification;

[0038] Figure 4A This is a flowchart illustrating the processing procedure of a virtual machine migration method provided in one embodiment of this specification;

[0039] Figure 4B This is a flowchart illustrating the data interaction between the source processor and the destination processor in a virtual machine migration method provided in one embodiment of this specification.

[0040] Figure 5 This is a schematic diagram of the structure of a virtual machine migration device provided in one embodiment of this specification;

[0041] Figure 6 This is a schematic diagram of another virtual machine migration device provided in one embodiment of this specification;

[0042] Figure 7 This is a schematic diagram of the structure of a server provided in one embodiment of this specification;

[0043] Figure 8 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation

[0044] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.

[0045] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0046] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."

[0047] First, the terms and concepts used in one or more embodiments of this specification will be explained.

[0048] A virtual machine (VM) is a complete computer system simulated by software, possessing full hardware system functionality and running in a completely isolated environment. Any task that can be performed on a physical computer can also be performed in a virtual machine.

[0049] Live migration, also known as dynamic migration or real-time migration, is the process of saving and restoring a virtual machine. It typically involves completely saving the running state of the entire virtual machine and quickly restoring it to its original hardware platform or even a different hardware platform. After restoration, the virtual machine continues to run smoothly, and the user will not notice any difference.

[0050] Kernel Live Patching: Also known as a patch, it refers to code that can fix software vulnerabilities. It is a quick and low-cost way to fix defects in product software versions.

[0051] PCIE (Peripheral Component Interconnect Express) is a high-speed serial computer expansion bus standard.

[0052] DMA (Direct Memory Access) is a direct memory access protocol.

[0053] This specification provides a virtual machine migration method, and also relates to a virtual machine migration apparatus, a server, a computing device, and a computer-readable storage medium, which are described in detail in the following embodiments.

[0054] With the continuous development of computer technology, virtual machine technology has also developed rapidly. Virtual machines primarily run and are used within processors. However, during processor upgrades such as new construction, expansion, and maintenance, security risks may arise due to virtual machine software issues or processor hardware problems. Therefore, virtual machine migration is necessary.

[0055] Stability is one of the challenges in migrating virtual machines. Processors providing virtualization environments typically consist of virtualization components such as Linux-based operating systems, kernel-based virtual machines (KVM), and virtual operating system emulators (QEMU). When a processor on one server needs security patches installed, code bugs fixed, or support for new features added, the virtual machine is usually migrated across a network to a processor on another server, allowing the processor on the source server to be upgraded.

[0056] During cross-network migration, data in memory is copied from the source server. This process involves the data first entering the network interface card (NIC), then being output through the NIC's network port to the network cable, access switch, aggregation switch, and even the core switch, finally reaching the destination server's NIC network port. The NIC then transmits the data from its network port to the destination server. This transmission process demonstrates that because data originates from the source server and must travel through the NIC's network port across the physical network to the destination server's NIC network port, the long transmission path and numerous switches involved not only consume significant physical network bandwidth but also potentially cause severe latency, packet loss, and contention between migration traffic and project traffic.

[0057] It is evident that cross-network hot migration can lead to severe performance fluctuations and service unavailability, especially large-scale hot migration, which is extremely dependent on network resources and, most importantly, poses security risks. Furthermore, hot migration is difficult for pass-through devices; for cloud-based pass-through devices such as FPGAs, GPUs, and smart cards, prolonged traffic interruptions can occur. Hot migration consumes significant network bandwidth, impacting task stability and hindering large-scale migration; and the long hot migration link results in a large network attack surface.

[0058] To address the above issues, this manual provides an upgrade method. See [link / reference] Figure 1A , Figure 1A This specification illustrates an upgrade method provided by an embodiment, applied to a server, the server comprising multiple processors that exchange data via smart network interface cards (NICs), the method comprising:

[0059] Step 102: The control unit receives the upgrade request, determines the source processor and the destination processor to which the target virtual machine in the source processor is to be migrated from the plurality of processors according to the upgrade request, and sends a migration instruction to the source processor, wherein the source processor and the destination processor are processors among the plurality of processors;

[0060] Step 104: In response to the migration command, the source processor sends the state data of the target virtual machine stored in memory to the destination processor through the smart network card;

[0061] Step 106: The target processor generates the target virtual machine based on the state data;

[0062] Step 108: The source processor is upgraded after the migration is completed.

[0063] In this upgrade method, when the source processor needs to support security patches, new features, or is undergoing faulty hardware repair, the source processor hosting the target virtual machine forwards the state data stored in its memory directly to the target processor on that server via a dedicated hardware module of the smart network interface card (NIC), instead of crossing a network switch to another server. The advantage of this is that the target virtual machine's dirty page traffic enters the dedicated hardware forwarding module of the smart NIC via the bus (PCIe) or DMA, and is then directly forwarded to the target processor's memory via the bus or DMA. This process does not pass through the smart NIC's network port, does not rely on a network switch, has low latency, high throughput, and a higher success rate due to the shorter path. Once the target virtual machine is successfully migrated, any modifications can be made to the source processor's hardware and software to achieve the upgrade purpose.

[0064] The above is an illustrative scheme of an upgrade method according to this embodiment. It should be noted that the technical solution of this upgrade method belongs to the same concept as the technical solution of the virtual machine migration method described below. For details not described in detail in the technical solution of the upgrade method, please refer to the description of the technical solution of the virtual machine migration method below.

[0065] Accordingly, this specification also provides a virtual machine migration method applied to a control unit, the control unit being deployed on a server containing multiple processors, the multiple processors exchanging data via smart network interface cards (NICs), comprising: receiving a migration request for a target virtual machine; determining, based on the migration request, the source processor where the target virtual machine is currently located and the destination processor to which it is to be migrated from the multiple processors, wherein the source processor and the destination processor are processors among the multiple processors; and sending a migration instruction to the source processor, causing the source processor to send the data of the target virtual machine to the destination processor via the smart NIC. When the source processor needs to support security patches or new features, or when repairing faulty hardware, virtual machine migration is required. The source processor forwards the data of the target virtual machine directly to the target processor on the server through the dedicated hardware module of the smart network card, instead of migrating the target virtual machine to another server across physical networks such as network switches. This process does not go through the network ports of the smart network card, does not rely on network switches, has low latency, high throughput, and a higher success rate due to the shorter path. This improves the efficiency, success rate, and concurrency of migration, reduces migration time, and avoids network congestion. Since the migration is completed within the same server, the migration path is significantly reduced, the attack surface is greatly reduced, and the security of the migration is improved.

[0066] See Figure 1B , Figure 1BThis specification illustrates a flowchart of a virtual machine migration method under a virtual machine migration system according to an embodiment of the present specification. The virtual machine migration system includes multiple processors and control units. The multiple processors and the agent unit are deployed on the same physical machine (server). The multiple processors exchange data with each other through smart network interface cards.

[0067] The control unit is configured to receive a migration request for a target virtual machine; determine, from the plurality of processors, the source processor where the target virtual machine is currently located and the destination processor to which it is to be migrated, based on the migration request; and send a migration instruction to the source processor, wherein the source processor and the destination processor are processors among the plurality of processors.

[0068] The source processor is configured to, in response to the migration command, send the data of the target virtual machine to the destination processor via the smart network interface card.

[0069] When applying the solutions described in this specification, virtual machine migration is required when the source processor needs to support security patches or new features, or when repairing faulty hardware. The source processor directly forwards the data of the target virtual machine to the target processor on the server via the dedicated hardware module of the smart network card, instead of migrating the target virtual machine to another server across physical networks such as network switches. This process does not pass through the network ports of the smart network card, does not rely on network switches, has low latency, high throughput, and a higher success rate due to the shorter path. This improves migration efficiency, success rate, and concurrency, reduces migration time, and avoids network congestion. Since the migration is completed within the same server, the migration path is significantly reduced, the attack surface is greatly reduced, and the security of the migration is improved.

[0070] The above is an illustrative scheme of a virtual machine migration system according to this embodiment. It should be noted that the technical solution of this virtual machine migration system and the technical solution of the virtual machine migration method described below belong to the same concept. For details not described in detail in the technical solution of the virtual machine migration system, please refer to the description of the technical solution of the virtual machine migration method below.

[0071] The methods provided in one or more embodiments of this specification can be applied to virtual machine migration in various scenarios, such as adding security patches, adding new features, and repairing faulty hardware. The specific method should be selected according to the actual situation, and the embodiments of this specification do not limit it in any way.

[0072] See Figure 2 , Figure 2The flowchart illustrates a virtual machine migration method according to an embodiment of this specification, applied to a control unit deployed on a server containing multiple processors that interact with each other via smart network interface cards (NICs). The method specifically includes the following steps.

[0073] Step 202: Receive the migration request for the target virtual machine.

[0074] Specifically, a processor can be a Central Processing Unit (CPU), which serves as the core of a computer system for computation and control, and is the final execution unit for information processing and program execution. A control unit can be a controller or an agent unit, used to coordinate and direct the operation of the entire computer system. A server can be a physical machine, such as a computer, containing multiple processors and virtual machines. The target virtual machine refers to the virtual machine that needs to be migrated, i.e., the virtual machine to be migrated. A Smart Network Interface Card (NIC), also known as a smart network adapter, not only performs the network transmission functions of a standard NIC but also provides a built-in programmable and configurable hardware acceleration engine, improving application performance and significantly reducing CPU consumption during communication, thus providing more CPU resources.

[0075] In practical applications, there are several ways to receive migration requests for a target virtual machine: First, the user may discover that the target virtual machine needs to be migrated, and the server will perform the migration operation, causing the control unit to receive the migration request. Second, the control unit may monitor the virtual machines on each processor, and automatically generate a migration request when it detects an anomaly in the target virtual machine requiring repair or a feature upgrade. Third, each processor may monitor its contained virtual machines, and report to the control unit when it detects an anomaly in the target virtual machine requiring repair or a feature upgrade, causing the control unit to receive the migration request. For the purpose of facilitating periodic inspection and maintenance of virtual machines or processors, periodic migrations of the target virtual machine can also be performed, i.e., a pre-set period duration, at which the control unit will receive a migration request for the target virtual machine. This specification does not limit this approach.

[0076] It should be noted that, in practical applications, the control unit can manifest as control software running on any of the multiple processors, or it can be a separate controller independent of and communicating with the processors. The control unit is used to guide or control the processors to migrate virtual machines. For example, if the cloud-based control center receives a migration instruction from maintenance personnel, the cloud responds by sending a migration request to the control software running on all processors in the server. The control software then follows the migration request until the target virtual machine is migrated. Similarly, if the cloud-based control center receives a migration instruction from operations personnel, the cloud responds by sending a migration request to a separate controller in the server that communicates with the processors. The controller then notifies the source processor to migrate the target virtual machine based on the migration request.

[0077] Step 204: Based on the migration request, determine the source processor where the target virtual machine is currently located and the destination processor to which it is to be migrated from the plurality of processors, wherein the source processor and the destination processor are processors among the plurality of processors.

[0078] Specifically, the source processor refers to the processor at the starting point of the migration, which is the processor where the target virtual machine resides. The destination processor refers to the processor at the end point of the migration, which is the processor where the target virtual machine will be migrated to. It should be noted that both the source processor and the destination processor are processors within the server; that is, the source processor and the destination processor are two processors out of a set of multiple processors.

[0079] In practical applications, upon receiving a migration request, the controller responds to the migration request and determines the processor from which the target virtual machine will be migrated and the processor to which the target virtual machine will be migrated, i.e., the source processor where the target virtual machine is currently located and the destination processor to which it will be migrated.

[0080] In one possible implementation of this specification, the migration request carries a source processor identifier. The control unit can then determine the source processor based on the source processor identifier and determine the target processor according to certain rules. That is, the specific implementation process of determining the source processor where the target virtual machine currently resides and the destination processor to be migrated to from the plurality of processors based on the migration request can be as follows:

[0081] Based on the source processor identifier carried in the migration request, determine the source processor where the target virtual machine is currently located from the plurality of processors;

[0082] Based on preset filtering criteria, the target processor to which the target virtual machine is to be migrated is determined from the plurality of processors.

[0083] Specifically, the source processor identifier refers to the source processor's label, name, code, etc. Preset filtering conditions refer to the requirements and standards for determining the target processor, such as at least one of the following: processor type, processor data processing capacity, processor status, etc. Preset filtering conditions may include only one filtering condition or multiple sub-filtering conditions.

[0084] In practical applications, upon receiving a migration request carrying the source processor identifier, the control unit matches the source processor identifier with the identifiers of each processor, and identifies the processor that matches successfully as the source processor, which is the current source processor of the target virtual machine.

[0085] For example, there are five processors: processor 1 is identified as a1, processor 2 as a2, processor 3 as a3, processor 4 as a4, and processor 5 as a5. If the received migration request carries the source processor identifier a4, then processor 4 is the source processor.

[0086] Furthermore, each processor is compared with preset screening criteria, and the processors that meet the preset screening criteria are identified as the target processors to which the target virtual machine is to be migrated.

[0087] Using the previous example, the preset filtering condition is to select processors in an idle state as the target processors, and the states of processors 1-5 are respectively: working state, idle state, repair state, abnormal state and upgrade state. Then, processor 2 is determined as the target processor.

[0088] Thus, by identifying the source processor based on the source processor identifier carried in the migration request, the source processor can be located quickly and accurately, thereby improving the efficiency of the migration. In addition, by identifying the target processor from multiple processors based on preset filtering conditions, the target processor can be quickly selected even when the migration request does not specify a particular processor to which the virtual machine will be migrated, ensuring the smooth progress of the migration and improving the success rate of the migration.

[0089] Optionally, the preset filtering condition is that the data processing volume is lower than a preset processing volume. In this case, the processor with a data processing volume lower than the preset processing volume is determined as the target processor. That is, the specific implementation process of determining the target processor to which the target virtual machine is to be migrated from the multiple processors based on the preset filtering condition can be as follows:

[0090] Obtain the data processing volume of each processor;

[0091] The processor whose data processing volume is lower than the preset processing volume is identified as the target processor to which the target virtual machine is to be migrated.

[0092] Specifically, the amount of data processed represents the amount of data, which can be measured by the size of the space occupied by the data, such as 1GB of data or 1TB of data, or by the time required to continue processing the data, such as 10 minutes or 20 minutes. The preset processing volume is a pre-set data threshold, which can be set from the perspective of the size of the space occupied by the data and / or the time range corresponding to the data.

[0093] In practical applications, the data processing volume of each processor can be read in real time, and the data processing volume of each processor can be compared with the preset processing volume. The processor whose data processing volume is lower than the preset processing volume is determined as the target processor.

[0094] For example, there are three processors: processor 1 has a data processing capacity of 10KB, processor 2 has a data processing capacity of 0.5KB, and processor 3 has a data processing capacity of 100KB. If the preset data processing capacity is 1KB, then processor 2 is selected as the target processor.

[0095] In this way, by selecting processors with data processing volumes lower than the preset processing volume as the target processor, it can be ensured that the target processor has sufficient processing resources to receive data from the target virtual machine and ensure the normal operation of the target virtual machine, thereby further improving the success rate and reliability of virtual machine migration.

[0096] In addition, the preset filtering criteria can also be: the lowest data processing volume, that is, the processor with the lowest data processing volume is selected as the target processor; the preset filtering criteria can also be: the data processing efficiency is higher than a preset processing threshold, that is, the processor with the data processing efficiency is higher than a preset processing threshold is selected as the target processor; the preset filtering criteria can also be: the processor is in a data processing state, such as normal working state or normal operating state, that is, the processor in a data processing state is selected as the target processor. This specification does not limit this.

[0097] It should be noted that, in order to ensure the availability of the target processor, the preset filtering criteria can include limiting the processor's functionality in addition to restricting its state. For example, the preset filtering criteria could be that the processor is working normally and has the lowest data processing capacity.

[0098] In another possible implementation of this specification, the migration request carries a source processor identifier and a destination processor identifier. The control unit can then determine the source processor based on the source processor identifier and the target processor based on the destination processor identifier. That is, when the migration request carries both a source processor identifier and a destination processor identifier, the specific implementation process for determining the source processor where the target virtual machine currently resides and the destination processor to which it is to be migrated from the plurality of processors according to the migration request can be as follows:

[0099] The processor that corresponds to the source processor identifier among the plurality of processors is determined as the source processor where the target virtual machine is currently located;

[0100] The processor that corresponds to the target processor identifier among the plurality of processors is determined as the target processor to which the target virtual machine is to be migrated.

[0101] Specifically, the source processor identifier refers to the label, name, code, etc. of the source processor. The destination processor identifier refers to the label, name, code, etc. of the destination processor.

[0102] In practical applications, upon receiving a migration request carrying a source processor identifier and a destination processor identifier, the control unit matches the source processor identifier with the identifiers of each processor, and identifies the processor that matches successfully as the source processor, which is the current source processor of the target virtual machine; it also matches the destination processor identifier with the identifiers of each processor, and identifies the processor that matches successfully as the destination processor, which is the destination processor to be migrated to for the target virtual machine.

[0103] For example, there are five processors: processor 1 is identified as a1, processor 2 as a2, processor 3 as a3, processor 4 as a4, and processor 5 as a5. If the received migration request carries the source processor identifier a2 and the destination processor identifier a3, then processor 4 is the source processor, and processor 3 is determined to be the destination processor.

[0104] Thus, by determining the source processor based on the source processor identifier carried in the migration request and the destination processor based on the destination processor identifier carried in the migration request, the source and destination processors can be located quickly and accurately, thereby improving the efficiency of migration; that is, by specifying the source processor from which the virtual machine is migrated out and the destination processor to which it is migrated in, the migration rate can be increased.

[0105] It should be noted that the source processor and destination processor can be determined simultaneously, or the source processor can be determined first and then the destination processor, or vice versa. This specification does not impose any restrictions on this.

[0106] Furthermore, the migration request carries the source processor identifier, which can be replaced by the target virtual machine identifier; that is, the migration request carries the target virtual machine identifier. The control unit can determine the processor where the target virtual machine resides, i.e., the source processor, based on the target virtual machine identifier.

[0107] Step 206: Send a migration command to the source processor so that the source processor sends the data of the target virtual machine to the destination processor through the smart network card.

[0108] Specifically, the migration command indicates that the migration has been initiated.

[0109] In practical applications, once the source processor and the destination processor are determined, the control unit generates a migration command that initiates the migration and sends it to the source processor. This tells the source processor to start migrating the target virtual machine. In other words, after receiving the migration command, the source processor sends the data of the target virtual machine to the target processor through the smart network card to execute the migration process.

[0110] In addition, migration commands can carry a destination processor identifier to inform the source processor which processor the target virtual machine will be migrated to; the control unit can also send migration commands to the destination processor to inform the destination processor to prepare for migration and lay the foundation for receiving data from the target virtual machine.

[0111] It should be noted that, in one or more optional embodiments of this specification, the migration performed on the target virtual machine is a hot migration, that is, the migration request is a hot migration request, and the data of the target virtual machine is the state data of the target virtual machine stored in memory. This allows for hot migration even within the same device, improving the efficiency of hot migration.

[0112] It should be noted that the processor can interact with the smart network card via PCIe devices or DMA devices. See also Figure 3A , Figure 3A This document presents a flowchart illustrating data transfer in a virtual machine migration method according to one embodiment: The source processor transfers the target virtual machine's data to the smart network interface card (NIC) via a PCIe device, and the smart NIC then transfers the target virtual machine's data to the destination processor via the PCIe device. Alternatively, the source processor transfers the target virtual machine's data to the smart NIC via a DMA device, and the smart NIC then transfers the target virtual machine's data to the destination processor via the DMA device.

[0113] This specification provides a virtual machine migration method applied to a control unit deployed on a server containing multiple processors. These processors interact with each other via smart network interface cards (NICs). The method includes: receiving a migration request for a target virtual machine; determining, based on the migration request, the source processor where the target virtual machine is currently located and the destination processor to which it is to be migrated, from among the multiple processors, wherein the source processor and the destination processor are processors among the multiple processors; and sending a migration instruction to the source processor, causing the source processor to send the data of the target virtual machine to the destination processor via the smart NIC. When the source processor needs to support security patches or new features, or when repairing faulty hardware, virtual machine migration is required. The source processor forwards the data of the target virtual machine directly to the target processor on the server through the dedicated hardware module of the smart network card, instead of migrating the target virtual machine to another server across physical networks such as network switches. This process does not go through the network ports of the smart network card, does not rely on network switches, has low latency, high throughput, and a higher success rate due to the shorter path. This improves the efficiency, success rate, and concurrency of migration, reduces migration time, and avoids network congestion. Since the migration is completed within the same server, the migration path is significantly reduced, the attack surface is greatly reduced, and the security of the migration is improved.

[0114] See Figure 3B , Figure 3B The flowchart of another virtual machine migration method provided in one embodiment of this specification is shown. It is applied to the source processor where the target virtual machine is currently located. The source processor is deployed on a server containing multiple processors and control units. The multiple processors exchange data through smart network interface cards. The method specifically includes the following steps.

[0115] Step 302: Receive the migration instruction sent by the control unit, wherein the source processor is determined by the control unit from the plurality of processors according to the migration request for the target virtual machine.

[0116] Specifically, a processor can be a Central Processing Unit (CPU), which serves as the core of a computer system for computation and control, and is the final execution unit for information processing and program execution. A control unit can be a controller or an agent unit, used to coordinate and direct the operation of the entire computer system. A server can be a physical machine, such as a computer, containing multiple processors and virtual machines. The target virtual machine refers to the virtual machine that needs to be migrated, i.e., the virtual machine to be migrated. A Smart Network Interface Card (NIC), also known as a smart network adapter, not only performs the network transmission functions of a standard NIC but also provides a built-in programmable and configurable hardware acceleration engine, improving application performance and significantly reducing CPU consumption during communication, thus providing more CPU resources. The migration command indicates the start of the migration.

[0117] In practical applications, the control unit receives a migration request for the target virtual machine. Based on the migration request, it determines the source processor where the target virtual machine is currently located and the destination processor to which it is to be migrated from multiple processors. Then, it sends the migration instruction to the source processor, that is, the source processor receives the migration instruction sent by the control unit.

[0118] Step 304: Send the data of the target virtual machine to the destination processor to which the target virtual machine is to be migrated through the smart network card, wherein the destination processor is determined by the control unit from the plurality of processors according to the migration request for the target virtual machine, and the source processor and the destination processor are processors among the plurality of processors.

[0119] In practical applications, after receiving the migration command, the source processor responds by sending the data of the target virtual machine to the destination processor through the smart network card, and only performs the migration process.

[0120] Optionally, the source processor can send all data of the target virtual machine to the destination processor via a smart network card, thus ensuring the integrity of the data migration.

[0121] Optionally, the source processor can also send the state data of the target virtual machine stored in memory to the destination processor via the smart network interface card (NIC). That is, the specific implementation process of sending the data of the target virtual machine to the destination processor to which the target virtual machine is to be migrated via the smart NIC can be as follows:

[0122] The state data of the target virtual machine stored in memory is iteratively copied, and the state data is sent from memory to the smart network interface card (NIC) so that the smart NIC forwards the state data to the target processor to which the target virtual machine is to be migrated.

[0123] In practical applications, because it involves migration, the target virtual machine continues to provide services to users during the migration process. Therefore, the state data of the target virtual machine stored in memory is constantly being updated and changing. To ensure data integrity and continuity, the state data of the target virtual machine stored in memory needs to be iteratively copied multiple times, and then the state data is forwarded to the destination processor via a smart network interface card. In this way, only the state data is sent to the destination processor, ensuring stable service after the target virtual machine is migrated to the destination processor, while also reducing data transfer volume and improving migration efficiency.

[0124] For example, the target virtual machine stores state data in memory as dirty page traffic. The source processor iteratively copies this dirty page traffic multiple times, and then, through the PCIe device, the dirty page traffic enters the dedicated hardware forwarding module of the smart network card. This module then directly forwards the traffic to the destination processor. Since the migrated dirty pages do not generate network traffic, the traffic is handled internally by the server, causing no network overhead on the physical network.

[0125] It should be noted that, in addition to the state data stored in memory, the target virtual machine's backup data also needs to be transferred to the target processor to ensure its long-term stable operation. Since this backup data is typically stored in the cloud, it can be sent to the target processor from the cloud.

[0126] After the target virtual machine migration is complete, the source processor can be repaired, hot-patched, and have new features added. That is, after sending the target virtual machine's data to the destination processor to which the target virtual machine is to be migrated via the smart network card, the process also includes:

[0127] Receive adjustment instructions for the source processor;

[0128] The upgrade is performed according to the adjustment parameters in the adjustment instruction.

[0129] Specifically, adjustment instructions refer to processing instructions that perform maintenance, hot patching, or add new features to the source processor, and the adjustment parameters are the processing parameters.

[0130] In practical applications, after the target virtual machine migration is complete, the source processor can be processed accordingly, such as repair, hot patching, adding new features, or deletion. At this time, the source processor will receive adjustment instructions for the source processor, and then perform the corresponding adjustments based on the adjustment parameters in the adjustment instructions. In this way, the functional upgrade, repair, and maintenance of the source processor can be completed.

[0131] This manual provides a virtual machine migration method. When the source processor needs to support security patches or new features, or when repairing faulty hardware, virtual machine migration is required. The source processor directly forwards the data of the target virtual machine to the target processor on the server via a dedicated hardware module of the smart network card, instead of migrating the target virtual machine to another server across physical networks such as network switches. This process does not go through the network ports of the smart network card, does not rely on network switches, has low latency, high throughput, and a higher success rate due to the shorter path. This improves migration efficiency, success rate, and concurrency, reduces migration time, and avoids network congestion. Since the migration is completed within the same server, the migration path is significantly reduced, the attack surface is greatly reduced, and the security of the migration is improved.

[0132] Because nodes support hot-swapping, pass-through devices (servers) do not require power outages, and device status does not need to be saved / restored or transmitted over the network. In addition, smart network cards have strong hardware forwarding capabilities, and the status data stored in memory is synchronized in a timely manner, significantly reducing data interruption time.

[0133] The following is in conjunction with the appendix Figure 4A Taking the application of the virtual machine migration method provided in this specification in a real-world scenario as an example, the virtual machine migration method will be further explained. Among other things, Figure 4A The present specification illustrates a flowchart of a virtual machine migration method according to an embodiment, which includes the following steps.

[0134] Step 402: The control unit receives a migration request for the target virtual machine; based on the migration request, it determines the source processor where the target virtual machine is currently located and the destination processor to which it is to be migrated from multiple processors; and sends migration instructions to the source processor and the destination processor so that the source processor sends the data of the target virtual machine to the destination processor through the smart network card.

[0135] For example, based on the source processor identifier carried in the migration request, the source processor where the target virtual machine is currently located can be determined from multiple processors, and processors with data processing volume lower than the preset processing volume can be determined as the destination processor to which the target virtual machine is to be migrated.

[0136] For example, if the migration request carries a source processor identifier and a destination processor identifier, then the processor corresponding to the source processor identifier among multiple processors is determined as the source processor where the target virtual machine is currently located; and the processor corresponding to the destination processor identifier among multiple processors is determined as the destination processor to which the target virtual machine is to be migrated.

[0137] Step 404: The destination processor prepares virtual machine resources, including network resources.

[0138] For example, you can create a network interface card (NIC) for a virtual machine and then add that NIC to the OvS br-int bridge. If this stage fails, a rollback operation will occur.

[0139] Step 406: The source processor sends the data of the target virtual machine to the destination processor to which the target virtual machine is to be migrated via the smart network card.

[0140] For example, iteratively copying the state data of the target virtual machine stored in memory and sending the state data from memory to the smart network card so that the smart network card can forward the state data to the target processor to which the target virtual machine is to be migrated. That is, this stage is entirely about migrating the state data of the target virtual machine stored in memory. If the virtual machine's system disk is on the source processor, then the system disk data will also be migrated at this time.

[0141] See Figure 4B , Figure 4B This is a flowchart of data interaction between the source processor and the destination processor in a virtual machine migration method provided in one embodiment of this specification: CPU0 is the source processor, and CPU1 is the destination processor. Suppose that the node where CPU0 is located generates a hardware alarm, requiring hardware repair, or that a security patch needs to be upgraded as soon as possible, or that a new feature needs to be supported, the virtual machine can be directly and quickly migrated from CPU0 to another node on the same server, namely CPU1. This requires multiple iterations of copying the dirty page traffic of the virtual machine's memory on CPU0, and then using the PCIe device to make the dirty page traffic of the memory enter the hardware dedicated fast forwarding module of the smart network card, and then directly forward it to CPU1.

[0142] Step 408: The source processor receives the adjustment instruction; and performs the upgrade according to the adjustment parameters in the adjustment instruction.

[0143] For example, after the migration is complete, the source processor enters the resource cleanup phase, disconnects the volume connection of the target virtual machine on the source processor, cleans up the network card resources of the virtual machine on the source compute node, and then upgrades the source processor.

[0144] This manual provides a virtual machine migration method. When the source processor needs to support security patches or new features, or when repairing faulty hardware, virtual machine migration is required. The source processor directly forwards the target virtual machine's data to the target processor on the server via a dedicated hardware module of the smart network card, instead of migrating the target virtual machine to another server across physical networks such as network switches. This process does not pass through the network ports of the smart network card, does not rely on network switches, has low latency, high throughput, and a higher success rate due to the shorter path. This improves migration efficiency, success rate, and concurrency, reduces migration time, and avoids network congestion. Since the migration is completed within the same server, the migration path is significantly reduced, the attack surface is greatly reduced, and the security of the migration is improved.

[0145] Corresponding to the above method embodiments, this specification also provides embodiments of a virtual machine migration device applied to a control unit. Figure 5 A schematic diagram of a virtual machine migration apparatus according to one embodiment of this specification is shown. Figure 5 As shown, this device is applied to a control unit, which is deployed on a server containing multiple processors. These processors exchange data via smart network interface cards (NICs), including:

[0146] The first receiving module 502 is configured to receive migration requests for the target virtual machine;

[0147] The confirmation module 504 is configured to determine, based on the migration request, the source processor where the target virtual machine is currently located and the destination processor to which it is to be migrated from the plurality of processors, wherein the source processor and the destination processor are processors among the plurality of processors;

[0148] The first sending module 506 is configured to send a migration instruction to the source processor, so that the source processor sends the data of the target virtual machine to the destination processor through the smart network card.

[0149] Optionally, the migration request is a hot migration request, and the data of the target virtual machine is the state data of the target virtual machine stored in memory.

[0150] Optionally, the confirmation module 502 is further configured to:

[0151] Based on the source processor identifier carried in the migration request, determine the source processor where the target virtual machine is currently located from the plurality of processors;

[0152] Based on preset filtering criteria, the target processor to which the target virtual machine is to be migrated is determined from the plurality of processors.

[0153] Optionally, the confirmation module 502 is further configured to:

[0154] Obtain the data processing volume of each processor;

[0155] The processor whose data processing volume is lower than the preset processing volume is identified as the target processor to which the target virtual machine is to be migrated.

[0156] Optionally, the migration request carries an active processor identifier and a destination processor identifier;

[0157] The confirmation module 502 is further configured to:

[0158] The processor that corresponds to the source processor identifier among the plurality of processors is determined as the source processor where the target virtual machine is currently located;

[0159] The processor that corresponds to the target processor identifier among the plurality of processors is determined as the target processor to which the target virtual machine is to be migrated.

[0160] This manual provides a virtual machine migration device. When the source processor needs to support security patches or new features, or when repairing faulty hardware, virtual machine migration is required. The source processor directly forwards the data of the target virtual machine to the target processor on the server via a dedicated hardware module of the smart network card, instead of migrating the target virtual machine to another server across physical networks such as network switches. This process does not pass through the network ports of the smart network card, does not rely on network switches, has low latency, high throughput, and a higher success rate due to the shorter path. This improves migration efficiency, success rate, and concurrency, reduces migration time, and avoids network congestion. Since the migration is completed within the same server, the migration path is significantly reduced, the attack surface is greatly reduced, and the security of the migration is improved.

[0161] The above is an illustrative scheme of a virtual machine migration device applied to a control unit according to this embodiment. It should be noted that the technical solution of this virtual machine migration device applied to a control unit and the technical solution of the virtual machine migration method applied to a control unit described above belong to the same concept. For details not described in detail in the technical solution of the virtual machine migration device applied to a control unit, please refer to the description of the technical solution of the virtual machine migration method applied to a control unit described above.

[0162] Corresponding to the above method embodiments, this specification also provides embodiments of a virtual machine migration apparatus applied to a source processor. Figure 6 A schematic diagram of another virtual machine migration apparatus provided in one embodiment of this specification is shown. Figure 6As shown, this device is applied to the source processor where the target virtual machine is currently located. The source processor is deployed on a server containing multiple processors and control units. The multiple processors exchange data through smart network interface cards, including:

[0163] The second receiving module 602 is configured to receive a migration instruction sent by the control unit, wherein the migration instruction indicates the initiation of migration, and the source processor is determined by the control unit from the plurality of processors according to the migration request for the target virtual machine;

[0164] The second sending module 604 is configured to send the data of the target virtual machine to the destination processor to which the target virtual machine is to be migrated via the smart network card, wherein the destination processor is determined by the control unit from the plurality of processors according to the migration request for the target virtual machine, and the source processor and the destination processor are processors among the plurality of processors.

[0165] Optionally, the second transmitting module 604 is further configured to:

[0166] The state data of the target virtual machine stored in memory is iteratively copied, and the state data is sent from memory to the smart network interface card (NIC) so that the smart NIC forwards the state data to the target processor to which the target virtual machine is to be migrated.

[0167] Optionally, the device further includes an adjustment module configured to:

[0168] Receive adjustment instructions for the source processor;

[0169] The upgrade is performed according to the adjustment parameters in the adjustment instruction.

[0170] This manual provides a virtual machine migration device. When the source processor needs to support security patches or new features, or when repairing faulty hardware, virtual machine migration is required. The source processor directly forwards the data of the target virtual machine to the target processor on the server via a dedicated hardware module of the smart network card, instead of migrating the target virtual machine to another server across physical networks such as network switches. This process does not pass through the network ports of the smart network card, does not rely on network switches, has low latency, high throughput, and a higher success rate due to the shorter path. This improves migration efficiency, success rate, and concurrency, reduces migration time, and avoids network congestion. Since the migration is completed within the same server, the migration path is significantly reduced, the attack surface is greatly reduced, and the security of the migration is improved.

[0171] The above is an illustrative scheme of a virtual machine migration device applied to a control unit according to this embodiment. It should be noted that the technical solution of this virtual machine migration device applied to a control unit and the technical solution of the virtual machine migration method applied to a control unit described above belong to the same concept. For details not described in detail in the technical solution of the virtual machine migration device applied to a control unit, please refer to the description of the technical solution of the virtual machine migration method applied to a control unit described above.

[0172] Corresponding to the above method embodiments, this specification also provides server embodiments. Figure 7 A schematic diagram of the structure of a server provided in one embodiment of this specification is shown. Figure 7 As shown, the device includes:

[0173] Multiple processors 702 and a control unit 704, wherein the multiple processors exchange data via a smart network interface card;

[0174] The control unit 702 is configured to receive a migration request for a target virtual machine; determine, from the plurality of processors 704, the source processor 704-2 where the target virtual machine is currently located and the destination processor 704 to which it is to be migrated, based on the migration request; and send a migration instruction to the source processor, wherein the source processor and the destination processor are processors among the plurality of processors;

[0175] The source processor 704-2 is configured to send the data of the target virtual machine to the destination processor 704-4 via the smart network card in response to the migration instruction.

[0176] Optionally, the migration request is a hot migration request, and the data of the target virtual machine is the state data of the target virtual machine stored in memory.

[0177] Optionally, the control unit 702 is further configured to:

[0178] Based on the source processor identifier carried in the migration request, determine the source processor 704-2 where the target virtual machine is currently located from the plurality of processors 704;

[0179] Based on preset filtering conditions, the target processor 704-4 to which the target virtual machine is to be migrated is determined from the plurality of processors 704.

[0180] Optionally, the control unit 702 is further configured to:

[0181] Obtain the data processing volume of each processor (704);

[0182] The processor 704, whose data processing volume is lower than the preset processing volume, is identified as the target processor 704-4 to which the target virtual machine is to be migrated.

[0183] Optionally, the migration request carries an active processor identifier and a destination processor identifier;

[0184] The control unit 702 is further configured to:

[0185] The processor corresponding to the source processor identifier among the plurality of processors 704 is determined as the source processor 704-2 where the target virtual machine is currently located;

[0186] The processor among the plurality of processors 704 that corresponds to the target processor identifier is determined as the target processor 704-4 to which the target virtual machine is to be migrated.

[0187] Optionally, the source processor 704-2 is further configured to:

[0188] Iteratively copy the state data of the target virtual machine stored in memory, and send the state data from memory to the smart network interface card (NIC), so that the smart NIC forwards the state data to the target processor 704-4 to which the target virtual machine is to be migrated.

[0189] Optionally, the source processor 704-2 is further configured to:

[0190] Receive adjustment instructions for the source processor;

[0191] The upgrade is performed according to the adjustment parameters in the adjustment instruction.

[0192] This manual provides a server that, when the source processor needs to support security patches or new features, or when performing faulty hardware repairs, requires virtual machine migration, the source processor directly forwards the target virtual machine's data to the target processor on this server via a dedicated hardware module of the smart network interface card (NIC), instead of migrating the target virtual machine to another server across physical networks such as network switches. This process does not pass through the network ports of the smart NIC, does not rely on network switches, has low latency, high throughput, and a higher success rate due to the shorter path. This improves migration efficiency, success rate, and concurrency, reduces migration time, and avoids network congestion. Since the migration is completed within the same server, the migration path is significantly reduced, the attack surface is greatly reduced, and the security of the migration is improved.

[0193] The above is an illustrative solution for a server according to this embodiment. It should be noted that the technical solution of this server belongs to the same concept as the technical solution of the virtual machine migration method described above. For details not described in detail in the technical solution of the server, please refer to the description of the technical solution of the virtual machine migration method described above.

[0194] Figure 8 This specification illustrates a structural block diagram of a computing device according to one embodiment. The components of the computing device 800 include, but are not limited to, a memory 810 and a processor 820. The processor 820 is connected to the memory 810 via a bus 830, and a database 850 is used to store data.

[0195] The computing device 800 also includes an access device 840, which enables the computing device 800 to communicate via one or more networks 860. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 840 may include one or more of any type of wired or wireless network interface (e.g., a Network Interface Controller (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.

[0196] In one embodiment of this specification, the above-described components of the computing device 800 and Figure 8 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 8 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0197] The computing device 800 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or PCs. The computing device 800 can also be a mobile or stationary server.

[0198] The processor 820 is configured to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the virtual machine migration method described above.

[0199] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the virtual machine migration method described above belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the virtual machine migration method described above.

[0200] An embodiment of this specification also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the virtual machine migration method described above.

[0201] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the virtual machine migration method described above belong to the same concept. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the virtual machine migration method described above.

[0202] An embodiment of this specification also provides a computer program, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the virtual machine migration method described above.

[0203] The above is an illustrative scheme of a computer program according to this embodiment. It should be noted that the technical solution of this computer program and the technical solution of the virtual machine migration method described above belong to the same concept. For details not described in detail in the technical solution of the computer program, please refer to the description of the technical solution of the virtual machine migration method described above.

[0204] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0205] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.

[0206] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.

[0207] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0208] The preferred embodiments disclosed above are merely illustrative of this specification. Optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. A server, comprising: Multiple processors and control units, wherein the multiple processors exchange data via smart network interface cards; The control unit is configured to receive migration requests for the target virtual machine; Based on the migration request, determine the source processor where the target virtual machine is currently located and the destination processor to which it is to be migrated from the plurality of processors; Send a migration instruction to the source processor, wherein the source processor and the destination processor are processors among the plurality of processors; The source processor is configured to, in response to the migration command, transfer the data of the target virtual machine to the smart network card via a PCIe device or a DMA device without going through the network port of the smart network card, and the smart network card sends the data of the target virtual machine to the destination processor via the PCIe device or the DMA device.

2. An upgrade method applied to a single server, said server having multiple processors deployed thereon, the multiple processors interacting with each other via smart network interface cards (NICs), the method comprising: The control unit receives an upgrade request for the source processor, determines the source processor and the destination processor to which the target virtual machine in the source processor is to be migrated from the plurality of processors according to the upgrade request, and sends a migration instruction to the source processor, wherein the source processor and the destination processor are processors among the plurality of processors; In response to the migration command, the source processor transfers the state data of the target virtual machine stored in memory to the smart network card via a PCIe device or a DMA device without going through the network port of the smart network card. The smart network card then sends the data of the target virtual machine to the destination processor via the PCIe device or the DMA device. The target processor generates the target virtual machine based on the state data; The source processor is upgraded once the migration is complete.

3. A virtual machine migration method applied to a control unit, said control unit being deployed on a server containing multiple processors, said multiple processors exchanging data via smart network interface cards, comprising: Receive migration requests for the target virtual machine; Based on the migration request, the source processor where the target virtual machine is currently located and the destination processor to which it is to be migrated are determined from the plurality of processors, wherein the source processor and the destination processor are processors among the plurality of processors; A migration command is sent to the source processor so that the source processor can transfer the data of the target virtual machine to the smart network card through a PCIe device or a DMA device without going through the network port of the smart network card. The smart network card then sends the data of the target virtual machine to the destination processor through the PCIe device or the DMA device.

4. The method according to claim 3, wherein the migration request is a hot migration request, and the data of the target virtual machine is the state data of the target virtual machine stored in memory.

5. The method according to claim 3, wherein determining the source processor where the target virtual machine is currently located and the destination processor to be migrated to from the plurality of processors based on the migration request includes: Based on the source processor identifier carried in the migration request, determine the source processor where the target virtual machine is currently located from the plurality of processors; Based on preset filtering criteria, the target processor to which the target virtual machine is to be migrated is determined from the plurality of processors.

6. The method according to claim 5, characterized in that, The step of determining the target processor to which the target virtual machine will be migrated from the plurality of processors based on preset filtering conditions includes: Obtain the data processing volume of each processor; The processor whose data processing volume is lower than the preset processing volume is identified as the target processor to which the target virtual machine is to be migrated.

7. The method according to claim 3, wherein the migration request carries an active processor identifier and a destination processor identifier; The step of determining the source processor where the target virtual machine is currently located and the destination processor to be migrated to from the plurality of processors according to the migration request includes: The processor that corresponds to the source processor identifier among the plurality of processors is determined as the source processor where the target virtual machine is currently located; The processor that corresponds to the target processor identifier among the plurality of processors is determined as the target processor to which the target virtual machine is to be migrated.

8. A virtual machine migration method, applied to the source processor where the target virtual machine is currently located, wherein the source processor and the target processor to which the target virtual machine is to be migrated are deployed on a server containing multiple processors and control units, and the multiple processors exchange data through a smart network interface card, including: The control unit receives a migration instruction, wherein the source processor is determined by the control unit from among the plurality of processors based on the migration request for the target virtual machine. Without going through the network port of the smart network card, the data of the target virtual machine is transmitted to the smart network card via a PCIe device or a DMA device. The smart network card then sends the data of the target virtual machine to the destination processor to which the target virtual machine is to be migrated via the PCIe device or the DMA device. The destination processor is determined by the control unit from among the plurality of processors based on the migration request for the target virtual machine. The source processor and the destination processor are processors among the plurality of processors.

9. The method according to claim 8, characterized in that, The process of transmitting the target virtual machine's data to the smart network card via a PCIe device or a DMA device without passing through the smart network card's network port, and then having the smart network card send the target virtual machine's data to the destination processor to which the target virtual machine is to be migrated via the PCIe device or the DMA device, includes: The system iteratively copies the state data of the target virtual machine stored in memory, without passing through the network port of the smart network card, and sends the state data from memory to the smart network card through a PCIe device or a DMA device, so that the smart network card forwards the state data to the target processor to which the target virtual machine is to be migrated through the PCIe device or the DMA device.

10. The method according to claim 9, characterized in that, The process of transmitting the target virtual machine's data to the smart network card via a PCIe device or DMA device without passing through the smart network card's network port, and then the smart network card sending the target virtual machine's data to the target processor to which the target virtual machine is to be migrated via the PCIe device or DMA device, further includes: Receive adjustment instructions for the source processor; The upgrade is performed according to the adjustment parameters in the adjustment instruction.

11. A virtual machine migration apparatus, applied to a control unit, the control unit being deployed on a server containing multiple processors, the multiple processors exchanging data via smart network interface cards, comprising: The first receiving module is configured to receive migration requests for the target virtual machine; The confirmation module is configured to determine, based on the migration request, the source processor where the target virtual machine is currently located and the destination processor to which it is to be migrated from the plurality of processors, wherein the source processor and the destination processor are processors among the plurality of processors; The first sending module is configured to send a migration instruction to the source processor, so that the source processor can transfer the data of the target virtual machine to the smart network card through a PCIe device or a DMA device without going through the network port of the smart network card, and the smart network card can send the data of the target virtual machine to the destination processor through the PCIe device or the DMA device.

12. A virtual machine migration apparatus, applied to a source processor where a target virtual machine is currently located, wherein the source processor and the target processor to which the target virtual machine is to be migrated are deployed on a server comprising multiple processors and a control unit, the multiple processors exchanging data via a smart network interface card, comprising: The second receiving module is configured to receive migration instructions sent by the control unit, wherein the source processor is determined by the control unit from the plurality of processors according to the migration request for the target virtual machine; The second sending module is configured to transmit the data of the target virtual machine to the smart network card via a PCIe device or a DMA device without going through the network port of the smart network card. The smart network card then sends the data of the target virtual machine to the destination processor to which the target virtual machine is to be migrated via the PCIe device or the DMA device. The destination processor is determined by the control unit from among the plurality of processors based on the migration request for the target virtual machine. The source processor and the destination processor are processors among the plurality of processors.

13. A computing device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the virtual machine migration method according to any one of claims 3-7 or 8-10.

14. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the virtual machine migration method according to any one of claims 3-7 or 8-10.

Citation Information

Patent Citations

  • Message processing method and device, network transmission equipment and message processing system

    CN111740910A

  • Virtual machine thermal migration method and communication equipment

    CN112306650A