Virtual machine migration method and device, equipment and medium

By obtaining the performance data of the hosts in the host group and the hot host judgment strategy, the virtual machines are automatically migrated to the target host, solving the problems of low virtual machine migration efficiency and resource imbalance in the cloud platform and achieving efficient resource utilization.

CN120670089APending Publication Date: 2025-09-19INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510844885.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-23
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

In cloud platforms, there are problems such as low virtual machine migration efficiency and unbalanced resource deployment, especially after the hot spot effect and computing resource expansion, which leads to idle computing nodes and resource waste.

Method used

By obtaining the performance data of each candidate host in the current host group, the hotspot host is determined using the preset hotspot host judgment strategy, and the virtual machine is automatically migrated to the target host according to the performance weight to achieve resource balance within the host group.

Benefits of technology

It improves the efficiency and accuracy of virtual machine migration, ensures balanced utilization of resources within the host group, and reduces idle and wasted computing nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120670089A_ABST
    Figure CN120670089A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a virtual machine migration method and device, equipment and a medium, and relates to the technical field of cloud computing. The method comprises the steps of obtaining current performance data of candidate host machines in a current host set, and determining whether a current hotspot host exists in the current host set according to the current performance data and a preset hotspot host judgment strategy; if yes, determining the current performance weight according to the hotspot host judgment strategy and the current performance data of the current hotspot host; and determining a target host machine according to the current performance weight and current performance data corresponding to non-current hotspot hosts in the current host machine group, and migrating a current virtual machine of the current hotspot host to the target host machine. The virtual machine migration among different host machines in the host machine group is automatically realized, the migration efficiency of the virtual machine is improved, and the migration accuracy of the virtual machine is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of cloud computing technology, and in particular to a virtual machine migration method, apparatus, device, and medium. Background Art

[0002] In the context of mass deployment of applications and intensive resource allocation achieved by cloud platforms through super-resolution technology, multiple nodes may cluster during actual operation to produce a hotspot effect, leading to insufficient application performance and capacity. At the same time, after the computing resources are expanded, the resources of the newly expanded computing nodes (i.e., host machines) will not be scheduled when no new virtual machines are created, resulting in idle computing nodes, that is, uneven resource deployment between different host machines in the host group. In the existing technology, manual methods are usually used to achieve virtual machine migration within a host group. Therefore, it is crucial to improve the efficiency of virtual machine migration. Summary of the Invention

[0003] The present invention provides a virtual machine migration method, device, equipment and medium to automatically realize virtual machine migration and improve virtual machine migration efficiency.

[0004] According to one aspect of the present invention, a virtual machine migration method is provided, comprising:

[0005] Obtaining current performance data of each candidate host in the current host group, and determining whether there is a current hot host in the current host group based on the current performance data and a preset hot host judgment strategy;

[0006] If so, determining the current performance weight according to the hotspot host judgment strategy and the current performance data of the current hotspot host;

[0007] A target host is determined according to the current performance weight and current performance data corresponding to non-current hotspot hosts in the current host group, and the current virtual machine of the current hotspot host is migrated to the target host.

[0008] According to another aspect of the present invention, there is provided a virtual machine migration apparatus, comprising:

[0009] A current hotspot host determination module is used to obtain current performance data of each candidate host in the current host group, and determine whether there is a current hotspot host in the current host group based on the current performance data and a preset hotspot host judgment strategy;

[0010] a current performance weight determination module, configured to determine the current performance weight, if any, based on the hotspot host judgment strategy and the current performance data of the current hotspot host;

[0011] The virtual machine migration module is used to determine the target host machine according to the current performance weight and the current performance data corresponding to the non-current hotspot host in the current host group, and migrate the current virtual machine of the current hotspot host to the target host machine.

[0012] According to another aspect of the present invention, there is provided an electronic device, comprising:

[0013] one or more processors;

[0014] a memory for storing one or more programs;

[0015] When one or more programs are executed by one or more processors, the one or more processors can execute any one of the virtual machine migration methods provided by the embodiments of the present invention.

[0016] According to another aspect of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores computer instructions, which are used to enable a processor to implement any virtual machine migration method provided in an embodiment of the present invention when executed.

