Virtual machine migration method, server, system and storage medium

By obtaining and migrating the hardware acceleration device information and dirty page information of virtual machines, the problem of live migration of virtual machines is solved, and business continuity and resource utilization are improved during load balancing or maintenance.

CN118567778APending Publication Date: 2024-08-30ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310190240.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-22
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

Existing technology cannot realize complete live migration of virtual machines, resulting in the inability to migrate virtual machines to other host servers without interrupting business during load balancing or server maintenance.

Method used

By obtaining the hardware acceleration device information and configuration parameters of the source virtual machine, create a destination virtual machine that is the same as the source virtual machine, configure the destination hardware acceleration device according to the hardware acceleration device information, obtain and migrate their respective dirty page information, and ensure the destination after migration. Virtual machines and hardware acceleration devices can run normally.

Benefits of technology

It achieves efficient and accurate live migration of virtual machines, ensures the ability to not interrupt services during load balancing or server maintenance, and improves server resource utilization and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567778A
    Figure CN118567778A
Patent Text Reader

Abstract

The embodiment of the invention provides a virtual machine migration method and system, a server and a storage medium, and belongs to the technical field of cloud computing. The method comprises the following steps: acquiring hardware acceleration equipment information and configuration parameter information corresponding to a to-be-migrated source virtual machine; determining a target host machine, and sending hardware acceleration equipment information and configuration parameter information to the target host machine, so that the target host machine creates a target virtual machine with the same configuration as the source virtual machine according to the configuration parameter information, and configures target hardware acceleration equipment of the target virtual machine according to the hardware acceleration equipment information; first dirty page information corresponding to each hardware acceleration device and second dirty page information of the source virtual machine are obtained, the first dirty page information and the second dirty page information are migrated to the target host machine, and under the condition that migration is completed, the target host machine controls the target virtual machine and the target hardware acceleration devices to start running. According to the scheme, the live migration of the virtual machine can be efficiently realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the technical field of cloud computing, and in particular to a virtual machine migration method, server, system and storage medium. Background Art

[0002] A virtual machine is a complete computer system that runs in a completely isolated environment and has complete hardware system functions, simulated by software. Virtual machines usually run on host servers, and multiple virtual machines can run on each host server. In order to improve the utilization of servers, more and more acceleration devices (Field Programmable Gate Array (FPGA) acceleration cards and Data Processing Unit (DPU) acceleration cards) are inserted into servers to offload network and disk functions to the acceleration devices. The server is only responsible for computing virtualization and memory virtualization, which can greatly reduce the burden on the server and run more virtual machines.

[0003] Nowadays, the server resources required by virtual machines depend on the business load running in the virtual machines. When the virtual machines are running heavy-load businesses, the server host resources will be under great pressure. For load balancing reasons, some virtual machines need to be hot migrated to servers with lighter loads to run; or when the server needs maintenance (for example, upgrading or replacing parts, etc.), the virtual machines with business can be migrated to other servers if the programs running the business cannot be terminated or paused. However, current technology cannot completely hot migrate virtual machines to other host servers. Summary of the invention

[0004] The embodiment of the present invention provides a virtual machine migration method, server, system and storage medium, aiming to realize hot migration of virtual machines.

[0005] In a first aspect, an embodiment of the present invention provides a virtual machine migration method, comprising:

[0006] Obtaining hardware acceleration device information and configuration parameter information corresponding to the source virtual machine to be migrated, wherein the hardware acceleration device information includes device description information of one or more hardware acceleration devices configured on the source virtual machine;

[0007] Determine a destination host machine, and send the hardware acceleration device information and configuration parameter information to the destination host machine, so that the destination host machine can create a destination virtual machine with the same configuration as the source virtual machine according to the configuration parameter information, and configure a destination hardware acceleration device of the destination virtual machine according to the hardware acceleration device information;

[0008] The first dirty page information corresponding to each of the hardware acceleration devices and the second dirty page information of the source virtual machine are obtained, and the first dirty page information and the second dirty page information are migrated to the destination host machine, wherein, when the migration is completed, the destination host machine controls the destination virtual machine and each of the destination hardware acceleration devices to start running.

[0009] In a second aspect, an embodiment of the present invention further provides a virtual machine migration system, the virtual machine migration system comprising a source host machine and a destination host machine, wherein:

[0010] The source host machine is used to obtain hardware acceleration device information and configuration parameter information corresponding to the source virtual machine to be migrated, wherein the hardware acceleration device information includes device description information of one or more hardware acceleration devices configured on the source virtual machine;

[0011] The source host machine is further used to determine a destination host machine and send the hardware acceleration device information and configuration parameter information to the destination host machine;

[0012] The destination host machine is used to receive the hardware acceleration device information and configuration parameter information, create a destination virtual machine with the same configuration as the source virtual machine according to the configuration parameter information, and configure a destination hardware acceleration device of the destination virtual machine according to the hardware acceleration device information;

[0013] The source host machine is further used to obtain first dirty page information corresponding to each of the hardware acceleration devices and second dirty page information of the source virtual machine, and migrate the first dirty page information and the second dirty page information to the destination host machine;

[0014] The destination host machine is further configured to receive the first dirty page information and the second dirty page information, and control the destination virtual machine and each of the destination hardware acceleration devices to start running when the migration is completed.

