Virtual machine migration method and device, electronic equipment and storage medium

By migrating low-load virtual machines to non-high-performance nodes based on the load and running time of the virtual machine, the problem of low-load virtual machines occupying high-performance nodes in computer clusters is solved, and the scheduling success rate of high-load virtual machines is improved and resource utilization.

CN119166267APending Publication Date: 2024-12-20CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310735859.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-20
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

The computer cluster has a low scheduling success rate and low computing resource utilization rate. This is mainly due to insufficient attention to low-load virtual machines, which leads to insufficient resources when scheduling high-load virtual machines, and low-load virtual machines occupy high-performance nodes and reduce resource utilization. Rate.

Method used

By determining the low-load virtual machines to be migrated based on the virtual machine load and run time deployed by the compute node and migrating them to non-high-performance compute nodes, thereby giving up computing resources for high-load virtual machines and improving scheduling success and resources. Usage rate.

Benefits of technology

Improves the scheduling success rate of high-load virtual machines and the overall resource utilization of computer clusters, freeing up resources to meet the needs of high-load virtual machines by migrating long-running low-load virtual machines to non-high-performance nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166267A_ABST
    Figure CN119166267A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a virtual machine migration method and device, electronic equipment and a storage medium, and relates to the technical field of cloud computing. The method comprises the following steps: determining at least one to-be-migrated first virtual machine in a first partition according to the load and operation duration of the virtual machine deployed in a computing node of the first partition; determining at least one first target computing node from the second partition according to the load of the virtual machine deployed in the computing node of the second partition; determining a to-be-migrated virtual machine list according to idle resources of the at least one first target computing node and resources required by the first virtual machine; and migrating the first virtual machine in the virtual machine list from the computing node of the first partition to the corresponding first target computing node. The success rate of computer cluster scheduling and the utilization rate of computer clusters can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a virtual machine migration method, device, electronic device and storage medium. Background Art

[0002] In order to improve the utilization rate of computer clusters, load balancing is usually performed on the computing nodes in the computer cluster.

[0003] Currently, load balancing for computing nodes usually involves migrating high-load virtual machines to high-performance computing nodes or idle nodes, while paying little attention to low-load virtual machines. This results in a low scheduling success rate for computer clusters and a low utilization rate of computing resources. Summary of the invention

[0004] In response to the low scheduling success rate of computer clusters and the low utilization rate of computing resources, the present application provides a virtual machine migration method, device, electronic device and storage medium, which can improve the scheduling success rate of computer clusters and the utilization rate of computing resources.

[0005] In a first aspect, the present application provides a virtual machine migration method, wherein a computer cluster includes a first partition and a second partition, wherein the first partition and the second partition include a plurality of computing nodes, and an over-resolution ratio of the computing nodes in the first partition is less than an over-resolution ratio of the computing nodes in the second partition, and the method includes:

[0006] Determine at least one first virtual machine to be migrated in the first partition according to the load and running time of the virtual machines deployed in the computing nodes of the first partition; the load of the first virtual machine is less than a first threshold, and the running time is greater than a first time;

[0007] Determine at least one first target computing node from the second partition according to the load of the virtual machine deployed in the computing node of the second partition;

[0008] Determine a list of virtual machines to be migrated according to idle resources of at least one first target computing node and resources required by the first virtual machine;

[0009] Migrate a first virtual machine in the virtual machine list from a computing node in the first partition to a corresponding first target computing node.

[0010] Optionally, before determining at least one first virtual machine to be migrated in the first partition according to the load and running time of the virtual machine deployed in the computing node of the first partition, the method further includes:

[0011] Determine that a second virtual machine deployed on a computing node of the second partition is to be migrated; a load of the second virtual machine is greater than a second threshold, and a running time is greater than a second time; the second threshold is greater than the first threshold;

[0012] After migrating the first virtual machine in the virtual machine list from the computing node of the first partition to the corresponding first target computing node, the method further includes:

[0013] Determine a second target computing node in the first partition according to the load of the virtual machine currently deployed in the computing node of the first partition;

[0014] Migrate the second virtual machine to the second target computing node.

[0015] Optionally, the method further includes:

[0016] Dividing the computing nodes in the computer cluster into computing nodes of the first partition and computing nodes of the second partition;

[0017] and / or,

[0018] System parameters are set for the computing nodes of the first partition and the computing nodes of the second partition respectively, wherein the system parameters include at least one of the following: an over-resolution ratio, a threshold corresponding to the load, and a threshold corresponding to the running time.