[0017] An embodiment of the present invention provides a virtual machine migration solution, which obtains the current performance data of each candidate host in the current host group, and determines whether there is a current hotspot host in the current host group based on the current performance data and a preset hotspot host judgment policy; if there is, the current performance weight is determined based on the hotspot host judgment policy and the current performance data of the current hotspot host; the target host is determined based on the current performance weight and the current performance data corresponding to the non-current hotspot hosts in the current host group, and the current virtual machine of the current hotspot host is migrated to the target host. The above solution determines the current hotspot host in the current host group based on the current performance data and a preset hotspot host judgment policy, determines the current performance data of the current hotspot host, and determines the target host from other candidate hosts in the current host group except the current hotspot host based on the current performance data, so as to realize the migration of the current virtual machine of the current hotspot host to the target host, that is, realizes the resource migration between the current hotspot host and the target host, automatically realizes the virtual machine migration between different hosts in the host group, improves the migration efficiency of the virtual machine, and improves the accuracy of the virtual machine migration.

[0018] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 This is a flow chart of a virtual machine migration method provided by Example 1 of the present invention;

[0021] Figure 2 This is a flow chart of a virtual machine migration method provided by Embodiment 2 of the present invention;

[0022] Figure 3 This is a structural diagram of a virtual machine migration device provided by a fourth embodiment of the present invention;

[0023] Figure 4 1 is a structural diagram of an electronic device for implementing a virtual machine migration method provided in a fifth embodiment of the present invention. DETAILED DESCRIPTION

[0024] The present invention will be further described in detail below with reference to the accompanying drawings and examples. It will be understood that the specific embodiments described herein are intended only to illustrate the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present invention, not all structures.

[0025] Example 1

[0026] Figure 1 This is a flowchart of a virtual machine migration method provided in Example 1 of the present invention. This embodiment can be applied to the situation of automatically implementing virtual machine migration between hot hosts and idle hosts in a host group. The method can be executed by a virtual machine migration device, which can be implemented in software and / or hardware and can be configured in an electronic device that carries the virtual machine migration function.

[0027] See also Figure 1 The virtual machine migration method shown includes:

[0028] S110: Obtain current performance data of each candidate host in the current host group, and determine whether there is a current hotspot host in the current host group based on the current performance data and a preset hotspot host judgment strategy.

[0029] The current host group refers to the host group for which virtual machine migration is currently being determined. The candidate host refers to a host within the current host group. The current performance data refers to the performance data of the candidate host. Exemplarily, the current performance data includes current memory performance data and current processor performance data.

[0030] The current memory performance data refers to the performance data of the memory in the candidate host at the current moment. Exemplarily, the current memory performance data may include at least one of the current memory usage rate, the current memory allocation rate, and the total memory capacity. The current memory usage rate may represent the memory usage of the candidate host at the current moment. The current memory allocation rate refers to the memory allocation rate of the candidate host at the current moment. The total memory capacity refers to the total amount of data that can be processed simultaneously by the memory in the candidate host.

[0031] The current processor performance data refers to the performance data of the candidate host machine's central processing unit (CPU) at the current moment. Exemplarily, the current processor performance data may include at least one of the current processor usage rate, the current processor allocation rate, and the total number of processors. The current processor usage rate may represent the CPU usage of the candidate host machine at the current moment. The current processor allocation rate refers to the CPU allocation rate of the candidate host machine at the current moment. The total number of processors refers to the total amount of data that the candidate host machine's CPU can process simultaneously.

[0032] The hot host determination strategy may be used to determine whether there is a hot host among the candidate hosts. For example, the hot host determination strategy may be determined based on historical performance data and historical service processing data of the candidate hosts in the current host group.

[0033] The current hot host refers to a candidate host that processes more data (ie, has a larger load) in the current host group at the current moment, that is, a candidate host that occupies a larger amount of network resources at the current moment.

[0034] In an optional embodiment, the hotspot host judgment strategy is determined based on the following method: obtaining the historical performance data and historical business processing data of each candidate host in the current host group; determining the hotspot strategy basic framework based on the historical business processing data, and determining the hotspot host judgment strategy based on the historical performance data and the hotspot strategy basic framework.

[0035] The historical performance data refers to the past performance data of each candidate host in the current host group. For example, the historical performance data may include historical memory performance data and historical processor performance data.