[0015] In a third aspect, an embodiment of the present invention further provides a server, comprising a processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the steps of any one of the virtual machine migration methods provided in the specification of the present invention are implemented.

[0016] In a fourth aspect, an embodiment of the present invention further provides a storage medium for computer-readable storage, characterized in that the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any virtual machine migration method provided in the specification of the present invention.

[0017] The embodiment of the present invention provides a virtual machine migration method, server, system and storage medium. The embodiment of the present invention obtains hardware acceleration device information and configuration parameter information corresponding to a source virtual machine to be migrated, wherein the hardware acceleration device information includes device description information of one or more hardware acceleration devices configured by the source virtual machine; determines a destination host machine, and sends the hardware acceleration device information and configuration parameter information to the destination host machine, so that the destination host machine can create a destination virtual machine with the same configuration as the source virtual machine according to the configuration parameter information, and configure the destination hardware acceleration device of the destination virtual machine according to the hardware acceleration device information; obtains the first dirty page information corresponding to each hardware acceleration device and the second dirty page information of the source virtual machine, and migrates the first dirty page information and the second dirty page information to the destination host machine, wherein, when the migration is completed, the destination host machine controls the destination virtual machine and each destination hardware acceleration device to start running. This solution creates a destination virtual machine with the same configuration as the source virtual machine in the destination host machine and configures the destination hardware acceleration device, thereby realizing the creation of the destination virtual machine operating environment, and migrates the first dirty page information corresponding to each hardware acceleration device and the second dirty page information of the source virtual machine to the destination host machine, thereby realizing the migration of virtual machine data, and when the migration is completed, the destination virtual machine and each destination hardware acceleration device start running, thereby efficiently and accurately completing the hot migration of the virtual machine. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 A flowchart of a virtual machine migration method provided by an embodiment of the present invention;

[0019] Figure 2 for Figure 1 A schematic diagram of the sub-step flow of the virtual machine migration method in FIG.

[0020] Figure 3 for Figure 1 A schematic flow chart of another sub-step of the virtual machine migration method;

[0021] Figure 4 A schematic diagram of a scenario of a virtual machine migration method provided by an embodiment of the present invention;

[0022] Figure 5 A schematic block diagram of the structure of a virtual machine migration system provided in an embodiment of the present application;

[0023] Figure 6 A schematic block diagram of the structure of a server provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0025] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0026] It should be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0027] The embodiment of the present invention provides a virtual machine migration method, server, system and storage medium. The virtual machine migration method can be applied to a server, which includes a desktop server, a rack server, a cabinet server, a blade server and a cloud server. For example, the server is a desktop server, and the desktop server obtains the hardware acceleration device information and configuration parameter information corresponding to the source virtual machine to be migrated, and the hardware acceleration device information includes the device description information of one or more hardware acceleration devices configured by the source virtual machine; determines the destination host machine, and sends the hardware acceleration device information and configuration parameter information to the destination host machine, so that the destination host machine can create a destination virtual machine with the same configuration as the source virtual machine according to the configuration parameter information, and configure the destination hardware acceleration device of the destination virtual machine according to the hardware acceleration device information; obtains the first dirty page information corresponding to each hardware acceleration device and the second dirty page information of the source virtual machine, and migrates the first dirty page information and the second dirty page information to the destination host machine, wherein, when the migration is completed, the destination host machine controls the destination virtual machine and each destination hardware acceleration device to start running.

[0028] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0029] Please refer to Figure 1 , Figure 1 A flowchart of a virtual machine migration method provided by an embodiment of the present invention.

[0030] like Figure 1 As shown, the virtual machine migration method includes steps S101 to S103.

[0031] Step S101: Obtain hardware acceleration device information and configuration parameter information corresponding to a source virtual machine to be migrated, wherein the hardware acceleration device information includes device description information of one or more hardware acceleration devices configured on the source virtual machine.

[0032] The hardware acceleration device information stores the information of each hardware acceleration device and the device description information of the hardware acceleration device. The hardware acceleration device information includes the name information and address information of the hardware acceleration device, and the device description information includes the attribute information and type information of the acceleration device. The configuration parameter information of the virtual machine includes the virtual CPU information and memory information.

[0033] In one embodiment, a migration instruction of a source virtual machine to be migrated is obtained, and according to the migration instruction, device description information, name information, and address information of one or more hardware acceleration devices configured on the source virtual machine are obtained; abstract processing is performed on each hardware acceleration device to generate hardware acceleration devices of the same type; the device description information, name information, and address information of each hardware acceleration device of the same type are merged to generate hardware acceleration device information. By performing abstract processing on each hardware acceleration device, each hardware acceleration device of the same type can be generated, and each hardware acceleration device of the same type greatly improves the efficiency and accuracy of virtual machine migration.

[0034] It should be noted that the conditions for triggering the generation of migration instructions for the source virtual machine can be set according to actual conditions, and the embodiments of the present invention do not specifically limit this. For example, when the source host machine requires maintenance (such as upgrading and repair), a migration instruction for the source virtual machine is generated; or, when the remaining available resources of the source host machine (such as CPU availability and memory availability) are insufficient, a migration instruction for the source virtual machine is generated.