[0019] Optionally, dividing the computing nodes in the computer cluster into computing nodes in the first partition and computing nodes in the second partition includes:

[0020] The computing nodes in the computer cluster are divided into computing nodes of the first partition and computing nodes of the second partition according to the deployment locations of the computing nodes and / or the functions of the virtual machines deployed on the computing nodes and / or the computing capabilities of the computing nodes.

[0021] Optionally, the setting of system parameters for the computing nodes of the first partition and the computing nodes of the second partition respectively includes:

[0022] Determine the target system parameters of each computing node according to the system parameters of each computing node in each partition;

[0023] Adjust the system parameters of each computing node to the corresponding target system parameters.

[0024] Optionally, the method further includes:

[0025] According to the migration result and / or the user's operation on the virtual machine in the computer cluster, the mapping list of the computer cluster is updated, wherein the mapping list includes: a list of virtual machines deployed in the computer cluster, and a subordinate relationship between the virtual machines and the computing nodes; the operation includes at least one of a power-on operation, a power-off operation, a migration operation, and a deletion operation on the virtual machine;

[0026] The mapping list is displayed.

[0027] Optionally, before determining at least one first target computing node from the second partition according to the load of the virtual machine deployed in the computing node of the second partition, the method further includes:

[0028] Whether to determine a first target computing node in the second partition is determined according to the type of the computing node where the first virtual machine is located and the function of the first virtual machine.

[0029] In a second aspect, the present application provides a virtual machine migration device, wherein a computer cluster includes a first partition and a second partition, wherein the first partition and the second partition include a plurality of computing nodes, and an over-resolution ratio of the computing nodes in the first partition is greater than an over-resolution ratio of the computing nodes in the second partition, and the device includes:

[0030] A processing module, configured to determine at least one first virtual machine to be migrated in the first partition according to the load and running time of the virtual machines deployed in the computing nodes of the first partition; the load of the first virtual machine is less than a first threshold value, and the running time is greater than a first time length;

[0031] A first determination module, configured to determine at least one first target computing node from the second partition according to the load of the virtual machine deployed in the computing node of the second partition;

[0032] A second determination module, configured to determine a list of virtual machines to be migrated according to idle resources of at least one first target computing node and resources required by the first virtual machine;

[0033] A migration module is used to migrate a first virtual machine in the virtual machine list from the first divided computing node to a corresponding first target computing node.

[0034] In a third aspect, the present application provides an electronic device, including: a memory and a processor;

[0035] The memory is used to store computer instructions; the processor is used to execute the computer instructions stored in the memory to implement any method in the first aspect.

[0036] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and the computer program is executed by a processor to implement any one of the methods in the first aspect.

[0037] In a fifth aspect, the present application provides a computer program product, comprising a computer program, which implements any one of the methods in the first aspect when executed by a processor.

[0038] The virtual machine migration method, device, electronic device and storage medium provided in the present application determine at least one first virtual machine to be migrated in the first partition according to the load and running time of the virtual machine deployed in the computing node of the first partition; the load of the first virtual machine is less than the first threshold value, and the running time is greater than the first time; according to the load of the virtual machine deployed in the computing node of the second partition, at least one first target computing node is determined from the second partition; according to the idle resources of at least one first target computing node and the resources required by the first virtual machine, a list of virtual machines to be migrated is determined; and the first virtual machine in the virtual machine list is migrated from the computing node of the first partition to the corresponding first target computing node. By migrating the low-load virtual machines that have been deployed on high-performance computing nodes and have been running for a long time to non-high-performance computing nodes, computing resources can be released for other high-load virtual machines, thereby improving the scheduling success rate and computer cluster utilization rate when scheduling high-load virtual machines. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 A schematic diagram of a scenario provided for an embodiment of the present application;

[0040] Figure 2 Schematic diagram of the process of virtual machine migration method provided in the embodiment of the present application Figure 1 ;

[0041] Figure 3 Schematic diagram of the process of virtual machine migration method provided in the embodiment of the present application Figure 2 ;

[0042] Figure 4 A schematic diagram of the structure of a virtual machine migration device provided in an embodiment of the present application;

[0043] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0045] In the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects, and do not limit their order. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.

[0046] It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0047] Efficient utilization of computer clusters has always been an important optimization direction in the field of computer clusters. Currently, most of the efficient utilization of computer clusters is achieved by load balancing the computing nodes in the computer cluster.

[0048] There are several possible ways to implement load balancing for computing nodes in a computer cluster:

[0049] 1. Perform dynamic balancing on the computing nodes in the computer cluster after they are running. For example, migrate high-load virtual machines to high-performance computing nodes or idle nodes based on monitoring data.

[0050] 2. Dynamically increase the number of computing nodes in the computer cluster. For example, set up redundant computing nodes and set them to a powered-off state. When the load at the computing node level is higher than a certain threshold, start the powered-off computing nodes and add them to the resource pool.

[0051] However, the above methods of dynamically adjusting the position of virtual machines and dynamically adding computing nodes only adjust high-load virtual machines, and lack consideration for low-load virtual machines that run for a long time. If there are multiple low-load virtual machines that run for a long time occupying high-performance computing nodes in a computer cluster, when scheduling high-load virtual machines, it may be limited by the lack of available high-performance computing nodes, resulting in scheduling failure. At the same time, the low-load virtual machines occupying high-performance computing nodes will also reduce the utilization rate of the computer cluster.

[0052] In view of this, an embodiment of the present application provides a virtual machine migration method, which pays attention to low-load virtual machines in a computer cluster. If there are long-running low-load virtual machines deployed on high-performance computing nodes, the corresponding virtual machines are migrated to non-high-performance computing nodes to make room for computing resources for other high-load virtual machines, thereby improving the scheduling success rate of high-load virtual machines and the utilization rate of the computer cluster.

[0053] The following specific embodiments are used to describe in detail the technical solution of the present application and how the technical solution of the present application solves the above technical problems. The following specific embodiments can be implemented independently or in combination with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0054] Figure 1 Schematic diagram of application scenarios of the embodiments of the present application, such as Figure 1 As shown, the computer cluster includes a processing unit, a first partition and a second partition.

[0055] Each partition includes multiple computing nodes, and each computing node can be deployed with multiple virtual machines. Different virtual machines can perform different computing tasks.

[0056] The processing unit may be used to allocate computing tasks to each computing node, and to obtain the load of each virtual machine deployed on each computing node, and the running time of the virtual machine under the load.

[0057] In a possible implementation manner, the over-resolution ratio of each computing node in the first partition is smaller than the over-resolution ratio of each computing node in the second partition.

[0058] The over-resolution ratio may refer to the ratio of hardware virtualization of the computing node. The higher the over-resolution ratio, the lower the available resources of the virtual machine deployed on the computing node. The hardware of the computing node includes but is not limited to CPU, memory, hard disk, etc. That is, the computing power of the virtual machine in the second partition is weaker than that of the virtual machine in the first partition.

[0059] The processing unit may migrate virtual machines that meet preset conditions and are deployed in computing nodes in the first partition to computing nodes in the second partition to reduce the probability of virtual machines with lower loads occupying high-performance computing nodes. The preset conditions may be that the virtual machine has a lower load and has been running for a longer time.

[0060] In some embodiments, the processing unit may be an independent hardware entity, such as a server, or a cluster middleware, which is a software layer located above the node. The embodiment of the present application does not limit the form of the processing unit.

[0061] In some embodiments, one computing node may correspond to one physical host.

[0062] The above describes the application scenarios provided by the embodiments of the present application. Figure 1 Taking the processing unit in as an example, the node migration method provided in the embodiment of the present application is explained.

[0063] Figure 2 Schematic diagram of the process of virtual machine migration method provided in the embodiment of the present application Figure 1 ,like Figure 2 As shown, the steps include:

[0064] S201. Determine at least one first virtual machine to be migrated in the first partition according to the load and running time of the virtual machines deployed in the computing nodes of the first partition; the load of the first virtual machine is less than a first threshold, and the running time is greater than a first time.

[0065] In the embodiment of the present application, the load of the virtual machine may be the load of the virtual machine at the current moment, and the running time of the virtual machine may be the running time of the virtual machine when the load is lower than the first threshold.

[0066] The processing unit may interact with each computing node in the first partition to obtain the load and running time of the virtual machine deployed by each computing node. For example, the computing node may record the running time of each virtual machine under each load in the form of a log, and the processing unit may read the log to obtain the load and running time.

[0067] The processing unit may use a virtual machine in the first partition whose load is less than a first threshold and whose running time is greater than a first time length as the first virtual machine.

[0068] Exemplarily, the first threshold is 0.9, and the first duration is 30 minutes. When the processing unit determines that the current load of a virtual machine in the first partition is less than 0.9, it can obtain the running time of the virtual machine when the load is less than 0.9 based on the current time point. If the running time is greater than 30 minutes, the virtual machine can be used as the first virtual machine.