[0036] The historical memory performance data refers to the past performance data of the candidate host's memory. For example, the historical memory performance data may include at least one of historical memory usage, historical memory allocation rate, and total memory. The historical memory usage rate may represent the candidate host's past memory usage. The historical memory allocation rate refers to the candidate host's past memory allocation rate. The total memory refers to the total amount of data that the candidate host's memory can simultaneously process.

[0037] The historical processor performance data refers to the past performance data of the candidate host's central processing unit (CPU). For example, the historical processor performance data may include at least one of historical processor usage, historical processor allocation rate, and total processor capacity. The historical processor usage rate may represent the past usage of the candidate host's CPU. The historical processor allocation rate refers to the past allocation rate of the candidate host's CPU. The total processor capacity refers to the total amount of data that the candidate host's CPU can process simultaneously.

[0038] The historical service processing data refers to the data of the candidate host's past service processing. For example, the historical service processing data may include the service deployment status within the current host group. The hotspot strategy framework refers to the framework used to determine the hotspot host judgment strategy.

[0039] Specifically, the historical performance data and historical business processing data of each candidate host in the current host group are obtained; based on the historical business processing data, the business hotspot data is determined, and the hotspot policy basic framework is determined based on the business hotspot data; based on the historical performance data and the hotspot policy basic framework, the hotspot host judgment strategy is determined. Among them, the business hotspot data can be used to determine whether the business processed by the corresponding candidate host is a hotspot business. Exemplarily, the business hotspot data may include a hotspot sensitivity level and / or a hotspot category. The hotspot sensitivity level refers to the sensitivity level of the business processed by the candidate host. The hotspot category refers to the category of the sensitive business processed by the candidate host.

[0040] It can be understood that by determining the hotspot host determination strategy based on the historical performance data and historical business processing data of each candidate host in the current host group, the accuracy and effectiveness of the determined hotspot host determination strategy are improved.

[0041] Specifically, the current performance data of each candidate host in the current host group is obtained; and based on the current performance data and a preset hot host judgment strategy, it is determined whether there is a current hot host among the candidate hosts in the current host group.

[0042] S120: If so, determine the current performance weight according to the hotspot host judgment strategy and the current performance data of the current hotspot host.

[0043] The current performance weight refers to the performance weight corresponding to the current hotspot host. For example, the current performance weight may include the current memory weight and the current processor weight. The current memory weight refers to the weight corresponding to the memory. The current processor weight refers to the weight corresponding to the central processing unit.

[0044] In an optional embodiment, the current performance weight is determined based on the hotspot host judgment strategy and the current performance data of the current hotspot host, including: determining the current hotspot key data of the current hotspot host based on the hotspot host judgment strategy and the current performance data of the current hotspot host; determining the current performance weight of the current hotspot host based on the current hotspot key data; wherein the current performance weight includes the current processor weight and the current memory weight.

[0045] Among them, the current hotspot key data refers to the performance data used to determine that the candidate host is the current hotspot host. Exemplarily, the current hotspot key data can be current memory performance data or current processor performance data. The embodiment of the present invention does not specifically limit the size of the current processor weight and the current memory weight. It can be set by technicians based on experience or needs, or repeatedly determined through a large number of experiments. It only needs to ensure that the sum of the current processor weight and the current memory weight is 1.

[0046] For example, if the current hot key data is the current memory data, then the current memory weight is determined to be greater than the current processor weight; if the current hot key data is the current processor data, then the current processor weight is determined to be greater than the current memory weight.

[0047] It can be understood that by introducing the current hot spot key data to determine the current performance weight, the accuracy and applicability of the determined current performance weight are improved.

[0048] S130 , determining a target host machine according to the current performance weight and the current performance data corresponding to the non-current hotspot hosts in the current host group, and migrating the current virtual machine of the current hotspot host to the target host machine.

[0049] The current virtual machine refers to the virtual machine on the current hotspot host that needs to be migrated. The embodiments of the present invention do not impose any restrictions on the current virtual machine; it can be set by a technician based on experience or needs. It should be noted that the current virtual machine cannot be a virtual machine unique to the current hotspot host. In other words, some virtual machines are only supported by their respective host machines and cannot be migrated, i.e., cannot become the current virtual machine. The target host refers to a candidate host machine for receiving the migration resources corresponding to the current hotspot host.