[0035] Exemplarily, the representation form of the hardware acceleration device information can be set according to actual conditions, and the embodiment of the present invention does not specifically limit this. For example, the representation form of the hardware acceleration device information is a hardware acceleration device linked list, and the migration instruction of the source virtual machine to be migrated is obtained, and the device description information, name information and address information of one or more hardware acceleration devices configured by the source virtual machine are obtained according to the migration instruction; each hardware acceleration device is abstracted to generate each hardware acceleration device of the same type; each hardware acceleration device of the same type and the device description information, name information and address information of each hardware acceleration device are merged to generate a hardware acceleration device linked list. The generated hardware acceleration device linked list accurately and clearly represents the hardware acceleration device information.

[0036] In one embodiment, a virtual machine monitor (VMM) is provided in the source host machine. When receiving a migration instruction of a source virtual machine to be migrated, the VMM is started according to the migration instruction. The VMM obtains the device description information, name information and address information of one or more hardware acceleration devices configured by the source virtual machine; abstracts each hardware acceleration device to generate hardware acceleration devices of the same type; and merges the device description information, name information and address information of each hardware acceleration device of the same type to generate hardware acceleration device information. The hardware acceleration device information can be accurately and efficiently established through the VMM.

[0037] It should be noted that the embodiment of the present invention can control each step through the VMM to achieve the migration of the virtual machine, but the migration of the virtual machine can also be completed without using the VMM, that is, the embodiment of the present invention is not limited to the control of the VMM.

[0038] Step S102: determine a destination host machine, and send the hardware acceleration device information and configuration parameter information to the destination host machine, so that the destination host machine can create a destination virtual machine with the same configuration as the source virtual machine according to the configuration parameter information, and configure the destination hardware acceleration device of the destination virtual machine according to the hardware acceleration device information.

[0039] The destination host is a host used to create a destination virtual machine. The destination host can provide conditions for creating a destination virtual machine with the same configuration as the source virtual machine, and the destination host is configured with a destination hardware acceleration device that implements the function of the hardware acceleration device.

[0040] In one embodiment, multiple candidate hosts and device description information of each hardware acceleration device carried by each candidate host are obtained; according to the device description information of the hardware acceleration device configured by the source virtual machine and the device description information of each hardware acceleration device carried by each candidate host, a candidate host having the device description information of the hardware acceleration device configured by the source virtual machine is determined, and the determined candidate host is used as the destination host. By screening out the destination host that meets the requirements from multiple candidate hosts, the efficiency and accuracy of virtual machine migration can be improved.

[0041] Exemplarily, the hardware acceleration devices configured in the source virtual machine include hardware acceleration device 1 and hardware acceleration device 2, the device description information of hardware acceleration device 1 includes device description information A, and the device description information of hardware acceleration device 2 includes device description information B. The candidate host machine 1 includes hardware acceleration device 3, hardware acceleration device 4, and hardware acceleration device 5, the device description information of hardware acceleration device 3 includes device description information C, the device description information of hardware acceleration device 4 includes device description information A, and the device description information of hardware acceleration device 5 includes device description information D. The candidate host machine 2 includes hardware acceleration device 6 and hardware acceleration device 7, the device description information of hardware acceleration device 6 includes device description information E, the device description information of hardware acceleration device 4 includes device description information F, the candidate host machine 3 includes hardware acceleration device 8, hardware acceleration device 9, and hardware acceleration device 10, the device description information of hardware acceleration device 8 includes device description information A, the device description information of hardware acceleration device 9 includes device description information G, and the device description information of hardware acceleration device 10 includes device description information B. The device description information A, device description information G and device description information B included in the candidate host machine 3 include the device description information A and device description information B of the source virtual machine, and the candidate host machine 3 is determined as the destination host machine.

[0042] In one embodiment, based on the device description information of the hardware acceleration device configured on the source virtual machine and the device description information of each hardware acceleration device carried by each of the candidate host machines, a candidate host machine with the device description information of the hardware acceleration device configured on the source virtual machine is determined, multiple target candidate host machines are obtained, the available resources of each target candidate host machine are obtained, and the target candidate host machine with the first available resources is determined as the destination host machine. Among them, the available resources can be set according to actual conditions, and the embodiment of the present invention does not make specific limitations on this. For example, the available resources include CPU availability and memory available size. By selecting the optimal destination host machine from multiple target candidate host machines, the efficiency and accuracy of virtual machine migration can be improved, as well as the processing efficiency of the destination virtual machine.

[0043] In one embodiment, the address information of the destination host machine is obtained, and the hardware acceleration device information and configuration parameter information are sent to the destination host machine according to the address information of the destination host machine. The destination host machine receives the hardware acceleration device information and configuration parameter information, creates a destination virtual machine with the same configuration as the source virtual machine according to the configuration parameter information, and configures the destination hardware acceleration device of the destination virtual machine according to the hardware acceleration device information. The hardware acceleration device information and configuration parameter information are sent to the destination host machine, so that the destination host machine can efficiently create the destination virtual machine and configure the destination hardware acceleration device.