[0069] It should be understood that the first threshold and the first duration can be set according to actual needs, and the embodiments of the present application are not limited to this.

[0070] In a possible implementation, the processing unit may obtain the load and the running time multiple times in a preset time period.

[0071] S202: Determine at least one first target computing node from the second partition according to the load of the virtual machine deployed in the computing node of the second partition.

[0072] In the embodiment of the present application, the target computing node may be a computing node that can be used to receive the migrated virtual machine.

[0073] Exemplarily, the processing unit may obtain the virtual machines deployed on each computing node in the second partition and the load of each virtual machine, and determine the idle resources of each computing node.

[0074] In a possible implementation manner, if the idle resources of a computing node are greater than a preset value, the computing node may be used as the first target computing node.

[0075] In a possible implementation, based on the minimum resources required to run the first virtual machine, a computing node whose idle resources are greater than the minimum resources required to run the first virtual machine may be selected as the first target computing node.

[0076] S203: Determine a list of virtual machines to be migrated according to idle resources of at least one first target computing node and resources required by the first virtual machine.

[0077] In the embodiment of the present application, when determining the first target node, the idle resources of each first target node can be obtained, and the resources required to run each first virtual machine can be determined.

[0078] According to the idle resources of the first target node and the size relationship between the resources required by the first virtual machine, the first virtual machine that can be received by the first target node is determined, and the list of virtual machines to be migrated is obtained.

[0079] Exemplarily, the first virtual machine includes virtual machines A, B, and C, and the required resources are X, XX, and XXX, respectively, where X to XXX increase in sequence. The first target node includes node 1 and node 2, the idle resources of node 1 are greater than X and less than XX, and the idle resources of node 2 are greater than XX and less than XXX, then the list of virtual machines to be migrated can be virtual machines A and B.

[0080] In a possible implementation, the first virtual machine includes virtual machines A, B, and C, and the required resources are X, XX, and XXX, respectively, where X to XXX increase in sequence. The first target node includes node 1 and node 2, the idle resources of node 1 are greater than X and less than XX, and the idle resources of node 2 are greater than XXX and less than the sum of XX and XXX, then the list of virtual machines to be migrated can be virtual machines A and B, or virtual machines A and C.

[0081] In this case, the processing unit may randomly select a list as the virtual machine list, or preferentially select a list including those with high resource requirements as the virtual machine list, or select a list including those with longer running time as the virtual machine list.

[0082] S204: Migrate a first virtual machine in the virtual machine list from a computing node in the first partition to a corresponding first target computing node.

[0083] In the embodiment of the present application, when the processing unit determines the virtual machine list, the first virtual machine therein can be migrated to the corresponding first target computing node in sequence, or, synchronously migrated to the corresponding first target computing node. The specific migration method can refer to the scheduling method of the virtual machine in the prior art, and the embodiment of the present application is not repeated here.

[0084] The virtual machine migration method provided in the embodiment of the present application determines at least one first virtual machine to be migrated in the first partition according to the load and running time of the virtual machine deployed in the computing node of the first partition; the load of the first virtual machine is less than the first threshold value, and the running time is greater than the first time; according to the load of the virtual machine deployed in the computing node of the second partition, at least one first target computing node is determined from the second partition; according to the idle resources of at least one first target computing node and the resources required by the first virtual machine, a list of virtual machines to be migrated is determined; and the first virtual machine in the virtual machine list is migrated from the computing node of the first partition to the corresponding first target computing node. By migrating the low-load virtual machines that have been running for a long time and are deployed on high-performance computing nodes to non-high-performance computing nodes, computing resources can be released for other high-load virtual machines, thereby improving the scheduling success rate and computer cluster utilization rate when scheduling high-load virtual machines.

[0085] Optionally, based on the above embodiment, the virtual machine migration method provided in the embodiment of the present application further includes determining whether there is a second virtual machine to be migrated in the second partition before determining at least one first virtual machine to be migrated in the first partition.

[0086] Exemplarily, it is determined that a second virtual machine deployed on the computing node of the second partition is to be migrated; the load of the second virtual machine is greater than a second threshold, and the running time is greater than a second time length; the second threshold is greater than the first threshold.

[0087] In the embodiment of the present application, the processing unit can interact with each computing node in the second partition, obtain the load and running time of the virtual machine deployed by each computing node in the second partition, and use the virtual machine whose load is greater than the second threshold and whose running time is greater than the second time as the second virtual machine. The specific implementation method of determining the second virtual machine is similar to the specific implementation method of determining the first virtual machine, which will not be repeated here.