[0050] An embodiment of the present invention provides a virtual machine migration solution, which obtains the current performance data of each candidate host in the current host group, and determines whether there is a current hotspot host in the current host group based on the current performance data and a preset hotspot host judgment policy; if there is, the current performance weight is determined based on the hotspot host judgment policy and the current performance data of the current hotspot host; the target host is determined based on the current performance weight and the current performance data corresponding to the non-current hotspot hosts in the current host group, and the current virtual machine of the current hotspot host is migrated to the target host. The above solution determines the current hotspot host in the current host group based on the current performance data and a preset hotspot host judgment policy, determines the current performance data of the current hotspot host, and determines the target host from other candidate hosts in the current host group except the current hotspot host based on the current performance data, so as to realize the migration of the current virtual machine of the current hotspot host to the target host, that is, realizes the resource migration between the current hotspot host and the target host, automatically realizes the virtual machine migration between different hosts in the host group, improves the migration efficiency of the virtual machine, and improves the accuracy of the virtual machine migration.

[0051] Based on the above technical solution, an embodiment of the present invention further provides an optional example. After the current virtual machine is migrated, the resource usage of the current hotspot host and the target host changes. To ensure the performance of the current hotspot host and the target host, it is necessary to verify the current hotspot host and the target host after the migration to determine whether the hotspot has been eliminated after the migration and whether the target host after the migration has become the new hotspot host.

[0052] Exemplarily, after migrating the current virtual machine of the current hotspot host to the target host, the method also includes: obtaining verification performance data of the current hotspot host and the target host after migration, respectively; verifying the current resource usage of the current hotspot host and the target host after migration according to the hotspot host judgment strategy and the verification performance data; and determining the current migration status of the current host group based on the verification results.

[0053] The verification performance data of the current hotspot host refers to the performance data of the current hotspot host after the current virtual machine migration. The verification performance data of the target host refers to the performance data of the target host after the current virtual machine migration. The verification performance data includes memory verification performance data and processor verification performance data.

[0054] Memory verification performance data may include memory verification usage, memory verification allocation rate, and total memory. Memory verification usage refers to the memory usage of the current hotspot host or the target host after the current virtual machine migration. Memory verification allocation rate refers to the memory allocation rate of the current hotspot host or the target host after the current virtual machine migration.

[0055] Processor verification performance data may include processor verification utilization, processor verification allocation rate, and total processor count. The processor verification utilization rate refers to the CPU utilization rate of the current hotspot host or the CPU utilization rate of the target host after the current virtual machine migration. The processor verification allocation rate refers to the CPU allocation rate of the current hotspot host or the CPU allocation rate of the target host after the current virtual machine migration.

[0056] Current resource usage refers to the resource usage of the current hotspot host or target host after the current virtual machine migration. The verification result can be either successful or unsuccessful. Success means that after the current virtual machine migration, neither the current hotspot host nor the target host is a hotspot host. Failure means that after the current virtual machine migration, the current hotspot host and / or the target host is a hotspot host.

[0057] The current migration state can represent the progress of the virtual machine migration. For example, the current migration state can be a migration-completed state or a migration-in-progress state. The migration-completed state can indicate that the virtual machine migration has been completed. The migration-in-progress state can indicate that the virtual machine migration is incomplete and requires re-migration.

[0058] Specifically, after the current virtual machine migration is performed, the verification performance data of the current hotspot host and the verification performance data of the target host are obtained; based on the hotspot host judgment policy and the verification performance data of the current hotspot host, the current resource usage of the current hotspot host after the migration is verified, and based on the hotspot host judgment policy and the verification performance data of the target host, the current resource usage of the target host after the migration is verified; based on the verification results of the current hotspot host and the verification results of the target host, the current host migration status is determined.

[0059] It can be understood that by verifying the current hotspot host and target host after migration, the current migration status is determined based on the verification results to ensure the accuracy and effectiveness of the virtual machine migration within the current host group, ensure the elimination of hotspots within the current host group, and further improve the performance of each candidate host in the current host group.

[0060] Example 2

[0061] Figure 2 This is a flowchart of a virtual machine migration method provided in the second embodiment of the present invention. Based on the above embodiments, this embodiment further refines the operation of "determining the target host machine based on the current performance weight and the current performance data corresponding to the non-current hotspot host in the current host group" into "using other candidate host machines in the current host group except the current hotspot host as reference host machines; determining the current resource usage data of the corresponding reference host machine based on the current performance weight and the current performance data of the reference host machine, and determining the target host machine based on the current resource usage data" to improve the determination mechanism of the target host machine. It should be noted that for the parts not described in detail in the embodiments of the present invention, please refer to the description of other embodiments.