[0044] In one embodiment, the method of creating a destination virtual machine with the same configuration as the source virtual machine according to the configuration parameter information may be: obtaining configuration resources according to the configuration parameter information, creating a virtual machine according to the configuration resources, and obtaining a destination virtual machine with the same configuration as the source virtual machine. The creation of a virtual machine according to the configuration resources includes but is not limited to central processing unit configuration, memory configuration, network configuration, I / O controller type configuration, and disk type configuration. The destination virtual machine with the same configuration as the source virtual machine can be accurately configured through the configuration parameter information, which greatly improves the efficiency and accuracy of virtual machine migration.

[0045] In one embodiment, the method of configuring the destination hardware acceleration device of the destination virtual machine according to the hardware acceleration device information may be: determining at least one hardware acceleration device including the attribute information and the type information according to the attribute information and the type information of the hardware acceleration device in the hardware acceleration device information, and determining each hardware acceleration device as the destination hardware acceleration device. The destination hardware acceleration device of the destination virtual machine can be accurately configured according to the hardware acceleration device information, which greatly improves the efficiency and accuracy of virtual machine migration.

[0046] Step S103, obtaining first dirty page information corresponding to each of the hardware acceleration devices and second dirty page information of the source virtual machine, and migrating the first dirty page information and the second dirty page information to the destination host machine, wherein, when the migration is completed, the destination host machine controls the destination virtual machine and each of the destination hardware acceleration devices to start running.

[0047] The dirty page information refers to the data pages generated by the hardware acceleration devices and virtual machines during operation.

[0048] In one embodiment, if Figure 2 As shown, step S103 includes sub-steps S1031 and S1032.

[0049] Sub-step S1031: Send a dirty page record instruction to each of the hardware acceleration devices respectively, and obtain first dirty page information collected by each of the hardware acceleration devices based on the dirty page record instruction.

[0050] Traverse the hardware acceleration device information, send dirty page record instructions to each hardware acceleration device respectively, after each hardware acceleration device receives the dirty page record instruction, collect dirty page information according to the dirty page record instruction, obtain the first dirty page information corresponding to each hardware acceleration device, each hardware acceleration device sends the first dirty page information corresponding to each hardware acceleration device to the source host machine, so that the source host machine receives the first dirty page information of each hardware acceleration device. By sending the dirty page record instruction to each hardware acceleration device, the data pages generated by each hardware acceleration device can be accurately collected.

[0051] It should be noted that the first dirty page information includes data pages that are not modified after the hardware acceleration device receives the dirty page record instruction and data pages that are modified based on the operation.

[0052] Sub-step S1032: obtaining the second dirty page information of the source virtual machine, and migrating the first dirty page information and the second dirty page information to the destination host machine.

[0053] The second dirty page information of the source virtual machine is received, and the first dirty page information and the second dirty page information are sent to the destination host machine. The destination host machine receives the first dirty page information and the second dirty page information, and sends the first dirty page information to the corresponding destination hardware acceleration device according to the device description information, and sends the second dirty page information to the destination virtual machine. Sending the first dirty page information to the corresponding destination hardware acceleration device and sending the second dirty page information to the destination virtual machine can accurately and efficiently migrate the data of the source virtual machine to the destination virtual machine.

[0054] In one embodiment, if Figure 3 As shown, sub-step S1032 also includes sub-steps S1033 to S1035.

[0055] Sub-step S1033: sending a collect dirty page bitmap instruction to each of the hardware acceleration devices respectively, and obtaining first dirty page bitmap information collected by each of the hardware acceleration devices based on the collect dirty page bitmap instruction, where the first dirty page bitmap information is used to represent the changed dirty page information.

[0056] The collect dirty page bitmap instruction is used to instruct the hardware acceleration device to collect a dirty page bitmap of changed dirty page information, and the first dirty page bitmap information is used to represent the changed dirty page information.

[0057] In one embodiment, the hardware acceleration device information is traversed, and a collect dirty page bitmap instruction is sent to each hardware acceleration device respectively. Each hardware acceleration device collects the dirty page bitmap that changes during operation according to the collect dirty page bitmap instruction to obtain the first dirty page bitmap information corresponding to each hardware acceleration device. Each hardware acceleration device sends its first dirty page bitmap information to the source host machine, so that the source host machine obtains the first dirty page bitmap information corresponding to each hardware acceleration device. By sending the collect dirty page bitmap instruction to each hardware acceleration device, the first dirty page bitmap information corresponding to each hardware acceleration device can be accurately received.

[0058] Sub-step S1034: obtaining second dirty page bitmap information of the source virtual machine.

[0059] A dirty page bitmap of dirty page information that changes during the running of the source virtual machine is obtained to obtain second dirty page bitmap information of the source virtual machine.

[0060] Sub-step S1035: acquiring modified target dirty page information according to each of the first dirty page bitmap information and the second dirty page bitmap information, and sending the target dirty page information to the destination host machine.

[0061] The target dirty page information is dirty page information modified during the operation of each hardware acceleration device and the source virtual machine.

[0062] In one embodiment, bitwise OR processing is performed on each of the first dirty page bitmap information and the second dirty page bitmap information to generate target dirty page bitmap information; modified dirty page information is obtained according to the target dirty page bitmap information, and the modified dirty page information is determined as the target dirty page information. By bitwise OR processing is performed on each of the first dirty page bitmap information and the second dirty page bitmap information, the changed target dirty page bitmap information can be accurately obtained, and the changed target dirty page information can be accurately obtained from the storage medium through the target dirty page bitmap information.