[0088] It should be understood that a virtual machine with a load greater than the second threshold and a runtime greater than the second duration may be considered as a virtual machine that needs to be migrated to a high-performance node. By determining the second virtual machine, the first virtual machine may be migrated when there is a migration requirement, thereby reducing resource consumption caused by excessive migration.

[0089] Optionally, when the second virtual machine is determined, the second virtual machine may be migrated.

[0090] Exemplarily, according to the load of the virtual machine currently deployed in the computing node of the first partition, a second target computing node in the first partition is determined; and the second virtual machine is migrated to the second target computing node.

[0091] In the embodiment of the present application, the processing unit can determine the second target computing node that can run the second virtual machine based on the resources required to run the second virtual machine and the load of the virtual machine currently deployed in the computing node of the first partition. The second virtual machine is migrated from the second partition to the second target computing node of the first partition. The specific implementation method of determining the second target computing node is similar to the specific implementation method of determining the first target computing node, which will not be repeated here.

[0092] It should be understood that the second virtual machine can be migrated before or after the first virtual machine is migrated, and the present application embodiment does not limit this. By migrating the second virtual machine, the utilization rate of the entire computer cluster can be improved.

[0093] Optionally, based on the above embodiments, the virtual machine migration method provided in the embodiments of the present application can divide the computer cluster and / or set relevant parameters before migrating the virtual machine.

[0094] Exemplarily, the computing nodes in the computer cluster are divided into computing nodes of the first partition and computing nodes of the second partition; and / or, system parameters are set for the computing nodes of the first partition and the computing nodes of the second partition respectively, and the system parameters include at least one of the following: over-resolution ratio, a threshold corresponding to the load, and a threshold corresponding to the running time.

[0095] In an embodiment of the present application, the processing unit may divide each computing node in the computer cluster into computing nodes of the first partition and computing nodes of the second partition according to a preset condition. For example, computing nodes with strong computing power may be divided into the first partition, and computing nodes with weak computing power may be divided into the second partition according to the computing power of the computing nodes. Alternatively, each computing node may be divided into the first partition or the second partition according to the configuration, function, etc. of each computing node. The embodiment of the present application does not limit the preset conditions for dividing the first partition and the second partition.

[0096] Optionally, the processing unit may further set system parameters for the computing nodes of the first partition and the computing nodes of the second partition, respectively. For example, a low superresolution ratio is set for the computing nodes of the first partition, a high superresolution ratio is set for the computing nodes of the second partition, and a threshold corresponding to the load and a threshold corresponding to the running time are set for the computing nodes of the first partition and the computing nodes of the second partition, respectively.

[0097] It should be understood that the specific value of the over-resolution ratio and the threshold corresponding to the load and the threshold corresponding to the operating time can be set according to actual needs.

[0098] Optionally, in some embodiments, the processing unit may divide the computing nodes in the computer cluster into computing nodes of the first partition and computing nodes of the second partition based on the deployment location of the computing nodes and / or the functions of the virtual machines deployed on the computing nodes and / or the computing capabilities of the computing nodes.

[0099] Exemplarily, the processing unit may divide computing nodes with similar deployment locations into the same partition, for example, dividing computing nodes with deployment locations within a preset range near location A into a first partition and dividing the remaining computing nodes into a second partition.

[0100] In a possible implementation, the processing unit may divide computing nodes with the same or similar functions of deployed virtual machines into the same partition. For example, if the virtual machines deployed in some computing nodes are used to process streaming tasks, the computing nodes may be divided into computing nodes of the first partition. If the virtual machines deployed in some computing nodes are used to process batch tasks, the computing nodes may be divided into computing nodes of the second partition.

[0101] In a possible implementation manner, the processing unit may divide computing nodes with strong computing capabilities into a first partition, and divide computing nodes with weak computing capabilities into a second partition according to the computing capabilities of the computing nodes.

[0102] Optionally, in some embodiments, the processing unit may determine the target system parameters of each computing node according to the system parameters of each computing node in each partition; and adjust the system parameters of each computing node to the corresponding target system parameters.

[0103] In the embodiment of the present application, the computing nodes of different partitions may have default system parameters, and the processing unit may determine the corresponding target system parameters according to the partition to which the computing node belongs. For example, the computing node belongs to the first partition, and its default super-resolution ratio is 1:16, which is a relatively high super-resolution ratio. The processing unit may use the super-resolution ratio of the first partition as the target system parameter of the computing node, and adjust the super-resolution ratio of the computing node to the super-resolution ratio of the first partition. For example, 1:4.