[0062] See also Figure 2 The virtual machine migration method shown includes:

[0063] S210: Obtain current performance data of each candidate host in the current host group, and determine whether there is a current hotspot host in the current host group based on the current performance data and a preset hotspot host judgment strategy.

[0064] S220: If so, determine the current performance weight according to the hotspot host judgment strategy and the current performance data of the current hotspot host.

[0065] S230: Use other candidate hosts in the current host group except the current hotspot host as reference hosts.

[0066] The reference host refers to a candidate host in the current host group that is not the current hotspot host.

[0067] S240 : Determine current resource usage data of the corresponding reference host machine based on the current performance weight and the current performance data of the reference host machine, and determine a target host machine based on the current resource usage data.

[0068] The current resource usage data may represent resource usage of the reference host machine.

[0069] Exemplarily, the current resource usage data of the corresponding reference host machine is determined based on the current processor weight, the current memory weight, the current memory usage rate, and the current processor usage rate of each reference host machine.

[0070] In an optional embodiment, determining the target host machine based on the current resource usage data includes: sorting the reference host machines based on the current resource usage data to obtain a sorting result, and determining the target host machine from the reference host machines based on the sorting result.

[0071] Specifically, the reference host machines are sorted from smallest to largest according to the current resource usage data to obtain a sorting result, and the reference host machine corresponding to the smallest current resource usage data is used as the target host machine.

[0072] It can be understood that by sorting the corresponding reference hosts according to the current resource usage data and then determining the target host, the accuracy of the determined target host is improved.

[0073] S250: Migrate the current virtual machine of the current hotspot host to the target host.

[0074] An embodiment of the present invention provides a virtual machine migration solution, which refines the target host operation by determining the target host based on the current performance weight and the current performance data corresponding to the non-current hotspot hosts in the current host group, and uses other candidate hosts in the current host group, except the current hotspot host, as reference hosts; determines the current resource usage data of the corresponding reference host based on the current performance weight and the current performance data of the reference host, and determines the target host based on the current resource usage data, thereby improving the target host determination mechanism. The above solution improves the accuracy of the determined target host by determining the current resource usage data of the corresponding reference host based on the current performance weight and the current performance data of the reference host, and then determining the target host.

[0075] Example 3

[0076] The embodiment of the present invention provides an optional example based on the above embodiment. It should be noted that for parts not described in detail in the embodiment of the present invention, reference can be made to the descriptions of other embodiments.

[0077] For example, at the Infrastructure as a Service (IaaS) level, virtual machines over-allocate CPUs (Central Processing Units), and actual CPU usage may be too high, leading to CPU contention between virtual machines and affecting business performance. The same applies to memory. On the other hand, when no new virtual machines are issued, if the operation and maintenance personnel do not manually migrate the virtual machines on the existing nodes to the newly added computing nodes, the resources on the newly expanded computing nodes will be wasted. Manual migration of virtual machines is inefficient and prone to errors, resulting in uneven deployment, with some computing nodes having a high deployment density and a concentration risk.

[0078] The embodiment of the present invention is based on the resource utilization of computing nodes (i.e., candidate hosts) within a host group (i.e., the current host group). First, hotspot rules (i.e., hotspot host judgment strategies) are configured in the host group dimension according to the business deployment situation to identify hotspots, and then hotspots are eliminated through hot migration capabilities, thereby overcoming the shortcomings of manual migration of virtual machines in the existing technology, such as prone to errors, low efficiency, and uneven deployment.

[0079] In order to solve the negative impact of hot spots on services, the embodiment of the present invention implements a method for quickly identifying and eliminating hot spots based on the utilization of computing nodes in a host group.

[0080] For example, to achieve overall resource pool utilization awareness, we first build a cloud monitoring system, using products such as Prometheus to store collected cloud platform node performance data as a data source. Performance data includes CPU usage / allocation rate / total amount, memory usage / allocation rate / total amount, etc.