[0063] In one embodiment, after obtaining the target dirty page information, the target dirty page information is sent to the destination host machine. The destination host machine modifies the dirty page information of each destination hardware acceleration device and / or destination virtual machine according to the destination host machine to complete the update of the migration data, thereby greatly improving the efficiency and accuracy of virtual machine migration.

[0064] In one embodiment, the number of target dirty page information that has not been migrated to the destination host machine is obtained, and it is determined whether the number of target dirty page information that has not been migrated to the destination host machine is less than or equal to a preset threshold; when the number of target dirty page information that has not been migrated to the destination host machine is less than or equal to the preset threshold, the source virtual machine is controlled to stop running, and the target dirty page information that has not been migrated to the destination host machine is migrated to the destination host machine. Among them, the preset threshold can be set according to actual conditions, and the embodiment of the present invention does not make specific limitations on this. When it is determined that the number of dirty page information that has changed is small, the source virtual machine is shut down so that the source virtual machine and each hardware acceleration device are not working, so that the dirty page information of the source virtual machine will not change, and the target dirty page information that has not been migrated to the destination host machine is migrated to the destination host machine to complete the migration of all dirty page information, so that the migration of virtual machine data can be accurately completed.

[0065] In one embodiment, after the source virtual machine is shut down, a state data acquisition instruction is sent to each hardware acceleration device, the state data sent by each hardware acceleration device based on the state data acquisition instruction is acquired, and each state data is sent to the destination host machine, and the destination host machine sends matching state data to each destination hardware acceleration device according to the hardware acceleration device information. Among them, the type of the state data can be set according to the actual situation, and the embodiment of the present invention does not specifically limit this. For example, the type of the state data includes register data, global variable data, array operation data, etc. By acquiring the state data of each hardware acceleration device and sending the state data to the destination host machine, the migration of the state data can be completed efficiently and accurately.

[0066] In one embodiment, when the migration is completed, the destination host machine controls the operation of each hardware acceleration device and the destination virtual machine according to the state data to complete the migration and operation of the virtual machine, and deletes the source virtual machine.

[0067] For example, Figure 4 As shown, the hardware acceleration device information and configuration parameter information corresponding to the source virtual machine 210 to be migrated from the source host machine 200 are obtained, and the hardware acceleration devices configured in the source virtual machine 210 include the disk acceleration card 220, the network acceleration card A230 and the network acceleration card B240. The destination host machine 300 is determined, and the source host machine 200 sends the hardware acceleration device information and configuration parameter information to the destination host machine 300. The destination host machine 300 creates a destination virtual machine 310 with the same configuration as the source virtual machine 210 according to the configuration parameter information, and configures the destination hardware acceleration device of the destination virtual machine 310 according to the hardware acceleration device information. The destination hardware acceleration device includes a disk acceleration card 320, a network acceleration card A330 and a network acceleration card B340; the source host machine 200 obtains the corresponding first dirty page information of the disk acceleration card 220, the network acceleration card A230 and the network acceleration card B240 and the second dirty page information of the source virtual machine 210, and sends the first dirty page information and the second dirty page information to the destination host machine 300. When the migration is completed, the destination host machine controls the destination virtual machine 310, the disk acceleration card 320, the network acceleration card A330 and the network acceleration card B340 to run to complete the migration of the source virtual machine 210.

[0068] The virtual machine migration method in the above embodiment obtains the hardware acceleration device information and configuration parameter information corresponding to the source virtual machine to be migrated, wherein the hardware acceleration device information includes the device description information of one or more hardware acceleration devices configured by the source virtual machine; determines the destination host machine, and sends the hardware acceleration device information and configuration parameter information to the destination host machine, so that the destination host machine can create a destination virtual machine with the same configuration as the source virtual machine according to the configuration parameter information, and configure the destination hardware acceleration device of the destination virtual machine according to the hardware acceleration device information; obtains the first dirty page information corresponding to each hardware acceleration device and the second dirty page information of the source virtual machine, and migrates the first dirty page information and the second dirty page information to the destination host machine, wherein, when the migration is completed, the destination host machine controls the destination virtual machine and each destination hardware acceleration device to start running. This solution creates a destination virtual machine with the same configuration as the source virtual machine in the destination host machine and configures the destination hardware acceleration device to achieve the creation of the destination virtual machine operating environment, and migrates the first dirty page information corresponding to each hardware acceleration device and the second dirty page information of the source virtual machine to the destination host machine to achieve the migration of virtual machine data, and when the migration is completed, the destination virtual machine and each destination hardware acceleration device start running to efficiently and accurately complete the hot migration of the virtual machine.

[0069] Please refer to Figure 5 , Figure 5 A schematic block diagram of the structure of a virtual machine migration system provided in an embodiment of the present application.

[0070] like Figure 5 As shown, the virtual machine migration system 400 includes a source host machine 410 and a destination host machine 420, wherein:

[0071] The source host machine 410 is used to obtain hardware acceleration device information and configuration parameter information corresponding to the source virtual machine to be migrated, wherein the hardware acceleration device information includes device description information of one or more hardware acceleration devices configured on the source virtual machine;

[0072] The source host machine 410 is further used to determine a destination host machine and send the hardware acceleration device information and configuration parameter information to the destination host machine;

[0073] The destination host machine 420 is used to receive the hardware acceleration device information and configuration parameter information, create a destination virtual machine with the same configuration as the source virtual machine according to the configuration parameter information, and configure the destination hardware acceleration device of the destination virtual machine according to the hardware acceleration device information;

[0074] The source host machine 410 is further used to obtain the first dirty page information corresponding to each of the hardware acceleration devices and the second dirty page information of the source virtual machine, and migrate the first dirty page information and the second dirty page information to the destination host machine;

[0075] The destination host machine 420 is further configured to receive the first dirty page information and the second dirty page information, and control the destination virtual machine and each of the destination hardware acceleration devices to start running when the migration is completed.

[0076] In one embodiment, the source host machine 410 is further used for:

[0077] Obtain device description information of multiple candidate host machines and each hardware acceleration device carried by each of the candidate host machines;

[0078] According to the device description information of the hardware acceleration device configured on the source virtual machine and the device description information of each hardware acceleration device carried by each candidate host machine, a candidate host machine having the device description information of the hardware acceleration device configured on the source virtual machine is determined, and the determined candidate host machine is used as the destination host machine.

[0079] In one embodiment, the source host machine 410 is further used for:

[0080] Sending a dirty page record instruction to each of the hardware acceleration devices respectively, and obtaining first dirty page information collected by each of the hardware acceleration devices based on the dirty page record instruction;

[0081] The second dirty page information of the source virtual machine is obtained, and the first dirty page information and the second dirty page information are migrated to the destination host machine.

[0082] In one embodiment, the source host machine 410 is further used for:

[0083] Sending a dirty page bitmap collection instruction to each of the hardware acceleration devices respectively, and obtaining first dirty page bitmap information collected by each of the hardware acceleration devices based on the dirty page bitmap collection instruction, where the first dirty page bitmap information is used to represent the changed dirty page information;

[0084] Obtaining second dirty page bitmap information of the source virtual machine;

[0085] According to each of the first dirty page bitmap information and the second dirty page bitmap information, the modified target dirty page information is acquired, and the target dirty page information is sent to the destination host machine.

[0086] In one embodiment, the source host machine 410 is further used for:

[0087] Performing bitwise OR processing on each of the first dirty page bitmap information and the second dirty page bitmap information to generate target dirty page bitmap information;

[0088] The modified dirty page information is acquired according to the target dirty page bitmap information, and the modified dirty page information is determined as the target dirty page information.

[0089] In one embodiment, the source host machine 410 is further used for:

[0090] Acquire the amount of the target dirty page information that has not been migrated to the destination host machine, and determine whether the amount of the target dirty page information that has not been migrated to the destination host machine is less than or equal to a preset threshold;

[0091] When the amount of the target dirty page information that has not been migrated to the destination host machine is less than or equal to a preset threshold, the source virtual machine is controlled to stop running, and the target dirty page information that has not been migrated to the destination host machine is migrated to the destination host machine.

[0092] In one embodiment, the source host machine 410 is further used for:

[0093] The status data corresponding to each of the hardware acceleration devices is obtained, and each of the status data is sent to the destination host machine.

[0094] In one embodiment, the source host machine 410 is further used for:

[0095] Obtaining a migration instruction of a source virtual machine to be migrated, and obtaining device description information, name information, and address information of one or more hardware acceleration devices configured for the source virtual machine according to the migration instruction;

[0096] Abstract processing is performed on each of the hardware acceleration devices to generate hardware acceleration devices of the same type;

[0097] The hardware acceleration devices of the same type, the device description information, the name information and the address information of the hardware acceleration devices are merged to generate the hardware acceleration device information.

[0098] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the virtual machine migration system described above can refer to the corresponding process in the aforementioned virtual machine migration method embodiment, and will not be repeated here.

[0099] See also Figure 6 , Figure 6 A schematic block diagram of the structure of a server provided in an embodiment of the present invention.

[0100] like Figure 6As shown, the server 500 includes a processor 501 and a memory 502 , and the processor 501 and the memory 502 are connected via a bus 503 , such as an I2C (Inter-integrated Circuit) bus.

[0101] Specifically, the processor 501 is used to provide computing and control capabilities to support the operation of the entire server. The processor 501 can be a central processing unit (CPU), and the processor 501 can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0102] Specifically, the memory 502 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a mobile hard disk.

[0103] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the server to which the solution of the present invention is applied. The specific server may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0104] The processor is used to run a computer program stored in the memory, and implement any one of the virtual machine migration methods provided by the embodiments of the present invention when executing the computer program.

[0105] In one embodiment, the processor 501 is used to run a computer program stored in a memory, and implements the following steps when executing the computer program:

[0106] Obtaining hardware acceleration device information and configuration parameter information corresponding to the source virtual machine to be migrated, wherein the hardware acceleration device information includes device description information of one or more hardware acceleration devices configured on the source virtual machine;