[0104] In a possible implementation, the target system parameter of each computing node may be a parameter range. When adjusting the system parameter of each computing node, the processing unit may set the corresponding target system parameter according to the actual situation of each computing node.

[0105] Optionally, in some embodiments, the first virtual machine is migrated to reduce the occurrence of low-load virtual machines occupying high-performance computing nodes for a long time as much as possible, so as to better utilize the performance of the computer cluster. However, some computing nodes or virtual machines may be responsible for executing important computing tasks, and although the load is low, they do not need to be migrated. Therefore, before determining the first target computing node, it is necessary to judge this.

[0106] Exemplarily, whether to determine the first target computing node in the second partition is determined according to the type of the computing node where the first virtual machine is located and the function of the first virtual machine.

[0107] In an embodiment of the present application, when the processing unit determines the first virtual machine, it can obtain the type of the computing node where the first virtual machine is located and the function of the first virtual machine. If the type of the computing node where the first virtual machine is located is a preset type, and / or the function of the first virtual machine is a preset function, it can be confirmed that the first virtual machine does not need to be migrated, that is, the first target computing node is not determined in the second partition.

[0108] Exemplarily, the preset type may be one of a control node and a network node, and the preset function may be a test function. By determining the type of the computing node where the first virtual machine is located and the function of the first virtual machine, the impact of the migration on the normal operation of the computer cluster can be reduced, and the resource consumption caused by the migration can be reduced.

[0109] Optionally, in some embodiments, the processing unit may further display each virtual machine in the computer cluster and the relationship between each virtual machine and the computing node to facilitate viewing and operation by the user.

[0110] Exemplarily, based on the migration results and / or the user's operations on the virtual machines in the computer cluster, the mapping list of the computer cluster is updated, the mapping list including: a list of virtual machines deployed in the computer cluster, and the subordinate relationships between the virtual machines and the computing nodes; the operations include at least one of powering on, shutting down, migrating, and deleting the virtual machines; and the mapping list is displayed.

[0111] In an embodiment of the present application, the processing unit may call a computing service interface in a computer cluster to obtain a list of virtual machines and affiliations between virtual machines and computing nodes, and generate a corresponding mapping list. Each time a virtual machine is migrated, the mapping list is updated. Also, when receiving a user's operation, the mapping list is updated, and the updated mapping list is displayed to the user.

[0112] Optionally, in a possible implementation, the mapping list may be stored in the memory of the computer cluster in XML format.

[0113] Figure 3 Schematic diagram of the process of virtual machine migration method provided in the embodiment of the present application Figure 2 ,like Figure 3 As shown, the steps include:

[0114] S301: Divide computing nodes in a computer cluster into computing nodes in the first partition and computing nodes in the second partition.

[0115] S302: Set system parameters for the computing nodes of the first partition and the computing nodes of the second partition respectively.

[0116] S303: Determine at least one first virtual machine to be migrated in the first partition according to the load and running time of the virtual machines deployed in the computing nodes of the first partition.

[0117] S304: Determine at least one first target computing node from the second partition according to the load of the virtual machine deployed in the computing node of the second partition.

[0118] S305. Determine a list of virtual machines to be migrated according to idle resources of at least one first target computing node and resources required by the first virtual machine.

[0119] S306: Migrate the first virtual machine in the virtual machine list from the computing node in the first partition to the corresponding first target computing node.

[0120] S307: Update the mapping list of the computer cluster according to the migration result and / or the user's operation on the virtual machines in the computer cluster.

[0121] The specific implementation of each step of the virtual machine migration method provided in the embodiment of the present application can refer to the specific implementation of the above embodiment, which will not be repeated here.

[0122] The embodiment of the present application also provides a virtual machine migration device.

[0123] Figure 4 A schematic diagram of the structure of a virtual machine migration device 400 provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, including:

[0124] Processing module 401 is used to determine at least one first virtual machine to be migrated in the first partition based on the load and running time of the virtual machines deployed in the computing nodes of the first partition; the load of the first virtual machine is less than a first threshold and the running time is greater than a first time.

[0125] The first determination module 402 is configured to determine at least one first target computing node from the second partition according to the load of the virtual machine deployed in the computing node of the second partition.

[0126] The second determination module 403 is used to determine a list of virtual machines to be migrated according to the idle resources of at least one first target computing node and the resources required by the first virtual machine.

[0127] The migration module 404 is configured to migrate the first virtual machine in the virtual machine list from the first differentiated computing node to the corresponding first target computing node.