[0081] For example, local hot spots are discovered (i.e., the current hot spot host is determined). A hot spot rule management system is established to meet the diverse needs of hot spot identification and the sensitivity setting requirements of different host groups for hot spots, so as to achieve on-demand management and control. The hot spot rule management system should have default rules. For example, if the current processor usage of the candidate host in the last 5 minutes is greater than the preset first usage threshold (such as 50%), and exceeds the preset average usage threshold (such as 20%) of the average usage of the current host group, it is identified as a host with a higher load, that is, the current hot spot host. In addition, taking ease of use into consideration, an easy-to-apply rule framework (i.e., hot spot policy basic framework) is formulated for hot spot sensitivity levels, hot spot categories, etc. based on the business deployment situation within the current host group, including rule templates that can be directly applied. In addition, the hotspot rule management system should establish general and special hotspot rules. For example, the default template calculates that if the current processor usage of the candidate host machine continuously (for 10 consecutive minutes or more than 3 times within a week) exceeds the preset second usage threshold (such as 80%), the current processor allocation rate exceeds the preset allocation rate threshold (such as 60%), or the storage allocation rate exceeds the preset storage allocation rate threshold (such as 65%), and the virtual machine hot migration cannot completely solve the problem, the application and data center should be notified to evaluate the expansion plan. The embodiment of the present invention does not impose any restrictions on the size of the preset first usage threshold, the preset average usage threshold, the preset second usage threshold, the preset allocation rate threshold, and the preset storage allocation rate threshold. They can be set by technicians based on experience or needs, or repeatedly determined through a large number of experiments.

[0082] Specifically, we can first determine the hotspot policy basic framework based on the hotspot sensitivity level and hotspot category, then determine the thresholds corresponding to different situations in the hotspot policy basic framework based on historical performance data, and finally fill in the hotspot policy basic framework according to the thresholds to obtain the hotspot host judgment strategy.

[0083] Exemplarily, relatively idle computing nodes are identified, that is, the target host is determined. CPU and memory are important measurement dimensions of host resource usage. The two parameters are independent of each other. Users can set the CPU weight (i.e., current processor weight) and current memory weight according to actual usage. The sum of the two weights is 1. For example, when the CPU weight is set to 1 and the current memory weight is set to 0, it means that the automatic load balancing method only determines whether the computing node needs automatic load balancing based on the CPU usage of the computing node. Obtain the current processor usage and current memory usage of all reference hosts, perform weighted summation of the current processor usage and current memory usage according to the set weight value to obtain the current resource usage data, and then sort the corresponding reference hosts according to the current resource usage data to obtain the resource usage of all reference hosts in the current range. The reference host with the lowest resource usage is the recommended virtual machine migration target, that is, the target host.

[0084] For example, hot spots are eliminated. Combined with the current hot spot host found in step 2 and the target host machine for migration obtained in step 3, virtual machines are migrated one by one. After completing the migration of one or more virtual machines, whether the hot spot rules are met is re-determined, and the host machine with the lowest resource usage is recalculated to achieve automatic load balancing, one or more of which is determined by the set parameters (the number of automatic load balancing processes), that is, the number of current virtual machines migrated can be automatically defined. In addition, considering that there are some important or special virtual machines in the cloud environment that do not want to change their host machines, they can be set as exceptions, and the exceptional virtual machines will not be processed when their host machines require automatic load balancing.

[0085] By using the hotspot identification and elimination method proposed in the embodiment of the present invention, hotspot perception capabilities and virtual machine automatic balanced migration capabilities are built at the infrastructure as a service layer, so that the resource utilization of the host machines in the host group can be balanced quickly and efficiently, thereby improving the resource utilization of the computing nodes in the cloud computing environment.

[0086] It should be noted that the information collected in the embodiments of the present invention is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data comply with the relevant laws, regulations and standards of relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse; if the user chooses to refuse, the expert decision-making process will be entered.

[0087] Example 4

[0088] Figure 3This is a schematic diagram of the structure of a virtual machine migration device provided in Example 4 of the present invention. This embodiment is applicable to the automated implementation of virtual machine migration between hot hosts and idle hosts within a host group. The method can be performed by a virtual machine migration device, which can be implemented in software and / or hardware and can be configured in an electronic device that carries the virtual machine migration function.

[0089] like Figure 3 As shown, the device includes: a current hotspot host determination module 310, a current performance weight determination module 320 and a virtual machine migration module 330.