[0107] Determine a destination host machine, and send the hardware acceleration device information and configuration parameter information to the destination host machine, so that the destination host machine can create a destination virtual machine with the same configuration as the source virtual machine according to the configuration parameter information, and configure a destination hardware acceleration device of the destination virtual machine according to the hardware acceleration device information;

[0108] The first dirty page information corresponding to each of the hardware acceleration devices and the second dirty page information of the source virtual machine are obtained, and the first dirty page information and the second dirty page information are migrated to the destination host machine, wherein, when the migration is completed, the destination host machine controls the destination virtual machine and each of the destination hardware acceleration devices to start running.

[0109] In one embodiment, when implementing the determination of the target host, the processor 501 is used to implement:

[0110] Obtain device description information of multiple candidate host machines and each hardware acceleration device carried by each of the candidate host machines;

[0111] According to the device description information of the hardware acceleration device configured on the source virtual machine and the device description information of each hardware acceleration device carried by each candidate host machine, a candidate host machine having the device description information of the hardware acceleration device configured on the source virtual machine is determined, and the determined candidate host machine is used as the destination host machine.

[0112] In one embodiment, when the processor 501 implements the obtaining of the first dirty page information corresponding to each of the hardware acceleration devices and the second dirty page information of the source virtual machine, and migrating the first dirty page information and the second dirty page information to the destination host machine, it is used to implement:

[0113] Sending a dirty page record instruction to each of the hardware acceleration devices respectively, and obtaining first dirty page information collected by each of the hardware acceleration devices based on the dirty page record instruction;

[0114] The second dirty page information of the source virtual machine is obtained, and the first dirty page information and the second dirty page information are migrated to the destination host machine.

[0115] In one embodiment, after implementing the migration of the first dirty page information and the second dirty page information to the destination host machine, the processor 501 is further configured to implement:

[0116] Sending a dirty page bitmap collection instruction to each of the hardware acceleration devices respectively, and obtaining first dirty page bitmap information collected by each of the hardware acceleration devices based on the dirty page bitmap collection instruction, where the first dirty page bitmap information is used to represent changed dirty page information;

[0117] Obtaining second dirty page bitmap information of the source virtual machine;

[0118] According to each of the first dirty page bitmap information and the second dirty page bitmap information, the modified target dirty page information is acquired, and the target dirty page information is sent to the destination host machine.

[0119] In one embodiment, when the processor 501 implements the acquisition of the modified target dirty page information according to each of the first dirty page bitmap information and the second dirty page bitmap information, it is configured to implement:

[0120] Performing bitwise OR processing on each of the first dirty page bitmap information and the second dirty page bitmap information to generate target dirty page bitmap information;

[0121] The modified dirty page information is acquired according to the target dirty page bitmap information, and the modified dirty page information is determined as the target dirty page information.

[0122] In one embodiment, after the processor 501 determines the modified target dirty page information according to each of the first dirty page bitmap information and the second dirty page bitmap information, and sends the target dirty page information to the destination host machine, it is further configured to implement:

[0123] Acquire the amount of the target dirty page information that has not been migrated to the destination host machine, and determine whether the amount of the target dirty page information that has not been migrated to the destination host machine is less than or equal to a preset threshold;

[0124] When the amount of the target dirty page information that has not been migrated to the destination host machine is less than or equal to a preset threshold, the source virtual machine is controlled to stop running, and the target dirty page information that has not been migrated to the destination host machine is migrated to the destination host machine.

[0125] In one embodiment, after implementing the control of stopping the operation of the source virtual machine, the processor 501 is further configured to implement:

[0126] The status data corresponding to each of the hardware acceleration devices is obtained, and each of the status data is sent to the destination host machine.

[0127] In one embodiment, when the processor 501 implements the acquisition of the hardware acceleration device information corresponding to the source virtual machine to be migrated, it is used to implement:

[0128] Obtaining a migration instruction of a source virtual machine to be migrated, and obtaining device description information, name information, and address information of one or more hardware acceleration devices configured for the source virtual machine according to the migration instruction;

[0129] Abstract processing is performed on each of the hardware acceleration devices to generate hardware acceleration devices of the same type;

[0130] The hardware acceleration devices of the same type, the device description information, the name information and the address information of the hardware acceleration devices are merged to generate the hardware acceleration device information.

[0131] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the server described above can refer to the corresponding process in the aforementioned virtual machine migration method embodiment, and will not be repeated here.

[0132] An embodiment of the present invention also provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any virtual machine migration method provided in the specification of the present invention.

[0133] The storage medium may be an internal storage unit of the server described in the foregoing embodiment, such as a hard disk or memory of the server. The storage medium may also be an external storage device of the server, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the server.

[0134] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0135] It should be understood that the term "and / or" used in the present specification refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.

[0136] The serial numbers of the embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific implementation of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be covered within the protection scope of the present invention.

Claims

