Thermal migration task execution method and device, computer equipment, readable storage medium and program product
By obtaining the thermal migration request and target attribute information, determining the thermal migration speed, and selecting the appropriate network as the thermal migration network according to the network conditions of the cloud platform, the problem of low thermal migration efficiency in the existing technology is solved, and more efficient and stable thermal migration task execution is achieved.
Patent Information
- Application Number
- CN202411885576.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-05-02
AI Technical Summary
In the prior art, the stability and success rate of thermal migration tasks are low, resulting in poor thermal migration efficiency.
By obtaining hot migration requests and target attribute information, determine the hot migration speed, and when there is a storage network in the target cloud platform, it is used as a hot migration network, or use the management network when there is no storage network to perform hot migration tasks.
It improves the efficiency of hot migration tasks, enhances the stability and success rate of tasks, and avoids complex network traffic problems caused by the use of management networks.
Smart Images

Figure CN119917211A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of hot migration technology, and in particular to a hot migration task execution method, device, computer equipment, computer-readable storage medium and computer program product. Background Art
[0002] Hot migration refers to moving a virtual machine from one host machine to another while ensuring that the services hosted on the virtual machine are running normally.
[0003] In the prior art, when performing hot migration, the management network in the cloud platform is usually used as the data transmission network for hot migration by default.
[0004] However, this method of using the management network as the data transmission network for hot migration by default makes the stability and success rate of the hot migration task low, which in turn leads to poor efficiency of hot migration. Summary of the invention
[0005] Based on this, it is necessary to provide a hot migration task execution method, device, computer equipment, computer readable storage medium and computer program product that can improve the hot migration efficiency in response to the above technical problems.
[0006] In a first aspect, the present application provides a method for executing a hot migration task, comprising:
[0007] Obtaining a hot migration request, the hot migration request carrying a hot migration task indicating to migrate a target virtual machine in a first host device to a second host device, wherein both the first host device and the second host device belong to host devices in a target cloud platform;
[0008] Acquire target attribute information, the target attribute information including attribute information of the first host device and attribute information of the second host device, and determine a hot migration speed according to the target attribute information and a data volume of the target virtual machine;
[0009] When the network information of the target cloud platform indicates that the target cloud platform has a storage network, the storage network is determined as the hot migration network of the target cloud platform, and the hot migration task is performed based on the hot migration speed by using the hot migration network.
[0010] In one embodiment, the method further includes: determining the hot migration speed according to the target attribute information and the data volume of the target virtual machine includes:
[0011] Determining a maximum thermal migration rate according to the target attribute information;
[0012] When the data volume of the target virtual machine is greater than or equal to a preset data volume threshold, determining the maximum hot migration speed as the hot migration speed;
[0013] When the data volume of the target virtual machine is less than the preset data volume threshold, the maximum hot migration speed is adjusted and the maximum hot migration speed after the adjustment is determined as the hot migration speed, and the maximum hot migration speed is greater than the maximum hot migration speed after the adjustment.
[0014] In one embodiment, the method further includes: the target attribute information includes network card information and CPU information, and determining the maximum hot migration speed according to the target attribute information includes:
[0015] Determining a candidate hot migration speed according to the network card information;
[0016] In a case where the CPU information indicates that there is no safety limit on the thermal migration speed, determining the candidate thermal migration speed as the maximum thermal migration speed;
[0017] In the case where the CPU information indicates that there is a safety limit on the hot migration speed, it is determined whether the candidate hot migration speed is greater than the safe hot migration speed indicated by the safety limit, and the maximum hot migration speed is determined according to the determination result.
[0018] In one embodiment, the method further includes: determining the maximum thermal migration speed according to the determination result, including:
[0019] In a case where the determination result indicates that the candidate thermal migration speed is greater than the safe thermal migration speed, determining the safe thermal migration speed as the maximum thermal migration speed;
[0020] In a case where the determination result indicates that the candidate thermal migration speed is less than the safe thermal migration speed, the candidate thermal migration speed is determined as the maximum thermal migration speed.
[0021] In one embodiment, the method further comprises:
[0022] When the network information of the target cloud platform indicates that the target cloud platform does not have a storage network, the management network in the target cloud platform is determined as the hot migration network, and the hot migration task is performed based on the hot migration speed by using the hot migration network.
[0023] In one embodiment, the method further comprises:
[0024] When the bandwidth information of the hot migration network of the target cloud platform changes, obtaining target bandwidth information of the hot migration network after the change;
[0025] The concurrent task information of the target cloud platform is updated according to the target bandwidth information, where the concurrent task information is used to indicate the number of hot migration tasks that can be executed in parallel by the target cloud platform.
[0026] In a second aspect, the present application further provides a hot migration task execution device, comprising:
[0027] an acquisition module, configured to acquire a hot migration request, wherein the hot migration request carries a hot migration task indicating to migrate a target virtual machine in a first host device to a second host device, wherein both the first host device and the second host device belong to host devices in a target cloud platform;
[0028] a determination module, configured to obtain target attribute information, the target attribute information including attribute information of the first host device and attribute information of the second host device, and determine a hot migration speed according to the target attribute information and a data volume of the target virtual machine;
[0029] An execution module is used to determine the storage network as the hot migration network of the target cloud platform when the network information of the target cloud platform indicates that the target cloud platform has a storage network, and use the hot migration network to perform the hot migration task based on the hot migration speed.
[0030] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0031] Obtaining a hot migration request, the hot migration request carrying a hot migration task indicating to migrate a target virtual machine in a first host device to a second host device, wherein both the first host device and the second host device belong to host devices in a target cloud platform;
[0032] Acquire target attribute information, the target attribute information including attribute information of the first host device and attribute information of the second host device, and determine a hot migration speed according to the target attribute information and a data volume of the target virtual machine;
[0033] When the network information of the target cloud platform indicates that the target cloud platform has a storage network, the storage network is determined as the hot migration network of the target cloud platform, and the hot migration task is performed based on the hot migration speed by using the hot migration network.
[0034] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0035] Obtaining a hot migration request, the hot migration request carrying a hot migration task indicating to migrate a target virtual machine in a first host device to a second host device, wherein both the first host device and the second host device belong to host devices in a target cloud platform;
[0036] Acquire target attribute information, the target attribute information including attribute information of the first host device and attribute information of the second host device, and determine a hot migration speed according to the target attribute information and a data volume of the target virtual machine;
[0037] When the network information of the target cloud platform indicates that the target cloud platform has a storage network, the storage network is determined as the hot migration network of the target cloud platform, and the hot migration task is performed based on the hot migration speed by using the hot migration network.
[0038] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0039] Obtaining a hot migration request, the hot migration request carrying a hot migration task indicating to migrate a target virtual machine in a first host device to a second host device, wherein both the first host device and the second host device belong to host devices in a target cloud platform;
[0040] Acquire target attribute information, the target attribute information including attribute information of the first host device and attribute information of the second host device, and determine a hot migration speed according to the target attribute information and a data volume of the target virtual machine;
[0041] When the network information of the target cloud platform indicates that the target cloud platform has a storage network, the storage network is determined as the hot migration network of the target cloud platform, and the hot migration task is performed based on the hot migration speed by using the hot migration network.
[0042] The above-mentioned hot migration task execution method, device, computer equipment, computer-readable storage medium and computer program product first obtain a hot migration request, which carries a hot migration task indicating that a target virtual machine in a first host device is migrated to a second host device, and both the first host device and the second host device belong to host devices in a target cloud platform; then obtain target attribute information, which includes attribute information of the first host device and attribute information of the second host device, and then determine the hot migration speed according to the target attribute information and the data volume of the target virtual machine. When determining the hot migration network, it is possible to first determine whether the target platform has a storage network according to the network information of the target cloud platform. If so, the storage network is determined as the hot migration network of the target cloud platform, and the hot migration task is executed based on the hot migration speed using the hot migration network, thereby avoiding the default use of the management network as the hot migration network in the prior art. Since the management network needs to assume multiple management functions, its network traffic is relatively complex, resulting in the hot migration task executed using the management network having low stability and success rate problems, thereby effectively improving the efficiency of hot migration. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 A schematic diagram of a process of executing a hot migration task in an embodiment;
[0045] Figure 2 This is a schematic diagram of the structure of a target cloud platform in an embodiment;
[0046] Figure 3 A schematic diagram of the time consumption of thermal migration in one embodiment;
[0047] Figure 4 A schematic diagram of a process for determining a thermal migration rate in one embodiment;
[0048] Figure 5 A schematic diagram of a process for determining a maximum thermal migration rate in one embodiment;
[0049] Figure 6 A schematic diagram of a process for determining a maximum thermal migration rate in another embodiment;
[0050] Figure 7 A schematic diagram of a flow chart of a method for executing a hot migration task in another embodiment;
[0051] Figure 8 A structural block diagram of a hot migration task execution device according to an embodiment;
[0052] Fig. 9 A structural block diagram of a hot migration task execution device according to another embodiment;
[0053] Fig.10 A structural block diagram of a hot migration task execution device according to another embodiment;
[0054] Fig.11 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0056] In an exemplary embodiment, Figure 1 As shown, a method for executing a hot migration task is provided. This embodiment uses the method applied to a target cloud platform as an example. The target cloud platform is composed of computer equipment. Specifically, the target cloud platform can be composed of multiple servers or a terminal and a server. It can be understood that when the target cloud platform is composed of multiple servers or a terminal and a server, the method is implemented through the interaction of multiple servers or the interaction of a terminal and a server. In this embodiment, the method includes the following steps:
[0057] S201, obtaining a hot migration request, the hot migration request carrying a hot migration task indicating to migrate a target virtual machine in a first host device to a second host device, the first host device and the second host device both being host devices in a target cloud platform.
[0058] Among them, hot migration is also called online migration, which can migrate the target virtual machine between different host devices under the premise of ensuring the normal operation of the services carried by the target virtual machine. Hot migration can be a dynamic migration that copies both the hard disk storage and memory of the target virtual machine, or it can be a dynamic migration that only copies the memory image of the target virtual machine. The target cloud platform is also called a cloud computing platform, which refers to a platform that can provide users with computing, network and storage services based on hardware resources and software resources.
[0059] Optionally, in this embodiment, the hot migration request can be triggered by the user. When the user has a need to migrate the virtual machine in the target cloud platform from one host device to another host device in a hot migration manner, the hot migration request can be triggered. The virtual machine to be migrated is the target virtual machine in the hot migration task carried by the hot migration request, the host device where the virtual machine to be migrated is currently located is the first host device in the hot migration task carried by the hot migration request, and the host device to which the virtual machine to be migrated is to be migrated is the second host device in the hot migration task carried by the hot migration request.
[0060] S202 , obtaining target attribute information, where the target attribute information includes attribute information of the first host device and attribute information of the second host device, and determining a hot migration speed according to the target attribute information and a data volume of the target virtual machine.
[0061] The attribute information of the first host device refers to information that can be used to describe the performance, configuration and usage of the first host device, and the attribute information of the second host device refers to information that can be used to describe the performance, configuration and usage of the second host device. The hot migration speed, also known as the hot migration bandwidth speed, refers to the rate at which the data of the target virtual machine is transmitted between the first host device and the second host device during the hot migration process.
[0062] Optionally, in this embodiment, after obtaining the hot migration request, the target attribute information can be determined according to the hot migration task carried by the hot migration request. As an optional implementation, since the hot migration request carries the hot migration task, and the hot migration task is used to indicate that the target virtual machine in the first host device is migrated to the second host device, the first host device, the second host device, and the target virtual machine can be determined according to the hot migration task. After determining the first host device, the second host device, and the target virtual machine, the attribute information of the first host device and the attribute information of the second host device can be obtained, and the attribute information of the first host device and the attribute information of the second host device can be determined as the target attribute information, and the data volume of the target virtual machine can be obtained.
[0063] It should be noted that, since the data of the target virtual machine in the first host device needs to be migrated to the second host device during hot migration, the hot migration speed during hot migration, that is, the hot migration speed, can be determined based on the target attribute information and the data volume of the target virtual machine. In this embodiment, as an optional implementation, the target attribute information and the data volume can be directly input into a pre-trained hot migration speed determination model to obtain the hot migration speed output by the hot migration speed determination model. The hot migration speed of the hot migration process can also be determined based on the target attribute information, and then the time consumed by the hot migration can be determined based on the data volume and the hot migration speed. It can be determined whether to adjust the hot migration speed based on the consumed time. If adjustment is required, the adjusted hot migration speed is determined as the hot migration speed actually used in the hot migration process. If no adjustment is required, the hot migration speed is directly determined.
[0064] S203, when the network information of the target cloud platform indicates that the target cloud platform has a storage network, determine the storage network as the hot migration network of the target cloud platform, and use the hot migration network to perform the hot migration task based on the hot migration speed.
[0065] The network information of the target cloud platform is also the network card network information, which refers to information used to characterize the network contained in the target cloud platform. The storage network refers to a network used to store, read and transmit data in the target cloud platform. The hot migration network refers to the network used to transmit the data of the target virtual machine during the hot migration process.
[0066] Optionally, in this embodiment, the network information of the target cloud platform generated when the target cloud platform is initialized can be first obtained from the database of the target cloud platform, and it can be determined whether there is a storage network in the target cloud platform based on the network information. As an optional implementation method, if there is a storage network in the target cloud platform, the storage network is determined as the hot migration network of the target cloud platform, and the hot migration task is performed at the hot migration speed using the hot migration network, that is, the data of the target virtual machine is transmitted at the hot migration speed through the storage network.
[0067] The above-mentioned hot migration task execution method, device, computer equipment, computer-readable storage medium and computer program product first obtain a hot migration request, in which the hot migration request carries a hot migration task indicating that the target virtual machine in the first host device is migrated to the second host device, and the first host device and the second host device both belong to host devices in the target cloud platform; then obtain target attribute information, the target attribute information includes attribute information of the first host device and attribute information of the second host device, and then determine the hot migration speed according to the target attribute information and the data volume of the target virtual machine. When determining the hot migration network, it is possible to first determine whether the target platform has a storage network according to the network information of the target cloud platform. If so, the storage network is determined as the hot migration network of the target cloud platform, and the hot migration task is executed based on the hot migration speed using the hot migration network, thereby avoiding the default use of the management network as the hot migration network in the prior art. Since the management network needs to assume multiple management functions, its network traffic is relatively complex, resulting in the hot migration task executed using the management network having low stability and success rate problems, thereby effectively improving the efficiency of hot migration.
[0068] In some scenarios, in addition to the situation where the target cloud platform has a storage network, there may also be a situation where the target cloud platform does not have a storage network. In this embodiment, the situation where the network information of the target cloud platform indicates that the target cloud platform does not have a storage network is explained in detail. In an exemplary embodiment, the above method also includes:
[0069] Step A: When the network information of the target cloud platform indicates that the target cloud platform does not have a storage network, the management network in the target cloud platform is determined as a hot migration network, and the hot migration task is performed based on the hot migration speed using the hot migration network.
[0070] Among them, the management network refers to a network used to implement management functions in the target cloud platform. Optionally, in this embodiment, after obtaining the network information of the target cloud platform, if the target cloud platform determined according to the network information of the target cloud platform does not have a storage network, the management network in the target cloud platform is determined as a hot migration network, and the hot migration network is used to perform the hot migration task at the hot migration speed, that is, the data of the target virtual machine is transmitted at the hot migration speed through the management network.
[0071] It should be noted that there are also business networks in the target cloud platform, such as Figure 2 As shown, Figure 2A first host device and a second host device in a target cloud platform are shown. The first host device is taken as an example for explanation. In the first host device, there are two virtual machines (VMs), of which the virtual machine to be migrated to the second host device is the target virtual machine. The first host device also includes a management network card, a business network card and a storage network card. The management network card is a network interface for connecting to a management network in the target cloud platform, the business network card is a network interface for connecting to a business network in the target cloud platform, and the storage network card is a network interface for connecting to a storage network in the target cloud platform. Figure 2 The case shown is where a storage network exists on the target cloud platform. When performing a hot migration task for the target virtual machine, the data of the target virtual machine can be transmitted through the storage network. If a storage network does not exist on the target cloud platform, the data of the target virtual machine is transmitted directly through the management network.
[0072] Furthermore, the hot migration time of the target virtual machine with the same computing specification in different hot migration networks is different, which can be seen as follows: Figure 3 As shown, in Figure 3 The figure shows the hot migration time of the target virtual machine with the same computing specifications in the management network and storage network. Figure 3 It can be seen that the hot migration of the target virtual machine of the same computing specification takes longer time under the management network, and takes shorter time under the storage network. The management network can be a Gigabit management network, and the storage network can be a 10 Gigabit storage network.
[0073] In this embodiment, when the network information of the target cloud platform indicates that the target cloud platform does not have a storage network, the management network in the target cloud platform is determined as the hot migration network, and the hot migration task is performed based on the hot migration speed using the hot migration network. When the target cloud platform does not have a storage network, the management network is also used to perform the hot migration task, thereby avoiding the problem of being unable to perform the hot migration task when the target cloud platform does not have a storage network, thereby improving the success rate of the hot migration task.
[0074] In this embodiment, the specific implementation process of determining the hot migration speed according to the target attribute information and the data volume of the target virtual machine will be described in detail. Figure 4 As shown, the above S202 includes:
[0075] S301, determining a maximum thermal migration speed according to target attribute information.
[0076] The maximum thermal migration rate refers to the maximum value of the thermal migration rate.
[0077] Optionally, in this embodiment, since hot migration is to migrate the target virtual machine from the first host device to the second host device, and the target attribute information is a type of information that can be used to describe the performance, configuration, and usage of the first host device and the second host device, the maximum migration speed of the hot migration can be determined according to the target attribute information. As an optional implementation, the target attribute information can be input into a pre-trained maximum hot migration speed determination model to obtain the maximum hot migration speed output by the maximum hot migration speed determination model.
[0078] S302: When the data volume of the target virtual machine is greater than or equal to a preset data volume threshold, determine the maximum hot migration speed as the hot migration speed.
[0079] Among them, the preset data volume threshold can be pre-set by technical personnel according to actual needs.
[0080] Optionally, in this embodiment, since other services are running in the first host device and the second host device during the hot migration process, if the maximum hot migration speed is directly used as the hot migration speed, it may cause an impact on other services. Therefore, the appropriate hot migration speed can be determined according to the data volume of the target virtual machine. As an optional implementation method, after determining the maximum hot migration speed of the hot migration according to the target attribute information, it can be determined whether the data volume of the target virtual machine is greater than or equal to the preset data volume threshold. If the data volume of the target virtual machine is greater than or equal to the preset data volume threshold, it can be determined that the amount of data required to be transmitted by the target virtual machine is large, and the time required for hot migration is long. If the maximum hot migration speed is not used, the target virtual machine may be suspended for too long. Therefore, the maximum hot migration speed can be determined as the hot migration speed to shorten the time required for hot migration. Although the service may still need to be temporarily suspended during the hot migration process, the time of suspension of service can be controlled within a relatively short range to minimize the impact on the business.
[0081] S303, when the data volume of the target virtual machine is less than the preset data volume threshold, the maximum hot migration speed is adjusted, and the adjusted maximum hot migration speed is determined as the hot migration speed, and the maximum hot migration speed is greater than the adjusted maximum hot migration speed.
[0082] In this embodiment, as an optional implementation, if the data volume of the target virtual machine is less than the preset data volume threshold, it can be determined that the data volume required to be transmitted by the target virtual machine is small, and the time required for hot migration is short. Therefore, the maximum hot migration speed can be adjusted to reduce the maximum hot migration speed to obtain the hot migration speed, while ensuring that the hot migration task can be completed, while reducing the impact on other services. As an optional implementation, the maximum hot migration speed after adjustment can be half of the maximum hot migration speed.
[0083] In this embodiment, the maximum hot migration speed is determined based on the target attribute information; when the data volume of the target virtual machine is greater than or equal to the preset data volume threshold, the maximum hot migration speed is determined as the hot migration speed; when the data volume of the target virtual machine is less than the preset data volume threshold, the maximum hot migration speed is adjusted and the maximum hot migration speed after the adjustment is determined as the hot migration speed. The maximum hot migration speed is greater than the maximum hot migration speed after the adjustment. The most suitable hot migration speed is determined based on the data volume of the target virtual machine. While ensuring the completion of the hot migration task, the impact on other services of the first host device and the second host device is reduced, thereby effectively improving the success rate and stability of the hot migration task.
[0084] In this embodiment, the specific implementation process of determining the maximum hot migration speed according to the target attribute information is described in detail. The target attribute information may include network card information and CPU information. Figure 5 As shown, the above S301 includes:
[0085] S401, determining a candidate hot migration speed according to network card information.
[0086] The network card information may be used to indicate the network performance of the first host device and the second host device. The CPU information may be used to indicate the performance and model of the CPU of the first host device and the second host device.
[0087] Optionally, in this embodiment, since the network card information can be used to indicate the network performance of the first host device and the second host device, the candidate hot migration speed can be determined based on the network card information. As an optional implementation, the data transmission rate of the first host device and the second host device can be determined based on the network card information, and the data transmission rate can be determined as the candidate hot migration speed. Since the second host device is used to receive data of the target virtual machine, the candidate hot migration speed can be determined based on the network card information of the second host device. As an optional implementation, the data transmission rate of the second host device can be determined as the candidate hot migration speed.
[0088] S402: When the CPU information indicates that there is no safety limit on the hot migration speed, determine the candidate hot migration speed as the maximum hot migration speed.
[0089] In this embodiment, since some models of CPUs have security restrictions on the data transmission rate of the host device, that is, there are security restrictions on the thermal migration speed, the maximum thermal migration speed can be determined based on the CPU information of the first host device and the second host device. As an optional implementation method, it can be determined based on the CPU information whether there are security restrictions on the CPUs of the first host device and the second host device. If not, the candidate thermal migration speed can be directly determined as the maximum thermal migration speed.
[0090] S403, when the CPU information indicates that there is a safety limit on the hot migration speed, determine whether the candidate hot migration speed is greater than the safe hot migration speed indicated by the safety limit, and determine the maximum hot migration speed according to the determination result.
[0091] In this embodiment, since some CPUs have safety restrictions on the hot migration speed, for example, the Haiguang C86 CPU has hardware-level restrictions on the hot migration function, which makes it have safety restrictions on the hot migration speed. Therefore, the maximum hot migration speed can be determined according to the safety restrictions. As an optional implementation method, the safe hot migration speed indicated by the safety restrictions can be determined first, and the maximum hot migration speed can be determined based on the safe hot migration speed and the candidate hot migration speeds.
[0092] In this embodiment, a candidate hot migration speed is determined based on the network card information; when the CPU information indicates that there is no safety restriction on the hot migration speed, the candidate hot migration speed is determined as the maximum hot migration speed; when the CPU information indicates that there is a safety restriction on the hot migration speed, it is determined whether the candidate hot migration speed is greater than the safe hot migration speed indicated by the safety restriction, and the maximum hot migration speed is determined based on the determination result. It is determined through the CPU information whether the CPUs of the first host device and the second host device have safety restrictions on hot migration to improve the accuracy of the determined maximum hot migration speed.
[0093] In this embodiment, the specific implementation process of determining the maximum thermal migration speed according to the determination result will be described in detail. Figure 6 As shown, the above S403 includes:
[0094] S501 , when the determination result indicates that the candidate thermal migration speed is greater than the safe thermal migration speed, determine the safe thermal migration speed as the maximum thermal migration speed.
[0095] In this embodiment, since the CPU information indicates that the CPUs of the first host device and the second host device have safety restrictions on the thermal migration speed, the candidate thermal migration speed cannot be directly determined as the maximum thermal migration speed, and the maximum thermal migration speed needs to be determined based on the safe thermal migration speed indicated by the safety restrictions and the candidate thermal migration speed. As an optional implementation, the safe thermal migration speed and the candidate thermal migration speed can be compared. When the candidate thermal migration speed is greater than the safe thermal migration speed, the safe thermal migration speed can be determined as the maximum thermal migration speed.
[0096] S502: When the determination result indicates that the candidate thermal migration speed is less than the safe thermal migration speed, determine the candidate thermal migration speed as the maximum thermal migration speed.
[0097] Optionally, in this embodiment, when the candidate thermal migration speed is less than the safe thermal migration speed, it can be determined that the candidate thermal migration speed meets the safety limit, and the maximum thermal migration speed can be determined based on the candidate thermal migration speed. As an optional implementation, the candidate thermal migration speed can be directly determined as the maximum thermal migration speed.
[0098] In this embodiment, when the determination result indicates that the candidate thermal migration speed is greater than the safe thermal migration speed, the safe thermal migration speed is determined as the maximum thermal migration speed. When the determination result indicates that the candidate thermal migration speed is less than the safe thermal migration speed, the candidate thermal migration speed is determined as the maximum thermal migration speed. The maximum thermal migration speed is determined by comparing the safe thermal migration speed with the candidate thermal migration speed, thereby improving the accuracy of the determined maximum thermal migration speed.
[0099] This embodiment will explain in detail the situation where the bandwidth information of the hot migration network on the target cloud platform changes. In an exemplary embodiment, Figure 7 As shown, the above method also includes:
[0100] S601, when the bandwidth information of the hot migration network of the target cloud platform changes, obtain the target bandwidth information after the hot migration network changes.
[0101] The bandwidth information may be used to indicate a maximum data transmission rate of the hot migration network.
[0102] Optionally, in this embodiment, when the network card device or network link of the hot migration network changes, it may cause the bandwidth information of the hot migration network to change. As an optional implementation method, when the bandwidth information of the hot migration network of the target cloud platform changes, that is, when the maximum data transmission rate of the hot migration network changes, the target bandwidth information after the hot migration network changes can be obtained.
[0103] S602: Update concurrent task information of the target cloud platform according to the target bandwidth information. The concurrent task information is used to indicate the number of hot migration tasks that can be executed in parallel on the target cloud platform.
[0104] Optionally, in this embodiment, when the target cloud platform is initialized, the concurrent task information can be determined according to the bandwidth information of the hot migration network of the target cloud platform, that is, the number of hot migration tasks that can be executed in parallel by the target cloud platform. When the bandwidth information of the hot migration network of the target cloud platform changes, that is, when the maximum data transmission rate of the hot migration network changes, the concurrent task information of the target cloud platform can be updated according to the changed target bandwidth information. As an optional implementation method, if the target bandwidth information is greater than the bandwidth information, the update processing may be an increase processing, that is, increasing the number of hot migration tasks that can be executed in parallel by the target cloud platform. If the target bandwidth information is less than the bandwidth information, the update processing may be a decrease processing, that is, reducing the number of hot migration tasks that can be executed in parallel by the target cloud platform.
[0105] In this embodiment, when the bandwidth information of the hot migration network of the target cloud platform changes, the target bandwidth information after the change of the hot migration network is obtained, and the concurrent task information of the target cloud platform is updated according to the target bandwidth information. Through the change of the bandwidth information of the hot migration network, the number of hot migration tasks that can be executed in parallel on the target cloud platform is adjusted to improve the execution efficiency of the hot migration tasks of the target cloud platform.
[0106] In an optional embodiment of the present application, after obtaining the hot migration request, the method further includes: determining whether the second host device meets the hot migration conditions of the hot migration task, and if so, executing the step of obtaining target attribute information, otherwise, rejecting the hot migration request.
[0107] In this embodiment, since the second host device needs to receive the data of the target virtual machine, it is necessary to determine whether it meets the hot migration conditions of the hot migration task. As an optional implementation method, the CPU architecture, model, memory information and storage pool information of the second host device can be obtained first, and based on this information, it is determined whether the destination host device meets the hot migration conditions of the hot migration task, that is, whether the model architecture of the second host device matches and whether there is excess space to store the target virtual machine. This is because hot migration only supports homogeneous hot migration.
[0108] In this embodiment, after obtaining the hot migration request, it is determined whether the second host device meets the hot migration conditions of the hot migration task. If so, the step of obtaining target attribute information is executed; otherwise, the hot migration request is rejected, which can effectively improve the success rate of the hot migration task.
[0109] In an optional embodiment of the present application, the method further includes: determining the concurrent task threshold of each host device according to the network card information, bandwidth information and CPU information of each host device in the target cloud platform, and the concurrent task threshold is used to indicate the number of hot migration tasks that can be executed simultaneously by each host device, so as to improve the success rate and stability of the hot migration task. As shown in Table 1, Table 1 shows some CPUs with safety restrictions and the concurrent task thresholds of the host devices containing these CPUs, and Table 1 includes the concurrent task threshold and the corresponding safe hot migration speed.
[0110] Table 1
[0111]
[0112] In an optional embodiment of the present application, after obtaining the target attribute information, the method further includes: obtaining the first processor architecture of the target virtual machine and the second processor architecture of the second host device, and if the first processor architecture and the second processor architecture are the same, the hot migration network step can be determined, and if they are not the same, the hot migration request is rejected. It should be noted that the above method is applicable to the case where the target virtual machine has a 32-bit processor architecture.
[0113] In an optional embodiment of the present application, in addition to the above-mentioned method for improving the stability and success rate of the hot migration task, the method provided by the present application also sets relevant constraints during the execution of the hot migration task. For example, during the migration process, operations such as life cycle and hardware device management cannot be performed on the target virtual machine; power supply to the first host device and the second host device is ensured to avoid accidental power off or restart of the first host device and the second host device.
[0114] To facilitate understanding by those skilled in the art, the following is a detailed introduction to the hot migration task execution method provided by the present application. The method may include:
[0115] S1. Obtain a hot migration request, where the hot migration request carries a hot migration task indicating to migrate a target virtual machine in a first host device to a second host device, where both the first host device and the second host device are host devices in a target cloud platform.
[0116] S2, obtaining target attribute information, the target attribute information including attribute information of the first host device and attribute information of the second host device, the target attribute information including network card information and CPU information.
[0117] S3, determining a candidate hot migration speed according to the network card information.
[0118] S4: When the CPU information indicates that there is no safety limit on the hot migration speed, determine the candidate hot migration speed as the maximum hot migration speed.
[0119] S5: When the CPU information indicates that there is a safety limit on the hot migration speed, determine whether the candidate hot migration speed is greater than the safe hot migration speed indicated by the safety limit.
[0120] S6, when the determination result indicates that the candidate thermal migration speed is greater than the safe thermal migration speed, determining the safe thermal migration speed as the maximum thermal migration speed.
[0121] S7 , when the determination result indicates that the candidate thermal migration speed is less than the safe thermal migration speed, determining the candidate thermal migration speed as the maximum thermal migration speed.
[0122] S8. When the data volume of the target virtual machine is greater than or equal to a preset data volume threshold, determine the maximum hot migration speed as the hot migration speed.
[0123] S9, when the data volume of the target virtual machine is less than the preset data volume threshold, the maximum hot migration speed is adjusted, and the adjusted maximum hot migration speed is determined as the hot migration speed, and the maximum hot migration speed is greater than the adjusted maximum hot migration speed.
[0124] S10, when the network information of the target cloud platform indicates that the target cloud platform has a storage network, determine the storage network as the hot migration network of the target cloud platform, and use the hot migration network to perform the hot migration task based on the hot migration speed.
[0125] S11, when the network information of the target cloud platform indicates that the target cloud platform does not have a storage network, determine the management network in the target cloud platform as a hot migration network, and use the hot migration network to perform a hot migration task based on a hot migration speed.
[0126] It should be noted that for the descriptions in the above S1-S11, reference may be made to the relevant descriptions in the above embodiments, and the effects are similar, so this embodiment will not be repeated here.
[0127] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0128] Based on the same inventive concept, the embodiment of the present application also provides a hot migration task execution device for implementing the hot migration task execution method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more hot migration task execution device embodiments provided below can refer to the limitations of the hot migration task execution method above, and will not be repeated here.
[0129] In an exemplary embodiment, Figure 8 As shown, a hot migration task execution device is provided, including: an acquisition module 80, a determination module 81 and an execution module 82, wherein:
[0130] An acquisition module 80 is used to acquire a hot migration request, where the hot migration request carries a hot migration task indicating to migrate a target virtual machine in a first host device to a second host device, where both the first host device and the second host device belong to host devices in a target cloud platform;
[0131] A determination module 81 is used to obtain target attribute information, the target attribute information including attribute information of the first host device and attribute information of the second host device, and determine the hot migration speed according to the target attribute information and the data volume of the target virtual machine;
[0132] The execution module 82 is used to determine the storage network as the hot migration network of the target cloud platform when the network information of the target cloud platform indicates that the target cloud platform has a storage network, and use the hot migration network to perform the hot migration task based on the hot migration speed.
[0133] In one embodiment, please continue to see Figure 8 The above-mentioned execution unit 82 is also used to determine the management network in the target cloud platform as the hot migration network when the network information of the target cloud platform indicates that the target cloud platform does not have a storage network, and use the hot migration network to perform the hot migration task based on the hot migration speed.
[0134] In one embodiment, Fig. 9 As shown, the above-mentioned determination module 81 includes: a first determination unit 811, a second determination unit 812 and a third determination unit 813, wherein:
[0135] A first determining unit 811 is used to determine a maximum thermal migration speed according to the target attribute information;
[0136] A second determining unit 812 is configured to determine the maximum hot migration speed as the hot migration speed when the data volume of the target virtual machine is greater than or equal to a preset data volume threshold;
[0137] The third determination unit 813 is used to adjust the maximum hot migration speed when the data volume of the target virtual machine is less than the preset data volume threshold, and determine the maximum hot migration speed after the adjustment as the hot migration speed, and the maximum hot migration speed is greater than the maximum hot migration speed after the adjustment.
[0138] In one embodiment, please continue to see Fig. 9 The first determination unit 811 is specifically used to determine a candidate hot migration speed according to the network card information; when the CPU information indicates that there is no safety limit on the hot migration speed, determine the candidate hot migration speed as the maximum hot migration speed; when the CPU information indicates that there is a safety limit on the hot migration speed, determine whether the candidate hot migration speed is greater than the safety hot migration speed indicated by the safety limit, and determine the maximum hot migration speed according to the determination result.
[0139] In one embodiment, please continue to see Fig. 9 The above-mentioned first determination unit 811 is also specifically used to determine the safe thermal migration speed as the maximum thermal migration speed when the determination result indicates that the candidate thermal migration speed is greater than the safe thermal migration speed; and to determine the candidate thermal migration speed as the maximum thermal migration speed when the determination result indicates that the candidate thermal migration speed is less than the safe thermal migration speed.
[0140] The hot migration task execution device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0141] In one embodiment, Fig.10 As shown, the above device also includes: a bandwidth information acquisition module 83 and an update module 84, wherein:
[0142] The bandwidth information acquisition module 83 is used to acquire the target bandwidth information of the hot migration network after the change when the bandwidth information of the hot migration network of the target cloud platform changes;
[0143] The updating module 84 is used to update the concurrent task information of the target cloud platform according to the target bandwidth information, wherein the concurrent task information is used to indicate the number of hot migration tasks that can be executed in parallel by the target cloud platform.
[0144] The hot migration task execution device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0145] Each module in the above-mentioned hot migration task execution device can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0146] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.11 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store target attribute information and network information. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a hot migration task execution method is implemented.
[0147] Those skilled in the art will understand that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0148] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps of the method described in any of the above embodiments are implemented.
[0149] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in any of the above embodiments are implemented.
[0150] In one embodiment, a computer program product is provided, including a computer program, which implements the steps of the method described in any of the above embodiments when executed by a processor.
[0151] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0152] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0153] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for executing a hot migration task, characterized in that: The method comprises: Obtaining a hot migration request, the hot migration request carrying a hot migration task indicating to migrate a target virtual machine in a first host device to a second host device, wherein both the first host device and the second host device belong to host devices in a target cloud platform; Acquire target attribute information, the target attribute information including attribute information of the first host device and attribute information of the second host device, and determine a hot migration speed according to the target attribute information and a data volume of the target virtual machine; When the network information of the target cloud platform indicates that the target cloud platform has a storage network, the storage network is determined as the hot migration network of the target cloud platform, and the hot migration task is performed based on the hot migration speed by using the hot migration network.
2. The method according to claim 1, characterized in that: The determining the hot migration speed according to the target attribute information and the data volume of the target virtual machine includes: Determining a maximum thermal migration rate according to the target attribute information; When the data volume of the target virtual machine is greater than or equal to a preset data volume threshold, determining the maximum hot migration speed as the hot migration speed; When the data volume of the target virtual machine is less than the preset data volume threshold, the maximum hot migration speed is adjusted and the maximum hot migration speed after the adjustment is determined as the hot migration speed, and the maximum hot migration speed is greater than the maximum hot migration speed after the adjustment.
3. The method according to claim 2, characterized in that The target attribute information includes network card information and CPU information, and determining the maximum hot migration speed according to the target attribute information includes: Determining a candidate hot migration speed according to the network card information; In a case where the CPU information indicates that there is no safety limit on the thermal migration speed, determining the candidate thermal migration speed as the maximum thermal migration speed; In the case where the CPU information indicates that there is a safety limit on the hot migration speed, it is determined whether the candidate hot migration speed is greater than the safe hot migration speed indicated by the safety limit, and the maximum hot migration speed is determined according to the determination result.
4. The method according to claim 3, characterized in that Determining the maximum thermal migration speed according to the determination result includes: In a case where the determination result indicates that the candidate thermal migration speed is greater than the safe thermal migration speed, determining the safe thermal migration speed as the maximum thermal migration speed; In a case where the determination result indicates that the candidate thermal migration speed is less than the safe thermal migration speed, the candidate thermal migration speed is determined as the maximum thermal migration speed.
5. The method according to claim 1, characterized in that The method further comprises: When the network information of the target cloud platform indicates that the target cloud platform does not have a storage network, the management network in the target cloud platform is determined as the hot migration network, and the hot migration task is performed based on the hot migration speed by using the hot migration network.
6. The method according to claims 1 to 5, characterized in that The method further comprises: When the bandwidth information of the hot migration network of the target cloud platform changes, obtaining target bandwidth information of the hot migration network after the change; The concurrent task information of the target cloud platform is updated according to the target bandwidth information, where the concurrent task information is used to indicate the number of hot migration tasks that can be executed in parallel by the target cloud platform.
7. A hot migration task execution device, characterized in that: The device comprises: an acquisition module, configured to acquire a hot migration request, wherein the hot migration request carries a hot migration task indicating to migrate a target virtual machine in a first host device to a second host device, wherein both the first host device and the second host device belong to host devices in a target cloud platform; a determination module, configured to obtain target attribute information, the target attribute information including attribute information of the first host device and attribute information of the second host device, and determine a hot migration speed according to the target attribute information and a data volume of the target virtual machine; An execution module is used to determine the storage network as the hot migration network of the target cloud platform when the network information of the target cloud platform indicates that the target cloud platform has a storage network, and use the hot migration network to perform the hot migration task based on the hot migration speed.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.