[0090] The current hot host determination module 310 is used to obtain the current performance data of each candidate host in the current host group, and determine whether there is a current hot host in the current host group based on the current performance data and a preset hot host judgment strategy;

[0091] a current performance weight determination module 320 for determining the current performance weight, if any, based on the hotspot host determination strategy and the current performance data of the current hotspot host;

[0092] The virtual machine migration module 330 is configured to determine a target host machine according to the current performance weight and the current performance data corresponding to the non-current hotspot host in the current host group, and migrate the current virtual machine of the current hotspot host to the target host machine.

[0093] An embodiment of the present invention provides a virtual machine migration solution, which obtains the current performance data of each candidate host in the current host group, and determines whether there is a current hotspot host in the current host group based on the current performance data and a preset hotspot host judgment policy; if there is, the current performance weight is determined based on the hotspot host judgment policy and the current performance data of the current hotspot host; the target host is determined based on the current performance weight and the current performance data corresponding to the non-current hotspot hosts in the current host group, and the current virtual machine of the current hotspot host is migrated to the target host. The above solution determines the current hotspot host in the current host group based on the current performance data and a preset hotspot host judgment policy, determines the current performance data of the current hotspot host, and determines the target host from other candidate hosts in the current host group except the current hotspot host based on the current performance data, so as to realize the migration of the current virtual machine of the current hotspot host to the target host, that is, realizes the resource migration between the current hotspot host and the target host, automatically realizes the virtual machine migration between different hosts in the host group, improves the migration efficiency of the virtual machine, and improves the accuracy of the virtual machine migration.

[0094] Optionally, the virtual machine migration module 330 includes:

[0095] a reference host determining unit, configured to use other candidate hosts in the current host group except the current hotspot host as reference hosts;

[0096] The target host machine determining unit is configured to determine the current resource usage data of the corresponding reference host machine according to the current performance weight and the current performance data of the reference host machine, and determine the target host machine according to the current resource usage data.

[0097] Optionally, the target host determination unit is specifically configured to:

[0098] The reference host machines are sorted according to the current resource usage data to obtain a sorting result, and the target host machine is determined from the reference host machines according to the sorting result.

[0099] Optionally, the current performance weight determination module 320 is specifically configured to:

[0100] Determining current hotspot key data of the current hotspot host according to the hotspot host judgment strategy and current performance data of the current hotspot host;

[0101] According to the current hotspot key data, the current performance weight of the current hotspot host is determined; wherein the current performance weight includes the current processor weight and the current memory weight.

[0102] Optionally, after migrating the current virtual machine of the current hotspot host to the target host, the apparatus further includes:

[0103] Verification performance data acquisition module, used to obtain verification performance data of the current hotspot host and the target host after migration respectively;

[0104] A verification module, configured to verify the current resource usage of the current hotspot host and the target host after migration according to the hotspot host judgment strategy and the verification performance data;

[0105] The current migration state determination module is used to determine the current migration state of the current host group according to the verification result.

[0106] Optionally, the hotspot host determination strategy is determined based on the following means:

[0107] A data acquisition module, configured to acquire historical performance data and historical service processing data of each candidate host in the current host group;

[0108] The strategy determination module is used to determine the hotspot strategy basic framework according to the historical business processing data, and to determine the hotspot host judgment strategy according to the historical performance data and the hotspot strategy basic framework.

[0109] The virtual machine migration device provided in the embodiment of the present invention can execute the virtual machine migration method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing each virtual machine migration method.

[0110] In the technical solution of the present invention, the collection, storage, use, processing, transmission, provision and disclosure of current performance data, verification performance data, historical performance data and historical business processing data, etc., all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0111] According to an embodiment of the present invention, the present invention further provides an electronic device, a readable storage medium and a computer program product.

[0112] Example 5

[0113] Figure 4 4 is a structural diagram of an electronic device for implementing a virtual machine migration method provided in Example 5 of the present invention. The electronic device 410 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0114] like Figure 4 As shown, the electronic device 410 includes at least one processor 411, and a memory connected to the at least one processor 411, such as a read-only memory (ROM) 412, a random access memory (RAM) 413, etc., wherein the memory stores a computer program that can be executed by the at least one processor, and the processor 411 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 412 or the computer program loaded from the storage unit 418 to the random access memory (RAM) 413. Various programs and data required for the operation of the electronic device 410 can also be stored in the RAM 413. The processor 411, ROM 412 and RAM 413 are connected to each other via a bus 414. An input / output (I / O) interface 415 is also connected to the bus 414.