[0128] Optionally, the first determination module 402 is also used to determine that a second virtual machine deployed on the computing node of the second partition is to be migrated; the load of the second virtual machine is greater than a second threshold and the running time is greater than a second time; the second threshold is greater than the first threshold.

[0129] Optionally, the migration module 404 is further configured to determine a second target computing node in the first partition according to the load of the virtual machine currently deployed in the computing node of the first partition; and migrate the second virtual machine to the second target computing node.

[0130] Optionally, the processing module 401 is also used to divide the computing nodes in the computer cluster into computing nodes of the first partition and computing nodes of the second partition; and / or, to set system parameters for the computing nodes of the first partition and the computing nodes of the second partition respectively, and the system parameters include at least one of the following: over-resolution ratio, a threshold corresponding to the load, and a threshold corresponding to the running time.

[0131] Optionally, the processing module 401 is also used to divide the computing nodes in the computer cluster into computing nodes of the first partition and computing nodes of the second partition according to the deployment location of the computing nodes and / or the function of the virtual machine deployed on the computing nodes and / or the computing capacity of the computing nodes.

[0132] Optionally, the processing module 401 is further configured to determine target system parameters of each computing node according to the system parameters of each computing node in each partition; and adjust the system parameters of each computing node to the corresponding target system parameters.

[0133] Optionally, processing module 401 is also used to update the mapping list of the computer cluster according to the migration results and / or the user's operations on the virtual machines in the computer cluster, the mapping list including: a list of virtual machines deployed in the computer cluster, and the subordinate relationship between the virtual machines and the computing nodes; the operations include at least one of powering on, shutting down, migrating and deleting the virtual machines; and displaying the mapping list.

[0134] Optionally, the second determination module 403 is further configured to determine whether to determine a first target computing node in the second partition according to the type of the computing node where the first virtual machine is located and the function of the first virtual machine.

[0135] The virtual machine migration device provided in the embodiment of the present application can execute the virtual machine migration method provided in any of the above embodiments, and its principles and technical effects are similar, which will not be repeated here.

[0136] Figure 5 This is a schematic diagram of the structure of an electronic device provided in this application. Figure 5 As shown, the electronic device 500 may include: at least one processor 501 , a memory 502 , and a communication interface 503 .

[0137] The memory 502 is used to store programs. Specifically, the programs may include program codes, and the program codes include computer operation instructions.

[0138] The memory 502 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.

[0139] The processor 501 is used to execute the computer-executable instructions stored in the memory 502 to implement the actions of the virtual machine migration method described in the aforementioned method embodiment. The processor 501 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0140] In specific implementation, if the communication interface 503, the memory 502 and the processor 501 are implemented independently, the communication interface 503, the memory 502 and the processor 501 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc., but it does not mean that there is only one bus or one type of bus.

[0141] Optionally, in a specific implementation, if the communication interface 503, the memory 502 and the processor 501 are integrated on a chip, the communication interface 503, the memory 502 and the processor 501 can communicate through an internal interface.

[0142] In an embodiment of the present application, a computer-readable storage medium is also provided, on which a computer program is stored. When the computer program is executed by a processor, the technical solution of the above-mentioned virtual machine migration method embodiment is implemented. The implementation principle and technical effect are similar and will not be repeated here.

[0143] In one possible implementation, a computer-readable medium may include a random access memory (RAM), a read-only memory (ROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, a magnetic disk storage or other magnetic storage device, or any other medium that is intended to carry or store the required program code in the form of instructions or data structures and can be accessed by a computer. Moreover, any connection is appropriately referred to as a computer-readable medium. For example, if the software is transmitted from a website, server or other remote source using a coaxial cable, a fiber optic cable, a twisted pair, a digital subscriber line (DSL) or wireless technologies such as infrared, radio and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of the medium. Disks and optical disks as used herein include optical disks, laser disks, optical disks, digital versatile disks (DVDs), floppy disks and Blu-ray disks, where disks usually reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0144] A computer program product is also provided in an embodiment of the present application, including a computer program. When the computer program is executed by a processor, the technical solution of the above-mentioned virtual machine migration method embodiment is implemented. The implementation principle and technical effect are similar and will not be repeated here.

[0145] In the specific implementation of the above-mentioned terminal device or server, it should be understood that the processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or the processor can be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor.

[0146] Those skilled in the art will appreciate that all or part of the steps of any of the above method embodiments may be completed by hardware associated with program instructions. The aforementioned program may be stored in a computer-readable storage medium, and when the program is executed, all or part of the steps of the above method embodiments are executed.