1. A virtual machine migration method, characterized in that: include: Obtaining hardware acceleration device information and configuration parameter information corresponding to the source virtual machine to be migrated, wherein the hardware acceleration device information includes device description information of one or more hardware acceleration devices configured on the source virtual machine; Determine a destination host machine, and send the hardware acceleration device information and configuration parameter information to the destination host machine, so that the destination host machine can create a destination virtual machine with the same configuration as the source virtual machine according to the configuration parameter information, and configure a destination hardware acceleration device of the destination virtual machine according to the hardware acceleration device information; The first dirty page information corresponding to each of the hardware acceleration devices and the second dirty page information of the source virtual machine are obtained, and the first dirty page information and the second dirty page information are migrated to the destination host machine, wherein, when the migration is completed, the destination host machine controls the destination virtual machine and each of the destination hardware acceleration devices to start running.

2. The virtual machine migration method according to claim 1, characterized in that: The determining of the destination host machine includes: Obtain device description information of multiple candidate host machines and each hardware acceleration device carried by each of the candidate host machines; According to the device description information of the hardware acceleration device configured on the source virtual machine and the device description information of each hardware acceleration device carried by each candidate host machine, a candidate host machine having the device description information of the hardware acceleration device configured on the source virtual machine is determined, and the determined candidate host machine is used as the destination host machine.

3. The virtual machine migration method according to claim 1, characterized in that: The obtaining first dirty page information corresponding to each of the hardware acceleration devices and second dirty page information of the source virtual machine, and migrating the first dirty page information and the second dirty page information to the destination host machine includes: Sending a dirty page record instruction to each of the hardware acceleration devices respectively, and obtaining first dirty page information collected by each of the hardware acceleration devices based on the dirty page record instruction; The second dirty page information of the source virtual machine is obtained, and the first dirty page information and the second dirty page information are migrated to the destination host machine.

4. The virtual machine migration method according to claim 3, characterized in that: After migrating the first dirty page information and the second dirty page information to the destination host machine, the method further includes: Sending a dirty page bitmap collection instruction to each of the hardware acceleration devices respectively, and obtaining first dirty page bitmap information collected by each of the hardware acceleration devices based on the dirty page bitmap collection instruction, where the first dirty page bitmap information is used to represent the changed dirty page information; Obtaining second dirty page bitmap information of the source virtual machine; According to each of the first dirty page bitmap information and the second dirty page bitmap information, the modified target dirty page information is acquired, and the target dirty page information is sent to the destination host machine.

5. The virtual machine migration method according to claim 4, characterized in that: The acquiring the modified target dirty page information according to each of the first dirty page bitmap information and the second dirty page bitmap information includes: Performing bitwise OR processing on each of the first dirty page bitmap information and the second dirty page bitmap information to generate target dirty page bitmap information; The modified dirty page information is acquired according to the target dirty page bitmap information, and the modified dirty page information is determined as the target dirty page information.

6. The virtual machine migration method according to claim 4, characterized in that: After determining the modified target dirty page information according to the first dirty page bitmap information and the second dirty page bitmap information, and sending the target dirty page information to the destination host machine, the method further includes: Acquire the amount of the target dirty page information that has not been migrated to the destination host machine, and determine whether the amount of the target dirty page information that has not been migrated to the destination host machine is less than or equal to a preset threshold; When the amount of the target dirty page information that has not been migrated to the destination host machine is less than or equal to a preset threshold, the source virtual machine is controlled to stop running, and the target dirty page information that has not been migrated to the destination host machine is migrated to the destination host machine.

7. The virtual machine migration method according to claim 6, characterized in that: After controlling the source virtual machine to stop running, the method further includes: The status data corresponding to each of the hardware acceleration devices is obtained, and each of the status data is sent to the destination host machine.

8. The virtual machine migration method according to claim 1, characterized in that: The obtaining of hardware acceleration device information corresponding to the source virtual machine to be migrated includes: Obtaining a migration instruction of a source virtual machine to be migrated, and obtaining device description information, name information, and address information of one or more hardware acceleration devices configured for the source virtual machine according to the migration instruction; Abstract processing is performed on each of the hardware acceleration devices to generate hardware acceleration devices of the same type; The hardware acceleration devices of the same type, the device description information, the name information and the address information of the hardware acceleration devices are merged to generate the hardware acceleration device information.

9. A virtual machine migration system, characterized in that: The virtual machine migration system includes a source host machine and a destination host machine, wherein: The source host machine is used to obtain hardware acceleration device information and configuration parameter information corresponding to the source virtual machine to be migrated, wherein the hardware acceleration device information includes device description information of one or more hardware acceleration devices configured on the source virtual machine; The source host machine is further used to determine a destination host machine and send the hardware acceleration device information and configuration parameter information to the destination host machine; The destination host machine is used to receive the hardware acceleration device information and configuration parameter information, create a destination virtual machine with the same configuration as the source virtual machine according to the configuration parameter information, and configure a destination hardware acceleration device of the destination virtual machine according to the hardware acceleration device information; The source host machine is further used to obtain first dirty page information corresponding to each of the hardware acceleration devices and second dirty page information of the source virtual machine, and migrate the first dirty page information and the second dirty page information to the destination host machine; The destination host machine is further configured to receive the first dirty page information and the second dirty page information, and control the destination virtual machine and each of the destination hardware acceleration devices to start running when the migration is completed.

10. A server, characterized in that: The server includes a processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the steps of the virtual machine migration method according to any one of claims 1 to 8 are implemented.

11. A storage medium for computer-readable storage, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the virtual machine migration method according to any one of claims 1 to 8.