[0115] Multiple components in electronic device 410 are connected to I / O interface 415, including an input unit 416, such as a keyboard, mouse, etc.; an output unit 417, such as various types of displays, speakers, etc.; a storage unit 418, such as a magnetic disk, optical disk, etc.; and a communication unit 419, such as a network card, modem, wireless communication transceiver, etc. The communication unit 419 allows electronic device 410 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0116] Processor 411 can be various general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of processor 411 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. Processor 411 executes the various methods and processes described above, such as the virtual machine migration method.

[0117] In some embodiments, the virtual machine migration method may be implemented as a computer program that is tangibly contained in a computer-readable storage medium, such as storage unit 418. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 410 via ROM 412 and / or communication unit 419. When the computer program is loaded into RAM 413 and executed by processor 411, one or more steps of the virtual machine migration method described above may be performed. Alternatively, in other embodiments, processor 411 may be configured to perform the virtual machine migration method in any other appropriate manner (e.g., by means of firmware).

[0118] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0119] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0120] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0121] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0122] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0123] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0124] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0125] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A virtual machine migration method, characterized in that: include: Obtaining current performance data of each candidate host in the current host group, and determining whether there is a current hot host in the current host group based on the current performance data and a preset hot host judgment strategy; If so, determining the current performance weight according to the hotspot host judgment strategy and the current performance data of the current hotspot host; A target host is determined according to the current performance weight and current performance data corresponding to non-current hotspot hosts in the current host group, and the current virtual machine of the current hotspot host is migrated to the target host.

2. The method according to claim 1, characterized in that The determining the target host according to the current performance weight and the current performance data corresponding to the non-current hotspot hosts in the current host group includes: Using other candidate hosts in the current host group except the current hotspot host as reference hosts; The current resource usage data of the corresponding reference host is determined according to the current performance weight and the current performance data of the reference host, and the target host is determined according to the current resource usage data.

3. The method according to claim 2, characterized in that The determining the target host machine according to the current resource usage data includes: The reference host machines are sorted according to the current resource usage data to obtain a sorting result, and the target host machine is determined from the reference host machines according to the sorting result.

4. The method according to claim 1, wherein The determining of the current performance weight according to the hotspot host judgment strategy and the current performance data of the current hotspot host includes: Determining current hotspot key data of the current hotspot host according to the hotspot host judgment strategy and current performance data of the current hotspot host; According to the current hotspot key data, the current performance weight of the current hotspot host is determined; wherein the current performance weight includes the current processor weight and the current memory weight.

5. The method according to claim 1, wherein After migrating the current virtual machine of the current hotspot host to the target host, the method further includes: Obtain verification performance data for the current hotspot host and the target host after migration respectively; Verifying the current resource usage of the current hotspot host and the target host after migration according to the hotspot host judgment strategy and the verification performance data; According to the verification result, the current migration status of the current host group is determined.

6. The method according to any one of claims 1 to 5, characterized in that The hotspot host determination strategy is determined based on the following method: Obtaining historical performance data and historical business processing data of each candidate host in the current host group; A hotspot strategy basic framework is determined based on the historical business processing data, and the hotspot host judgment strategy is determined based on the historical performance data and the hotspot strategy basic framework.

7. A virtual machine migration device, characterized in that: include: A current hotspot host determination module is used to obtain current performance data of each candidate host in the current host group, and determine whether there is a current hotspot host in the current host group based on the current performance data and a preset hotspot host judgment strategy; a current performance weight determination module, configured to determine the current performance weight, if any, based on the hotspot host judgment strategy and the current performance data of the current hotspot host; The virtual machine migration module is used to determine the target host machine according to the current performance weight and the current performance data corresponding to the non-current hotspot host in the current host group, and migrate the current virtual machine of the current hotspot host to the target host machine.

8. An electronic device, characterized in that: include: one or more processors; a memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement a virtual machine migration method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a virtual machine migration method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program / instruction, wherein when the computer program / instruction is executed by a processor, the steps of the virtual machine migration method according to any one of claims 1 to 6 are implemented.