[0147] If the technical solution of the present application is implemented in the form of software and sold or used as a product, it can be stored in a computer-readable storage medium. Based on such an understanding, all or part of the technical solution of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a computer program or several instructions. The computer software product enables a computer device (which can be a personal computer, a server, a network device, or a similar electronic device) to perform all or part of the steps of the method described in the embodiment of the present application.

[0148] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A virtual machine migration method, characterized in that: The computer cluster includes a first partition and a second partition, the first partition and the second partition include a plurality of computing nodes, the over-resolution ratio of the computing nodes in the first partition is less than the over-resolution ratio of the computing nodes in the second partition, and the method includes: Determine at least one first virtual machine to be migrated in the first partition according to the load and running time of the virtual machines deployed in the computing nodes of the first partition; the load of the first virtual machine is less than a first threshold, and the running time is greater than a first time; Determine at least one first target computing node from the second partition according to the load of the virtual machine deployed in the computing node of the second partition; Determine a list of virtual machines to be migrated according to idle resources of at least one first target computing node and resources required by the first virtual machine; Migrate a first virtual machine in the virtual machine list from a computing node in the first partition to a corresponding first target computing node.

2. The method according to claim 1, characterized in that Before determining at least one first virtual machine to be migrated in the first partition according to the load and running time of the virtual machine deployed in the computing node of the first partition, the method further includes: Determine that a second virtual machine deployed on a computing node of the second partition is to be migrated; a load of the second virtual machine is greater than a second threshold, and a running time is greater than a second time; the second threshold is greater than the first threshold; After migrating the first virtual machine in the virtual machine list from the computing node of the first partition to the corresponding first target computing node, the method further includes: Determine a second target computing node in the first partition according to the load of the virtual machine currently deployed in the computing node of the first partition; Migrate the second virtual machine to the second target computing node.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: Dividing the computing nodes in the computer cluster into computing nodes of the first partition and computing nodes of the second partition; and / or, System parameters are set for the computing nodes of the first partition and the computing nodes of the second partition respectively, wherein the system parameters include at least one of the following: an over-resolution ratio, a threshold corresponding to the load, and a threshold corresponding to the running time.

4. The method according to claim 3, characterized in that The step of dividing the computing nodes in the computer cluster into computing nodes in the first partition and computing nodes in the second partition comprises: The computing nodes in the computer cluster are divided into computing nodes of the first partition and computing nodes of the second partition according to the deployment locations of the computing nodes and / or the functions of the virtual machines deployed on the computing nodes and / or the computing capabilities of the computing nodes.

5. The method according to claim 3, characterized in that: The step of setting system parameters for the computing nodes of the first partition and the computing nodes of the second partition respectively includes: Determine the target system parameters of each computing node according to the system parameters of each computing node in each partition; Adjust the system parameters of each computing node to the corresponding target system parameters.

6. The method according to claim 1 or 2, characterized in that: The method further comprises: According to the migration result and / or the user's operation on the virtual machine in the computer cluster, the mapping list of the computer cluster is updated, wherein the mapping list includes: a list of virtual machines deployed in the computer cluster, and a subordinate relationship between the virtual machines and the computing nodes; the operation includes at least one of a power-on operation, a power-off operation, a migration operation, and a deletion operation on the virtual machine; The mapping list is displayed.

7. The method according to claim 1 or 2, characterized in that: Before determining at least one first target computing node from the second partition according to the load of the virtual machine deployed in the computing node of the second partition, the method further includes: Whether to determine a first target computing node in the second partition is determined according to the type of the computing node where the first virtual machine is located and the function of the first virtual machine.

8. A virtual machine migration device, characterized in that: The computer cluster includes a first partition and a second partition, the first partition and the second partition include a plurality of computing nodes, the over-resolution ratio of the computing nodes in the first partition is greater than the over-resolution ratio of the computing nodes in the second partition, and the device includes: A processing module, configured to determine at least one first virtual machine to be migrated in the first partition according to the load and running time of the virtual machine deployed in the computing node of the first partition; the load of the first virtual machine is less than a first threshold value, and the running time is greater than a first time length; A first determination module, configured to determine at least one first target computing node from the second partition according to the load of the virtual machine deployed in the computing node of the second partition; A second determination module, configured to determine a list of virtual machines to be migrated according to idle resources of at least one first target computing node and resources required by the first virtual machine; A migration module is used to migrate a first virtual machine in the virtual machine list from a computing node in the first partition to a corresponding first target computing node.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 7.