+

CN112711461B - A virtual machine migration method and related equipment - Google Patents

A virtual machine migration method and related equipment Download PDF

Info

Publication number
CN112711461B
CN112711461B CN202011126630.5A CN202011126630A CN112711461B CN 112711461 B CN112711461 B CN 112711461B CN 202011126630 A CN202011126630 A CN 202011126630A CN 112711461 B CN112711461 B CN 112711461B
Authority
CN
China
Prior art keywords
virtual machine
machine
physical
migration
virtual
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011126630.5A
Other languages
Chinese (zh)
Other versions
CN112711461A (en
Inventor
张振中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Cloud Computing Technologies Co Ltd
Original Assignee
Huawei Cloud Computing Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Cloud Computing Technologies Co Ltd filed Critical Huawei Cloud Computing Technologies Co Ltd
Priority to PCT/CN2020/123302 priority Critical patent/WO2021078256A1/en
Publication of CN112711461A publication Critical patent/CN112711461A/en
Application granted granted Critical
Publication of CN112711461B publication Critical patent/CN112711461B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • G06Q10/06393Score-carding, benchmarking or key performance indicator [KPI] analysis
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Educational Administration (AREA)
  • Development Economics (AREA)
  • General Engineering & Computer Science (AREA)
  • Game Theory and Decision Science (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Stored Programmes (AREA)

Abstract

本申请提供一种虚拟机迁移方法及相关设备。其中,该方法包括:迁移管理控制器提供配置界面,所述配置界面用于提示用户输入预设条件,所述预设条件用于对资源池中的虚拟机迁移方式进行约束;该迁移管理控制器从所述配置界面获取所述预设条件,根据所述预设条件和所述资源池中的虚拟机相关信息确定虚拟机迁移序列;该迁移管理控制器根据所述虚拟机迁移序列对所述资源池中的虚拟机进行迁移。上述方法能够保证在考虑多种调度目标下进行虚拟机的动态迁移,实现多目标优化。

The present application provides a virtual machine migration method and related equipment. The method includes: a migration management controller provides a configuration interface, the configuration interface is used to prompt a user to input preset conditions, and the preset conditions are used to constrain the migration mode of virtual machines in a resource pool; the migration management controller obtains the preset conditions from the configuration interface, and determines the virtual machine migration sequence according to the preset conditions and the virtual machine related information in the resource pool; the migration management controller migrates the virtual machines in the resource pool according to the virtual machine migration sequence. The above method can ensure dynamic migration of virtual machines under consideration of multiple scheduling objectives, and realize multi-objective optimization.

Description

Virtual machine migration method and related equipment
Technical Field
The invention relates to the technical field of cloud computing, in particular to a virtual machine migration method and related equipment.
Background
Cloud computing has gained widespread attention in the scientific and industrial world as an emerging industry in recent years. The cloud computing is largely divided into three types, infrastructure as a service (IaaS), platform as a service (platform AS A SERVICE, paaS), software as a service (software AS A SERVICE, saaS). In an infrastructure as a service cloud computing environment, the proper placement of Virtual Machines (VMs) has been a core problem.
In addition, in the cloud computing environment of infrastructure as a service type, the demands of virtual machines purchased by users are different from each other, and the load characteristics shown by the users are different from each other, and three types of classification methods are the most common, namely, central processing unit (central processing unit, CPU) intensive, disk input/output (I/O) intensive and network intensive. If the virtual machines carried on the same physical machine are of the same type, for example, are CPU intensive, the virtual machines compete for CPU resources, and other resources (such as memory, network, etc.) are low in utilization, so that the service quality is reduced due to the competition of the virtual machines for CPU resources, and meanwhile, the resource waste is caused due to the low utilization rate of the whole resources, and unnecessary energy consumption is generated. Thus, to avoid this, it is necessary to dynamically migrate the virtual machine so that the overall resource utilization is improved and other metrics are optimized.
At present, some problems exist in the dynamic scheduling technology of the virtual machine in the cloud computing environment, so that after the virtual machine is migrated, the problems still exist, and the performance index is not fully optimized. The scheduling targets (i.e., optimization targets) considered by the existing virtual machine scheduling schemes are relatively single, such as scheduling only considering load balancing, scheduling only considering resource utilization, or scheduling only considering virtual machine affinity (network affinity).
Disclosure of Invention
The embodiment of the invention discloses a virtual machine migration method and related equipment, which can dynamically schedule a virtual machine under the consideration of various scheduling targets to realize multi-target optimization.
The virtual machine migration method comprises the steps that a migration management controller provides a configuration interface, the configuration interface is used for prompting a user to input preset conditions, the preset conditions are used for restraining virtual machine migration modes in a resource pool, the migration management controller obtains the preset conditions from the configuration interface, a virtual machine migration sequence is determined according to the preset conditions and virtual machine related information in the resource pool, and the migration management controller migrates virtual machines in the resource pool according to the virtual machine migration sequence.
In the scheme provided by the application, the user directly inputs the preset condition on the configuration interface provided by the migration management controller, so that the migration management controller determines the virtual machine migration sequence according to the preset condition input by the user and the related information of the virtual machine in the resource pool, thereby realizing that the virtual machine meets the preset condition in the migration process and realizing multi-objective optimization.
With reference to the first aspect, in one possible implementation manner of the first aspect, the preset condition includes a physical machine cluster where a virtual machine to be migrated is located, a target weight to be optimized, a virtual machine incapable of being migrated, and a physical machine with priority to be migrated, where the target to be optimized includes a virtual machine resource utilization, a physical machine load balancing value, and a virtual machine migration overhead.
In the scheme provided by the application, a user can ensure that the migration management controller migrates the virtual machines in the resource pool according to the requirement by setting the preset condition, ensures that the virtual machines meet the service requirement in the migration process, and can realize multi-objective optimization.
With reference to the first aspect, in one possible implementation manner of the first aspect, the information related to the virtual machine in the resource pool includes current location information and state information of the virtual machine, where the current location information is used to indicate a physical machine to which the current virtual machine belongs, the state information includes a resource demand of the virtual machine, a resource usage of the virtual machine, and a resource allowance of the physical machine in which the virtual machine is located, the migration management controller generates a plurality of candidate location information according to the current location information, the migration management controller selects target location information from the plurality of candidate location information according to the state information, where the virtual machine in the resource pool has a highest comprehensive score of a virtual machine resource utilization rate, a virtual machine migration overhead, and a physical machine load balancing value of the resource pool when the virtual machine in the resource pool is distributed on the physical machine in the resource pool according to the target location information, and the migration management controller determines a virtual machine migration sequence according to the target location information.
According to the scheme provided by the application, the migration management controller acquires a plurality of candidate position information according to the current position information of the virtual machine, wherein the virtual machine in the resource pool migrates from the current position to a plurality of different virtual machine migration schemes corresponding to different candidate positions, the migration management controller scores a plurality of different virtual machine migration schemes corresponding to the plurality of candidate position information according to the resource demand of the virtual machine, the resource usage of the virtual machine and the resource allowance of the physical machine where the virtual machine is located in the different virtual machine migration schemes, and selects the candidate position corresponding to the highest comprehensive score of the virtual machine resource utilization rate, the virtual machine migration cost and the physical machine load balancing value, so that the target position information is determined in the plurality of candidate position information, the finally selected target position information can be ensured to improve the virtual machine resource utilization rate, ensure the load balancing and reduce the migration cost, and realize the multi-objective optimization of the virtual machine migration.
Optionally, the migration management controller randomly acquires a plurality of candidate location information according to the current location information of the virtual machine, wherein the number of candidate location information is, for example, 1000 or more than 1000.
With reference to the first aspect, in one possible implementation manner of the first aspect, the migration management controller inputs the plurality of candidate location information and the state information into a comprehensive scoring function to obtain a comprehensive score, and when the comprehensive score meets a threshold condition, the migration management controller takes the candidate location information corresponding to the comprehensive score meeting the threshold condition as the target location information.
Alternatively, the threshold condition may be set as desired, for example, may be set to 0.85.
In the scheme provided by the application, the migration management controller calculates the plurality of candidate position information by utilizing the comprehensive scoring function, compares the calculation result with the threshold value, and selects the candidate position information meeting the threshold value as the target position information, so that the plurality of candidate position information can be rapidly screened, and the target position information can be found.
With reference to the first aspect, in one possible implementation manner of the first aspect, when the comprehensive score does not meet the threshold condition, the migration management controller selects candidate position information closest to the threshold condition from candidate position information corresponding to the comprehensive score which does not meet the threshold condition as parent candidate position information, and the migration management controller performs genetic algorithm processing on the parent candidate position information, inputs a processing result into the comprehensive score function until the comprehensive score output by the comprehensive score function meets the threshold condition, and uses candidate position information corresponding to the comprehensive score which meets the threshold condition as the target position information.
In the scheme provided by the application, when the candidate position information meeting the threshold condition is not found, the migration management controller takes the candidate position information closest to the threshold condition as parent candidate position information and carries out genetic algorithm processing, and the target position information meeting the threshold condition is finally determined through continuous iteration. In this way, it can be ensured that the finally selected target position information can be optimized for multiple targets.
With reference to the first aspect, in one possible implementation manner of the first aspect, the composite score includes a virtual machine resource utilization score, a virtual machine migration overhead score, and a physical machine load balancing value score, and the composite scoring function is:
F(x)=Wu·Fu(x)+Wb·Fb(x)+Wm·Fm(x)
The method comprises the steps of determining a virtual machine resource utilization rate scoring function, wherein F u (x) is a virtual machine resource utilization rate scoring function, W u is a weight corresponding to F u (x), F b (x) is a physical machine load balancing value scoring function, W b is a weight corresponding to F b (x), F m (x) is a virtual machine migration overhead scoring function, and W m is a weight corresponding to F m (x). Alternatively, the weights of the respective sub-scoring functions are obtained from empirical values.
In the scheme provided by the application, the comprehensive scoring function is formed by multiplying each sub scoring function by each weight, so that the target position information determined from multiple dimensions can be ensured to improve the resource utilization rate of the virtual machine, ensure load balancing, reduce migration overhead and realize multi-target optimization.
With reference to the first aspect, in one possible implementation manner of the first aspect, the resource requirement of the virtual machine includes a processor requirement, a memory requirement, and a network requirement of the virtual machine, the resource quota of the physical machine includes a processor quota, a memory quota, and a network quota of the physical machine, and the virtual machine resource utilization scoring function is:
Wherein the said Processor demand for virtual machines, saidProcessor quota for physical machine where virtual machine is located, the method comprises the steps ofIs the memory demand of the virtual machine, the followingMemory allowance for the physical machine in which the virtual machine is located; the saidNetwork demand for virtual machines, theAnd n is the number of the physical machines in the resource pool.
In the scheme provided by the application, the resource utilization rate is embodied by utilizing the square sum of the utilization rates of the processor resource, the memory resource and the network resource, so that the comprehensive credibility of the resource utilization rate scoring function is ensured.
With reference to the first aspect, in a possible implementation manner of the first aspect, the physical machine load balancing value scoring function is:
Wherein the said Processor utilization for a physical machine, theAverage utilization rate of the processor of the physical machine in the resource poolIs the memory utilization rate of the physical machine, theAverage utilization rate of memory of physical machines in the resource pool, wherein the memory is the same as that of the physical machines in the resource poolNetwork utilization of the physical machine is thatAnd (3) the network average utilization rate of the physical machines in the resource pool.
In the scheme provided by the application, the load balancing is realized through the mean square error of the processor utilization rate, the memory utilization rate and the network utilization rate of each physical machine, so that the calculated load balancing value is more accurate, and the comprehensive scoring function is more accurate.
With reference to the first aspect, in one possible implementation manner of the first aspect, the resource requirement of the virtual machine includes a virtual machine memory requirement, and the virtual machine migration overhead scoring function is:
Wherein the said The method is characterized in that t i is used for indicating whether the virtual machine needs to be migrated from the located physical machine to another physical machine or not, when the value of t i is 0 or 1 and t i is 0, the virtual machine does not need to be migrated from the located physical machine to another physical machine, when t i is 1, the virtual machine needs to be migrated from the located physical machine to another physical machine, and M is the number of the virtual machines in the resource pool.
In the scheme provided by the application, the migration cost is embodied through the memory quantity of the virtual machines needing to be migrated, and when the more the virtual machines needing to be migrated are, the smaller F m (x) is calculated, and the migration cost value can be efficiently and quickly obtained by utilizing the virtual machine migration cost scoring function.
With reference to the first aspect, in a possible implementation manner of the first aspect, the configuration interface is further configured to prompt a user to input a virtual machine migration period, and the virtual machines in the resource pool perform periodic migration according to the virtual machine migration period.
In the scheme provided by the application, the user can ensure that the virtual machine distribution can be periodically updated by setting the virtual machine migration period to enable the migration management controller to periodically execute the virtual machine migration operation, thereby improving the resource utilization rate of the virtual machine and realizing multi-objective optimization. Optionally, the user may also manually trigger the migration management controller to perform the virtual machine migration operation.
In a second aspect, the application provides a computing device, which comprises a display module, a processing module and a migration module, wherein the display module is used for providing a configuration interface, the configuration interface is used for prompting a user to input preset conditions, the preset conditions are used for restraining virtual machine migration modes in a resource pool, the processing module is used for acquiring the preset conditions from the configuration interface, determining a virtual machine migration sequence according to the preset conditions and virtual machine related information in the resource pool, and the migration module is used for migrating virtual machines in the resource pool according to the virtual machine migration sequence.
With reference to the second aspect, in one possible implementation manner of the second aspect, the preset condition includes a physical machine cluster where a virtual machine to be migrated is located, a target weight to be optimized, a virtual machine incapable of being migrated, and a physical machine with priority to be migrated, where the target to be optimized includes a virtual machine resource utilization, a physical machine load balancing value, and a virtual machine migration overhead.
With reference to the second aspect, in one possible implementation manner of the second aspect, the virtual machine related information in the resource pool includes current location information of a virtual machine and status information, where the current location information is used to indicate a physical machine to which the current virtual machine belongs, the status information includes a resource demand of the virtual machine, a resource usage of the virtual machine, and a resource allowance of the physical machine to which the virtual machine belongs, and the processing module is specifically configured to generate a plurality of candidate location information according to the current location information, select target location information from the plurality of candidate location information according to the status information, where a virtual machine of the resource pool has a highest comprehensive score of a virtual machine resource utilization rate, a virtual machine migration overhead, and a physical machine load balancing value of the resource pool when the virtual machine of the resource pool is distributed on the physical machine in the resource pool according to the target location information, and determine a virtual machine migration sequence according to the target location information.
With reference to the second aspect, in a possible implementation manner of the second aspect, the processing module is further configured to input the plurality of candidate location information and the state information into a comprehensive scoring function respectively to obtain a comprehensive score, and when the comprehensive score meets a threshold condition, take candidate location information corresponding to the comprehensive score meeting the threshold condition as the target location information.
With reference to the second aspect, in a possible implementation manner of the second aspect, the processing module is further configured to select, when the composite score does not meet the threshold condition, candidate location information closest to the threshold condition from candidate location information corresponding to the composite score that does not meet the threshold condition as parent candidate location information, perform genetic algorithm processing on the parent candidate location information, and input a processing result into the composite score function until the composite score output by the composite score function meets the threshold condition, and use candidate location information corresponding to the composite score that meets the threshold condition as the target location information.
With reference to the second aspect, in one possible implementation manner of the second aspect, the composite score includes a virtual machine resource utilization score, a virtual machine migration overhead score, and a physical machine load balancing value score, and the composite scoring function is:
F(x)=Wu·Fu(x)+Wb·Fb(x)+Wm·Fm(x)
The method comprises the steps of determining a virtual machine resource utilization rate scoring function, wherein F u (x) is a virtual machine resource utilization rate scoring function, W u is a weight corresponding to F u (x), F b (x) is a physical machine load balancing value scoring function, W b is a weight corresponding to F b (x), F m (x) is a virtual machine migration overhead scoring function, and W m is a weight corresponding to F m (x).
With reference to the second aspect, in one possible implementation manner of the second aspect, the resource requirement of the virtual machine includes a processor requirement, a memory requirement, and a network requirement of the virtual machine, and the resource quota of the physical machine includes a processor quota, a memory quota, and a network quota of the physical machine, and the virtual machine resource utilization scoring function is:
Wherein the said Processor demand for virtual machines, saidProcessor quota for physical machine where virtual machine is located, the method comprises the steps ofIs the memory demand of the virtual machine, the followingMemory allowance for the physical machine in which the virtual machine is located; the saidNetwork demand for virtual machines, theAnd n is the number of the physical machines in the resource pool.
With reference to the second aspect, in a possible implementation manner of the second aspect, the physical machine load balancing value scoring function is:
Wherein the said Processor utilization for a physical machine, theAverage utilization rate of the processor of the physical machine in the resource poolIs the memory utilization rate of the physical machine, theAverage utilization rate of memory of physical machines in the resource pool, wherein the memory is the same as that of the physical machines in the resource poolNetwork utilization of the physical machine is thatAnd (3) the network average utilization rate of the physical machines in the resource pool.
With reference to the second aspect, in one possible implementation manner of the second aspect, the resource requirement of the virtual machine includes a virtual machine memory requirement, and the virtual machine migration overhead scoring function is:
Wherein, And t i is used for indicating whether the virtual machine needs to be migrated from the located physical machine to another physical machine or not, when the value of t i is 0 or 1 and t i is 0, the virtual machine does not need to be migrated from the located physical machine to another physical machine, when t i is 1, the virtual machine needs to be migrated from the located physical machine to another physical machine, and M is the number of the virtual machines in the resource pool.
With reference to the second aspect, in a possible implementation manner of the second aspect, the configuration interface is further configured to prompt a user to input a virtual machine migration period, and the virtual machines in the resource pool perform periodic migration according to the virtual machine migration period.
In a third aspect, the present application provides a computing device comprising a processor and a memory for storing program code, the processor for invoking the program code in the memory to perform the method of the first aspect described above and in combination with any implementation of the first aspect described above.
In a fourth aspect, the present application provides a computer readable storage medium storing a computer program, which when executed by a processor, implements the first aspect described above and the flow of the virtual machine migration method provided in connection with any one of the implementations of the first aspect described above.
In a fifth aspect, the present application provides a computer program product comprising instructions which, when executed by a computer, cause the computer to perform the above-described first aspect and the flow of a virtual machine migration method provided in connection with any one of the implementations of the above-described first aspect.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present application;
FIG. 2 is a schematic diagram of a system architecture according to an embodiment of the present application;
FIG. 3 is a schematic structural diagram of a physical machine according to an embodiment of the present application;
FIG. 4 is a schematic flow chart of a virtual machine migration method according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a configuration interface provided by an embodiment of the present application;
FIG. 6A is a schematic diagram of an interface prior to task creation provided by an embodiment of the present application;
FIG. 6B is a schematic diagram of an interface for task creation provided by an embodiment of the present application;
FIG. 6C is a schematic diagram of an interface for performing tasks according to an embodiment of the present application;
FIG. 6D is a schematic diagram of an interface for task queries provided by an embodiment of the present application;
FIG. 7A is a schematic diagram of block encoding of location information according to an embodiment of the present application;
FIG. 7B is a schematic diagram of vector encoding of position information according to an embodiment of the present application;
FIG. 7C is a schematic diagram of yet another embodiment of vector encoding of position information;
FIG. 7D is a schematic diagram of matrix encoding of position information according to an embodiment of the present application;
FIG. 8 is a schematic diagram of candidate location information provided by an embodiment of the present application;
FIG. 9 is a schematic illustration of a hybridization process provided by an embodiment of the present application;
FIG. 10 is a schematic diagram of a virtual machine migration process according to an embodiment of the present application;
FIG. 11 is a schematic diagram of a computing device according to an embodiment of the present application;
FIG. 12 is a schematic diagram of a further computing device provided by an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made more fully hereinafter with reference to the accompanying drawings, in which it is shown, however, only some, but not all embodiments of the application are shown. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
First, some of the expressions and related techniques involved in the present application are explained in conjunction with the drawings so as to be understood by those skilled in the art.
The resource pool is composed of a plurality of virtual machines, the virtual machines in the resource pool can belong to different physical machines, and one or more virtual machines can be operated on one physical machine.
Migration of a virtual machine refers to a change in the physical machine running the virtual machine, e.g., virtual machine a runs on physical machine 1, which now needs to be migrated to physical machine 2, then virtual machine a will run on physical machine 2, and virtual machine a will not exist on physical machine 1.
The genetic algorithm (genetic algorithm) is a randomized search method evolved by referring to the evolution law of the biological world, and is mainly characterized in that the method directly operates a structural object, has no limitation of derivation and function continuity, has inherent hidden property and better global optimizing capability, can automatically acquire and guide an optimized search space by adopting a probabilistic optimizing method, adaptively adjusts the search direction and does not need a determined rule. Genetic algorithms are one general algorithm to solve the search problem, and can be used for various general problems. The common characteristics of the search algorithm are that a group of candidate solutions are firstly formed, the fitness of the candidate solutions is calculated according to certain adaptability conditions, certain candidate solutions are reserved according to the fitness, other candidate solutions are abandoned, and the reserved candidate solutions are operated to generate new candidate solutions. In genetic algorithms, the above-mentioned several features are combined in a special way, based on a parallel search of chromosome clusters, with selection operations, crossover operations and mutation operations of speculative nature.
The application provides a virtual machine migration method, which is executed by a virtual machine migration system, wherein the virtual machine migration system specifically comprises one or more virtual machine monitors, each virtual machine monitor monitors a plurality of virtual machines, and further comprises a migration management controller, wherein the migration management controller enables a user to input preset conditions by providing a configuration interface, and then determines a virtual machine migration sequence according to the preset conditions input by the user and acquired virtual machine related information in a resource pool and completes virtual machine migration. The migration method can ensure that multi-objective optimization is realized in the migration process of the virtual machine.
As shown in fig. 1, the resource pool includes 4 physical machines, namely, physical machine 1, physical machine 2, physical machine 3 and physical machine 4, two virtual machines are deployed on each physical machine, for example, virtual machine 1 (VM 1) and virtual machine 2 (VM 2) are deployed on physical machine 1, and these virtual machines can migrate between different physical machines. For example, virtual machine 1 begins to be deployed on physical machine 1, which may migrate to physical machine 2, and virtual machine 5 begins to be deployed on physical machine 3, which may migrate to physical machine 4.
The virtual machine migration system is used for monitoring the virtual machines in the resource pool, and dynamically migrating the virtual machines according to the monitoring information, so as to realize multi-objective optimization. As shown in fig. 2, the virtual machine migration system 200 includes a migration management controller 210 and 8 physical machines, which are respectively a physical machine a-physical machine H, where the 8 physical machines form a resource pool, each physical machine is configured with a virtual machine monitor, and each physical machine is configured to monitor a virtual machine in the physical machine and report the monitored location information and status information of the virtual machine to the migration management controller 210, and the migration management controller 210 generates a plurality of candidate location information according to the location information and status information of the virtual machine in each physical machine reported by each virtual machine monitor, where each candidate location information corresponds to a virtual machine migration scheme, and determines a target location information meeting a requirement from the candidate location information, so as to optimize a plurality of targets, such as virtual machine resource utilization, migration overhead, load balancing, and the like, in a process of migrating the virtual machine.
Further, the structure of each physical machine is similar, except that the number of virtual machines deployed in each physical machine and the amount of various resources that can be provided are different, and a physical machine a is taken as an example for illustration, and other physical machines are similar to the physical machine a. As shown in fig. 3, the physical machine a includes a hardware structure 2210 and a software structure 2220, the hardware structure 2210 includes a processor 2211 (for providing processor resources), a memory 2212 (for providing memory resources), a network card 2213 (for providing network resources), the software structure 2220 includes an operating system 2221, a virtual machine 2222 (i.e., VM 3), and a virtual machine 2223 (i.e., VM 4), the operating system 2221 includes a virtual machine monitor 22210 for monitoring the virtual machine 2222 and the virtual machine 2223 and acquiring location information and status information of the virtual machine 2222 and the virtual machine 2223, and the virtual machine 2222 and the virtual machine 2223 include virtual processors, virtual memories and virtual network cards of required virtualization.
Based on the foregoing, the following describes a virtual machine migration method and related devices provided by the embodiments of the present application. Referring to fig. 4, fig. 4 is a flow chart of a virtual machine migration method according to an embodiment of the present application. As shown in fig. 4, the method includes, but is not limited to, the steps of:
s401, the migration management controller provides a configuration interface.
Specifically, the migration management controller prompts a user to input preset conditions by providing a configuration interface, and the user inputs the preset conditions based on the configuration interface, wherein the preset conditions are used for restricting the migration mode of the virtual machine in the resource pool.
Optionally, the preset conditions include a physical machine cluster where the virtual machine to be migrated is located, a target weight to be optimized, a virtual machine incapable of being migrated, and a physical machine with priority to be migrated, where the target to be optimized includes a virtual machine resource utilization rate, a physical machine load balancing value, a virtual machine migration overhead, and the like.
As shown in fig. 5, fig. 5 is a schematic diagram of a configuration interface provided by the embodiment of the present application, a user creates a virtual machine migration task based on the configuration interface, the user may select a pod name where a container is located and select a physical machine identifier corresponding to a physical machine cluster involved in virtual machine migration, for example, an identifier corresponding to a physical machine that needs to migrate out of a virtual machine and an identifier corresponding to a physical machine that needs to migrate in, the user selects and sets preset parameters, for example, a physical machine that is preferentially migrated out, a virtual machine that cannot migrate, a virtual machine resource utilization rate, a physical machine load, a virtual machine migration overhead weight, a migration number, and the like, and the user may also select a migration algorithm and an integration algorithm on the configuration interface, so as to display an integration effect (i.e., an effect after virtual machine migration) and display migration step information.
And S402, the migration management controller acquires the preset conditions from the configuration interface.
Specifically, the user may input the preset condition based on the configuration interface shown in fig. 5, and the migration management controller obtains the preset condition input by the user from the configuration interface.
To further illustrate how the migration management controller creates, performs, and queries virtual machine migration tasks, please refer to fig. 6A-6D. Fig. 6A is a schematic diagram of an interface before creating a task, where a defragmentation option on the left side of the interface corresponds to virtual machine migration in the present application, where the option includes two sub-options of a host unit and a task, where the host unit option includes multiple host unit lists, each host unit has a corresponding name, identifier, number of host units, creation time, metadata, etc., and any host unit may be selected to create a defragmentation task, as shown in fig. 6B, after the user selects a host unit, based on a selection interface corresponding to the host unit, input and select a corresponding parameter, such as an integration algorithm, a migration algorithm, a virtual machine resource utilization weight, a virtual machine migration overhead weight, a physical machine load balancing value weight, a virtual machine that cannot be migrated, a physical machine that preferentially migrates empty, etc., and then click a determination button to complete task creation, after the task creation is completed, the migration management controller may run the task, as shown in fig. 6C, including a plurality of task lists in task options, each task having a corresponding task identifier, a host group identifier, status information (normal or error), an initial empty host number, a commit time, and optional operations (e.g., sort, query, pause, retry, delete, etc.), it should be noted that the migration management controller may simultaneously execute a plurality of tasks. In addition, for each task, as shown in fig. 6D, a real-time query may be performed, and for the first task, that is, the task identified as 13e98c72-6fb-465D, clicking the query may query the relevant information of the first task, for example, may query the integration algorithm, the migration algorithm, the number of finally empty hosts, the number of virtual machines to be migrated, the number of memories to be migrated, and the number of CPUs to be migrated corresponding to the first task.
S403, the migration management controller acquires the current position information and the state information of the virtual machine, which are reported by the virtual machine monitor.
In the application, the virtual machine monitor can be any virtual machine monitor deployed in the cloud resource pool. The cloud resource pool comprises a plurality of physical machines, one or more virtual machines are deployed on each physical machine, and a virtual machine monitor is deployed on each physical machine and used for monitoring all virtual machines on the physical machine. The virtual machine monitor can monitor the current position information of the virtual machine and the state information of the virtual machine and the physical machine in real time or periodically, and report the current position information and the state information obtained by monitoring to the migration management controller. After receiving the current position information and the state information reported by all the virtual machine monitors in the cloud resource pool, the migration management controller determines a virtual machine migration strategy and realizes migration of the virtual machines among different physical machines so as to meet the simultaneous optimization of multiple targets, such as improving the resource utilization rate, realizing load balancing, reducing migration overhead, meeting service-level agreements (SLAs) and the like.
Specifically, the migration management controller can determine, through the received current location information, the physical machine to which all virtual machines in the cloud resource pool belong, that is, the correspondence between the current virtual machine and the physical machine has been determined. And the resource demand of each virtual machine, the resource usage of each virtual machine, and the resource quota of each physical machine (i.e., the amount of resources that each physical machine can provide) can be determined by the state information.
Further, the migration management controller may encode the received current location information of the virtual machine. As shown in fig. 7A, the migration management controller performs block encoding on the current location information, i.e., groups virtual machines located on the same physical machine, i.e., groups virtual machine 3 and virtual machine 4, located on physical machine a, groups virtual machine 2, virtual machine 9 and virtual machine 11, located on physical machine D, groups virtual machine 1 and virtual machine 5, and located on physical machine E. Alternatively, the migration management controller may vector-encode the current location information, as shown in fig. 7B, where the Identifier (ID) of the virtual machine is 1,2, 3,4, 5,6, 7, 8, 9, 10, 11, and 12, and the identifier of the physical machine is A, B, C, D, E, F, H. As can be seen from the vector encoding shown in fig. 7B, virtual machines 3 and 4 are located on physical machine a, virtual machine 12 is located on physical machine B, virtual machines 8 and 10 are located on physical machine C, virtual machines 2, 9 and 11 are located on physical machine D, virtual machines 1 and 5 are located on physical machine E, virtual machine 6 is located on physical machine F, and virtual machine 7 is located on physical machine H. For ease of representation, the identity of the physical machine may be simplified, as shown in FIG. 7C, to 1-8. In addition, for the convenience of calculation, the vector code corresponding to the position information may be converted into a matrix-form code. As shown in fig. 7D, the vector codes shown in fig. 7C are codes in a matrix form, and virtual machine deployment conditions can be obtained through the matrix. The number of 1's in each row indicates the number of virtual machines that exist in one physical machine, and 1's in each column indicates on which physical machine the virtual machine having the identifier corresponding to that column is located.
S404, the migration management controller generates a plurality of candidate position information according to the current position information of the virtual machine.
Specifically, the migration management controller may randomly generate a plurality of candidate location information, and encode the plurality of candidate location information in a matrix form to obtain a plurality of migration matrices, where each migration matrix corresponds to one migration policy.
Further, the specification of each migration matrix is consistent, that is, the number of rows and the number of columns of each migration matrix are the same, and they differ by the location of 1, that is, the corresponding (attribution) relationship of the virtual machine and the physical machine is different.
And S405, the migration management controller selects target position information from a plurality of candidate position information according to the state information.
In one possible implementation manner, the migration management controller inputs the plurality of candidate position information and the state information into a comprehensive scoring function to obtain a comprehensive score, and when the comprehensive score meets a threshold condition, the candidate position information corresponding to the comprehensive score meeting the threshold condition is used as target position information.
It should be understood that the state information corresponding to the different candidate position information is not the same, and therefore, the composite score calculated after the input of the composite scoring function is different, and after calculation of each candidate position information, candidate position information satisfying the threshold condition is selected as the target position information. The threshold condition may be set as needed, for example, may be set to 0.85, or may be another value, which is not limited in the present application.
Optionally, the comprehensive score includes a virtual machine resource utilization score, a virtual machine migration overhead score, and a physical machine load balancing value score, and the comprehensive score function is:
F(x)=Wu·Fu(x)+Wb·Fb(x)+Wm·Fm(x)
The method comprises the steps of determining a virtual machine resource utilization rate scoring function, wherein F u (x) is a virtual machine resource utilization rate scoring function, W u is a weight corresponding to F u (x), F b (x) is a physical machine load balancing value scoring function, W b is a weight corresponding to F b (x), F m (x) is a virtual machine migration overhead scoring function, and W m is a weight corresponding to F m (x).
Specifically, the migration management controller evaluates each candidate location information from three targets of virtual machine resource utilization, virtual machine migration overhead and physical machine load balancing, thereby ensuring that the finally selected target location information can simultaneously optimize the three targets. In addition, the concept of weight sum is adopted to realize multi-objective optimization, each sub-scoring function (such as a scoring function of the resource utilization rate of the virtual machine) corresponds to one weight, and a specific value of the weight can be obtained according to an empirical value or can be obtained in other manners, which is not limited by the application.
Further, the resource demand of the virtual machine is the resource required by the virtual machine to run on the physical machine, and mainly includes the processor (CPU) demand, the memory (memory) demand and the network demand (may also be referred to as the bandwidth demand) of the virtual machine, and the resource allowance of the physical machine is the resource that can be provided by the physical machine, and mainly includes the processor allowance, the memory allowance and the network allowance. The virtual machine resource utilization scoring function may be:
Wherein the said For the processor demand of all virtual machines within a physical machine, i.e. the sum of the processor resources required to create all virtual machines within the physical machine,The processor quota of the physical machine where the virtual machine is located, namely the total amount of processor resources which can be provided by the physical machine where the virtual machine is located, is calculated by the processor quota calculation unitFor the memory requirement of all virtual machines in a physical machine, i.e. the sum of the memory resources required for creating all virtual machines in the physical machine, saidThe memory allowance of the physical machine where the virtual machine is located is the total memory resource which can be provided by the physical machine where the virtual machine is located, wherein the memory allowance is the total memory resource which can be provided by the physical machine where the virtual machine is locatedFor network demand of all virtual machines in a physical machine, i.e. creating the sum of network resources required by all virtual machines in the physical machine, saidThe network quota is the network quota of the physical machine where the virtual machine is located, namely the total amount of network resources which can be provided by the physical machine where the virtual machine is located, and n is the number of the physical machines. It should be noted that, when each virtual machine is created, certain processor resources, memory resources and network resources are allocated to ensure that the virtual machine can normally run on the physical machine.
It is easy to understand that the maximization of the utilization rate of the virtual machine resources is embodied by the square sum of the utilization rates of various resources in each physical machine, and in addition, normalization processing is performed, namely division is performed by 3n, and F u (x) obtained through calculation is the utilization rate of the virtual machine resources. It will also be appreciated that for different candidate location information, the parameters corresponding thereto are different, i.eEtc. are different, which ultimately results in a calculated F u (x) that is also different.
By way of example, assume that there are 8 physical machines, identified as 1-8, each with a fixed resource quota, 12 virtual machines, identified as 1-12, and each with a fixed resource demand. As shown in fig. 8, for candidate location information 1, virtual machine 2, and virtual machine 3 are located on physical machine 1, virtual machine 4, virtual machine 6, and virtual machine 11 are located on physical machine 4, virtual machine 8, and virtual machine 12 are located on physical machine 6, virtual machine 5, virtual machine 7, virtual machine 9, and virtual machine 11 are located on physical machine 8, and when calculating F u (x), since there is no virtual machine on physical machine 2, physical machine 3, physical machine 5, and physical machine 7, the virtual machine is a virtual machine0, The memory demand and the network demand are also 0, and the physical machine 1 is provided with a virtual machine 1, a virtual machine 2 and a virtual machine 3The value of (1) is the sum of the processor demand of virtual machine 1, the processor demand of virtual machine 2 and the processor demand of virtual machine 3,For the processor quota of the physical machine 1, the same can calculateAndThe physical machines 4, 6, and 8 may be calculated according to the above method, to finally obtain F u (x) corresponding to the candidate location information 1.
For the candidate position information 2, the virtual machine 3, the virtual machine 5 and the virtual machine 12 are located on the physical machine 2, the virtual machine 6, the virtual machine 7, the virtual machine 8 and the virtual machine 9 are located on the physical machine 3, the virtual machine 1, the virtual machine 4, the virtual machine 10 and the virtual machine 11 are located on the physical machine 7, and the F u (x) corresponding to the candidate position information 2 can be calculated according to the method. For the candidate position information 3, the virtual machine 1, the virtual machine 2 and the virtual machine 7 are located on the physical machine 1, the virtual machine 3, the virtual machine 4 and the virtual machine 8 are located on the physical machine 3, the virtual machine 5 and the virtual machine 6 are located on the physical machine 5, the virtual machine 9, the virtual machine 10, the virtual machine 11 and the virtual machine 12 are located on the physical machine 8, and F u (x) corresponding to the candidate position information 3 is calculated according to the method.
In one possible implementation, the physical machine load balancing value scoring function is:
Wherein, For processor utilization of a physical machine, i.e. the ratio of the processor resources already used by the physical machine to the total amount of processor resources that can be provided by the physical machine, saidThe average utilization rate of the processors of the physical machines in the resource pool is obtained by dividing the average utilization rate of the processors of all the physical machines by the total number of the physical machines after adding; Is the memory utilization rate of the physical machine, namely the ratio of the memory resources already used by the physical machine to the total memory resources which can be provided by the physical machine, the The average utilization rate of the internal memories of the physical machines in the resource pool is obtained by dividing the sum of the utilization rates of the internal memories of all the physical machines by the total number of the physical machines; is the network utilization rate of the physical machine, namely the ratio of the network resources which the physical machine has used to the total amount of the network resources which the physical machine can provide, the And for the network average utilization rate of the physical machines in the resource pool, dividing the network utilization rate of all the physical machines by the total number of the physical machines after adding.
It can be seen that, here, the overall load balancing is embodied by the mean square error of the utilization rate of various resources in each physical machine, and normalization processing is performed, and the calculated F b (x) is the load balancing value. It will be appreciated that for different candidate location information, the parameters corresponding thereto are different, i.eEtc., which ultimately results in the calculated F b (x) being different.
For example, in the candidate location information shown in fig. 8, virtual machines on the same physical machine are not completely identical for different candidate location information, resulting in a resultEtc. are inconsistent, exemplary, candidate position information 1 corresponds toCorresponding to candidate position information 2It is not consistent with each other,And is also inconsistent. Similarly, for other parameters, the candidate location information will also be changed along with the change of the candidate location information, which will not be described again.
In one possible implementation, the virtual machine migration overhead scoring function is:
Wherein, The method comprises the steps of determining the memory demand of a virtual machine, namely the memory resource quantity allocated to the virtual machine by creating the virtual machine, determining whether the virtual machine needs to be migrated from a physical machine to another physical machine or not according to t i, wherein when the value of t i is 0 or 1 and t i is 0, the virtual machine does not need to be migrated from the physical machine to the other physical machine, and when t i is 1, the virtual machine needs to be migrated from the physical machine to the other physical machine, wherein M is the number of the virtual machines in a resource pool.
It should be understood that when migrating a virtual machine, migration overhead needs to be reduced as much as possible, where the minimization of virtual machine migration overhead is mainly reflected by the ratio of the total memory requirement of the virtual machine to be migrated to the total memory requirement of all virtual machines, and the calculated F m (x) is the virtual machine migration overhead. It should be appreciated that for different candidate location information, the virtual machines that need to be migrated are different compared to the current location information, resulting in a different calculated F m (x).
For example, as shown in fig. 8, assuming that the location information shown in fig. 7D is the current location information and the candidate location information 1, the candidate location information 2, and the candidate location information 3 are the migrated location information, the virtual machine to which the candidate location information 2 needs to be migrated with respect to the current location information is inconsistent with the virtual machine to which the candidate location information 3 needs to be migrated with respect to the current location information, and the calculated F m (x) is inconsistent.
In one possible implementation manner, when the comprehensive score does not meet the threshold condition, selecting candidate position information closest to the threshold condition from candidate position information corresponding to the comprehensive score which does not meet the threshold condition as parent candidate position information, performing genetic algorithm processing on the parent candidate position information, inputting a processing result into a comprehensive score function until the comprehensive score output by the comprehensive score function meets the threshold condition, and taking candidate position information corresponding to the comprehensive score which meets the threshold condition as target position information.
Specifically, the randomly generated candidate position information may not meet the requirement, i.e. the calculated comprehensive score does not meet the threshold condition, but the calculated comprehensive score of some candidate position information is higher, the calculated comprehensive score of some candidate position information is lower, and then the candidate position information close to the threshold condition needs to be selected as parent candidate position information, and genetic algorithm processing is performed. For example, the composite scores corresponding to all candidate location information may be ranked in order of from large to small, and the top 100 or top 200 candidate location information may be selected as parent candidate location information for genetic algorithm processing.
It should be appreciated that the genetic algorithm is a relatively mature search algorithm, and how to determine the target location information using the genetic algorithm will be briefly described below.
First, a hybridization operator (which may also be referred to as a chromosome) that performs hybridization is selected, that is, two candidate position information pieces are selected as hybridization operators from the parent candidate position information pieces. As shown in fig. 9, a and B are two chromosomes, and each represent candidate location information, where 8 physical machines exist in chromosome a, corresponding identifiers are A, B, C, D, E, F, G, H, virtual machine 1, virtual machine 2 and virtual machine 4 are located on physical machine a, virtual machine 5 is located on physical machine B, virtual machine 7 and virtual machine 10 are located on physical machine C, virtual machine 8 is located on physical machine D, virtual machine 3 and virtual machine 6 are located on physical machine E, virtual machine 9 is located on physical machine F, virtual machine 11 is located on physical machine G, and virtual machine 12 is located on physical machine H. There are also 8 physical machines and 12 virtual machines in chromosome B, virtual machine 5 is located on physical machine A, virtual machine 1 is located on physical machine B, virtual machine 7 and virtual machine 8 are located on physical machine C, virtual machine 2 and virtual machine 3 are located on physical machine D, virtual machine 4 and virtual machine 6 are located on physical machine E, virtual machine 10 and virtual machine 11 are located on physical machine F, and virtual machine 9 and virtual machine 12 are located on physical machine H.
Then, hybridization is performed, for example, the virtual machine on the physical machine a in the chromosome a is replaced with the virtual machine on the physical machine a in the chromosome b, and at this time, the virtual machine that is original on the physical machine a in the chromosome b needs to be put in the temporary queue, as shown in fig. 9.
Next, all virtual machines on the physical machines on which the duplicate virtual machines appear after replacement are put in the temporary queue, and as shown in fig. 9 described above, after replacement, the physical machines B, D, and E in the chromosome B appear duplicate virtual machines, and at this time, virtual machine 1 on physical machine B, virtual machine 2 and virtual machine 3 on physical machine D, and virtual machine 4 and virtual machine 6 on physical machine E need to be put in the temporary queue.
Finally, the virtual machines that are not repeated (i.e., are not present in the chromosome) in the temporary queue are reinserted into the respective physical machines, as shown in fig. 9, in which virtual machine 1, virtual machine 2, virtual machine 3, virtual machine 4, virtual machine 5, and virtual machine 6 are present in the temporary queue, wherein virtual machine 1, virtual machine 2, and virtual machine 4 are already present in chromosome b, no further insertion is required, and virtual machine 3, virtual machine 5, and virtual machine 6 are required to be reinserted onto the physical machines in chromosome b, and virtual machine 3, virtual machine 5, and virtual machine 6 are inserted into physical machine E. Alternatively, a local optimization algorithm may be used for the insertion.
In particular, a portion of the chromosomes may be randomly selected for variation. The specific rule is that a certain physical machine in a chromosome is marked as invalid at random, a virtual machine on the physical machine is put into a temporary queue, and then the virtual machine in the temporary queue is reinserted on other physical machines in the chromosome by adopting algorithms such as local optimization and the like.
For example, the chromosome a shown in fig. 9 is selected for mutation, the physical machine E in the chromosome a is marked as invalid, the virtual machine 3 and the virtual machine 6 on the physical machine E are put in a temporary queue, and finally the virtual machine 3 and the virtual machine 6 are reinserted into the physical machine D by adopting a local optimization algorithm.
After hybridization and mutation, more candidate position information is obtained, the candidate position information and state information are respectively input into a comprehensive scoring function to obtain comprehensive scores, whether the comprehensive scores meet a threshold condition is judged, and the candidate position information meeting the threshold condition is used as target position information. If all the candidate position information still does not meet the threshold condition, selecting the candidate position information closest to the threshold condition as new parent candidate position information again, processing (i.e. hybridization and mutation) again according to the process, and repeatedly performing iteration until the candidate position information with the comprehensive score meeting the threshold condition is finally found.
And S406, the migration management controller determines a virtual machine migration sequence according to the target position information, and migrates the virtual machines in the resource pool according to the virtual machine migration sequence.
Specifically, after determining the target location information, the migration management controller compares the target location information with the current location information to generate a virtual machine migration sequence.
As shown in fig. 10, there are 12 virtual machines, which are respectively deployed on 8 physical machines, wherein the initialization deployment (i.e., the current location information) is that the virtual machine 1 and the virtual machine 5 are deployed on the physical machine 5, the virtual machine 2, the virtual machine 9 and the virtual machine 11 are deployed on the physical machine 4, the virtual machine 3 and the virtual machine 4 are deployed on the physical machine 1, the virtual machine 6 is deployed on the physical machine 6, the virtual machine 7 is deployed on the physical machine 8, the virtual machine 8 and the virtual machine 10 are deployed on the physical machine 3, and the virtual machine 12 is deployed on the physical machine 12, which is consistent with the location information shown in fig. 7B. The optimized deployment (i.e. target position information) is that the virtual machine 1, the virtual machine 4, the virtual machine 10 and the virtual machine 11 are deployed on the physical machine 7, the virtual machine 2, the virtual machine 3, the virtual machine 5 and the virtual machine 12 are deployed on the physical machine 2, and the virtual machine 6, the virtual machine 7, the virtual machine 8 and the virtual machine 9 are deployed on the physical machine 3, which is consistent with the candidate position information 2 shown in the above figure 8, i.e. the candidate position information 2 is determined target position information. Thus, the resulting migration sequences are 5:7, 4:2, 1:2, 1:7, 5:2, 6:3, 8:3, NA, 4:3, 3:7, 4:7, NA. Wherein 5:7 represents migration of virtual machine 1 from physical machine to physical machine 7, 4:2 represents migration of virtual machine 2 from physical machine 4 to physical machine 2, and other is also migration of corresponding virtual machine from original physical machine to new physical machine, NA represents no migration, e.g. virtual machine 8 and virtual machine 12 do not need migration, and still be deployed on physical machine 3 and physical machine 2.
Further, after the virtual machine migration sequence is generated, the migration management controller needs to migrate the virtual machine. It should be noted that, for the same physical machine, only one virtual machine can be migrated at a time, and at most two times of migration (i.e. one migration and one migration) are supported at the same time, so in order to improve migration efficiency, migration can be selectively performed in multiple rounds, and parallel migration is implemented in each round.
As illustrated in fig. 10, the virtual machine parallel migration is performed in four rounds in total, and in the first round, virtual machine 1 is simultaneously migrated from physical machine 5 to physical machine 7, virtual machine 2 is simultaneously migrated from physical machine 4 to physical machine 2, virtual machine 6 is migrated from physical machine 6 to physical machine 3, the second round of migration is performed after completion, virtual machine 3 is simultaneously migrated from physical machine 1 to physical machine 2, virtual machine 7 is migrated from physical machine 8 to physical machine 3, virtual machine 4 is migrated from physical machine 4 to physical machine 7, the third round of migration is performed after that, virtual machine 4 is simultaneously migrated from physical machine 1 to physical machine 7, virtual machine 5 is migrated from physical machine 5 to physical machine 2, virtual machine 9 is migrated from physical machine 4 to physical machine 3, and finally the fourth round of migration is performed, virtual machine 10 is migrated from physical machine 3 to physical machine 7.
The foregoing details of the method according to the embodiments of the present application are provided for the purpose of better implementing the foregoing aspects of the embodiments of the present application, and accordingly, related devices for implementing the foregoing aspects in conjunction therewith are also provided below.
Referring to fig. 11, fig. 11 is a schematic structural diagram of a computing device according to an embodiment of the present application. The computing device may be a migration management controller in the method embodiment described above in fig. 4, and may perform the method and steps that are performed by the migration management controller in the virtual machine migration method embodiment described above in fig. 4. As shown in fig. 11, the computing device 100 includes a display module 110, a processing module 120, and a migration module 130. Wherein,
The display module 110 is configured to provide a configuration interface, where the configuration interface is configured to prompt a user to input a preset condition, and the preset condition is configured to constrain a migration manner of a virtual machine in the resource pool;
the processing module 120 is configured to obtain the preset condition from the configuration interface, and determine a virtual machine migration sequence according to the preset condition and the virtual machine related information in the resource pool;
and the migration module 130 is configured to migrate the virtual machines in the resource pool according to the virtual machine migration sequence.
As an embodiment, the preset conditions include a physical machine cluster where the virtual machine to be migrated is located, a target weight to be optimized, a virtual machine incapable of being migrated, and a physical machine with priority to be migrated, where the target to be optimized includes a virtual machine resource utilization rate, a physical machine load balancing value, and a virtual machine migration overhead.
As one embodiment, the information related to the virtual machine in the resource pool includes current location information of the virtual machine and status information, where the current location information is used to indicate a physical machine to which the current virtual machine belongs, the status information includes a resource demand of the virtual machine, a resource usage of the virtual machine, and a resource quota of the physical machine to which the virtual machine belongs, and the processing module 120 is specifically configured to generate a plurality of candidate location information according to the current location information, select target location information from the plurality of candidate location information according to the status information, where the virtual machine in the resource pool has a highest comprehensive score of a virtual machine resource utilization rate, a virtual machine migration overhead, and a physical machine load balancing value of the resource pool when the virtual machine in the resource pool is distributed on the physical machine in the resource pool according to the target location information, and determine a virtual machine migration sequence according to the target location information.
As an embodiment, the processing module 120 is further configured to input the plurality of candidate location information and the state information into a comprehensive scoring function respectively to obtain a comprehensive score, and when the comprehensive score meets a threshold condition, take candidate location information corresponding to the comprehensive score meeting the threshold condition as the target location information.
The processing module 120 is further configured to select candidate location information closest to the threshold condition as parent candidate location information from candidate location information corresponding to the composite score that does not satisfy the threshold condition when the composite score does not satisfy the threshold condition, perform genetic algorithm processing on the parent candidate location information, input a processing result into the composite score function until the composite score output by the composite score function satisfies the threshold condition, and use candidate location information corresponding to the composite score that satisfies the threshold condition as the target location information.
As one embodiment, the composite score includes a virtual machine resource utilization score, a virtual machine migration overhead score, and a physical machine load balancing value score, and the composite scoring function is:
F(x)=Wu·Fu(x)+Wb·Fb(x)+Wm·Fm(x)
The method comprises the steps of determining a virtual machine resource utilization rate scoring function, wherein F u (x) is a virtual machine resource utilization rate scoring function, W u is a weight corresponding to F u (x), F b (x) is a physical machine load balancing value scoring function, W b is a weight corresponding to F b (x), F m (x) is a virtual machine migration overhead scoring function, and W m is a weight corresponding to F m (x).
As one embodiment, the resource demand of the virtual machine includes a processor demand, a memory demand, and a network demand of the virtual machine, the resource allowance of the physical machine includes a processor allowance, a memory allowance, and a network allowance of the physical machine, and the scoring function of the resource utilization of the virtual machine is as follows:
Wherein the said Is the processor demand of the virtual machine,Processor quota for physical machine where virtual machine is located, the method comprises the steps ofIs the memory demand of the virtual machine, the followingMemory allowance for the physical machine in which the virtual machine is located; the saidNetwork demand for virtual machines, theAnd n is the number of the physical machines in the resource pool.
As one embodiment, the physical machine load balancing value scoring function is:
Wherein, Processor utilization for a physical machine, theAverage utilization rate of a processor of a physical machine in the resource pool; Is the memory utilization rate of the physical machine, the The average utilization rate of the memory of the physical machine in the resource pool is obtained; network utilization of the physical machine is that And (3) the network average utilization rate of the physical machines in the resource pool.
As one embodiment, the virtual machine migration overhead scoring function is:
Wherein, The method is characterized in that t i is used for indicating whether the virtual machine needs to be migrated from the located physical machine to another physical machine or not, when the value of t i is 0 or 1, t i is 0, the virtual machine does not need to be migrated from the located physical machine to another physical machine, when t i is 1, the virtual machine needs to be migrated from the located physical machine to another physical machine, and M is the number of the virtual machines in a resource pool.
It is to be appreciated that the display module 110, the processing module 120, and the migration module 130 in embodiments of the present application may be implemented by a display or display related circuit components, and the processing module 120 and the migration module 130 may be implemented by a processor or processor related circuit components.
It should be noted that the structure of the above computing device is merely an example, and should not be construed as a specific limitation, and each module in the computing device may be added, reduced, or combined as needed. In addition, the operations and/or functions of the respective modules in the computing device are to implement the corresponding flow of the method described in fig. 4, and are not described herein for brevity.
Referring to fig. 12, fig. 12 is a schematic structural diagram of a computing device according to an embodiment of the present application. As shown in fig. 12, the computing device 200 includes a processor 210, a communication interface 220, and a memory 230, the processor 210, the communication interface 220, and the memory 230 being interconnected by an internal bus 240. It should be appreciated that the computing device 200 may be a computing device in cloud computing, or a computing device in an edge environment.
The processor 210 may be comprised of one or more general purpose processors, such as a central processing unit (central processing unit, CPU), or a combination of CPU and hardware chips. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (programmable logic device, PLD), or a combination thereof. The PLD may be a complex programmable logic device (complex programmable logic device, CPLD), a field-programmable gate array (FPGA) GATE ARRAY, general-purpose array logic (GENERIC ARRAY logic, GAL), or any combination thereof.
Bus 240 may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, PCI) bus, or an extended industry standard architecture (extended industry standard architecture, EISA) bus, or the like. The bus 240 may be classified into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in fig. 12, but not only one bus or one type of bus.
The memory 230 may include volatile memory (RAM) such as random access memory (random access memory), the memory 230 may also include non-volatile memory (non-volatile memory) such as read-only memory (ROM), flash memory (flash memory), hard disk (HARD DISK DRIVE, HDD) or solid state disk (solid-state disk) (SSD), and the memory 230 may also include combinations of the above. Memory 230 may be used to store programs and data to facilitate the invocation of program code stored in memory 230 by processor 210 to implement the virtual machine migration method described above. The program code may be functional modules for implementing the computing device shown in fig. 11 or method steps for implementing the execution subject of the migration management controller in the method embodiment shown in fig. 4.
The present application also provides a computer-readable storage medium storing a computer program which, when executed by a processor, performs part or all of the steps of any one of the above-described method embodiments.
The embodiments of the present invention also provide a computer program comprising instructions which, when executed by a computer, cause the computer to perform part or all of the steps of any one of the virtual machine migration methods.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present application is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present application.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, such as the above-described division of units, merely a division of logic functions, and there may be additional manners of dividing in actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, or may be in electrical or other forms.
The units described above as separate components may or may not be physically separate, and components shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.

Claims (19)

1.一种虚拟机迁移方法,其特征在于,包括:1. A virtual machine migration method, comprising: 提供配置界面,所述配置界面用于提示用户输入预设条件,所述预设条件用于对资源池中的虚拟机迁移方式进行约束;Providing a configuration interface, the configuration interface is used to prompt the user to enter a preset condition, the preset condition is used to constrain the migration mode of the virtual machine in the resource pool; 从所述配置界面获取所述预设条件,所述资源池中的虚拟机相关信息包括虚拟机的当前位置信息以及状态信息,所述当前位置信息用于指示当前虚拟机所归属的物理机,所述状态信息包括虚拟机的资源需求量、虚拟机的资源使用量以及虚拟机所在的物理机的资源限额;Acquire the preset condition from the configuration interface, the virtual machine related information in the resource pool includes current location information and status information of the virtual machine, the current location information is used to indicate the physical machine to which the current virtual machine belongs, and the status information includes the resource demand of the virtual machine, the resource usage of the virtual machine and the resource limit of the physical machine where the virtual machine is located; 根据所述当前位置信息产生多个候选位置信息,将所述多个候选位置信息以及所述状态信息分别输入综合评分函数以获取综合评分;Generate multiple candidate position information according to the current position information, and input the multiple candidate position information and the state information into a comprehensive scoring function to obtain a comprehensive score; 在所述综合评分不满足阈值条件时,在不满足阈值条件的综合评分对应的候选位置信息中,选择最接近所述阈值条件的候选位置信息作为父代候选位置信息;When the comprehensive score does not meet the threshold condition, among the candidate position information corresponding to the comprehensive score that does not meet the threshold condition, select the candidate position information closest to the threshold condition as the parent candidate position information; 对所述父代候选位置信息进行遗传算法处理,并将处理结果输入所述综合评分函数直到所述综合评分函数输出的综合评分满足所述阈值条件,将满足阈值条件的综合评分对应的候选位置信息作为目标位置信息,其中所述资源池的虚拟机根据所述目标位置信息分布在所述资源池中的物理机上时所述资源池的虚拟机资源利用率、虚拟机迁移开销以及物理机负载均衡值的综合评分最高;The parent candidate location information is processed by a genetic algorithm, and the processing result is input into the comprehensive scoring function until the comprehensive score output by the comprehensive scoring function meets the threshold condition, and the candidate location information corresponding to the comprehensive score that meets the threshold condition is used as the target location information, wherein the comprehensive score of the virtual machine resource utilization, virtual machine migration overhead and physical machine load balancing value of the resource pool is the highest when the virtual machines of the resource pool are distributed on the physical machines in the resource pool according to the target location information; 根据所述目标位置信息确定虚拟机迁移序列;Determine a virtual machine migration sequence according to the target location information; 根据所述虚拟机迁移序列对所述资源池中的虚拟机进行迁移。The virtual machines in the resource pool are migrated according to the virtual machine migration sequence. 2.如权利要求1所述的方法,其特征在于,所述预设条件包括待迁移的虚拟机所在的物理机集群、待优化目标权重、不能迁移的虚拟机和优先迁空的物理机,所述待优化目标包括虚拟机资源利用率、物理机负载均衡值和虚拟机迁移开销。2. The method as claimed in claim 1 is characterized in that the preset conditions include the physical machine cluster where the virtual machine to be migrated is located, the weight of the target to be optimized, the virtual machines that cannot be migrated and the physical machines that are prioritized for migration, and the targets to be optimized include the virtual machine resource utilization, the physical machine load balancing value and the virtual machine migration overhead. 3.如权利要求1或2所述的方法,其特征在于,根据所述状态信息在多个候选位置信息中选择目标位置信息,包括:3. The method according to claim 1 or 2, characterized in that selecting target location information from a plurality of candidate location information according to the state information comprises: 将所述多个候选位置信息以及所述状态信息分别输入综合评分函数以获取综合评分;Inputting the plurality of candidate position information and the state information into a comprehensive scoring function to obtain a comprehensive score; 在所述综合评分满足阈值条件时,将满足阈值条件的综合评分对应的候选位置信息作为所述目标位置信息。When the comprehensive score meets the threshold condition, the candidate location information corresponding to the comprehensive score meeting the threshold condition is used as the target location information. 4.根据权利要求1或2所述的方法,其特征在于,所述综合评分包括虚拟机资源利用率评分、虚拟机迁移开销评分以及物理机负载均衡值评分,所述综合评分函数为:4. The method according to claim 1 or 2, characterized in that the comprehensive score includes a virtual machine resource utilization score, a virtual machine migration overhead score, and a physical machine load balancing value score, and the comprehensive score function is: F(x)=Wu·Fu(x)+Wb·Fb(x)+Wm·Fm(x)F(x)=W u ·F u (x)+W b ·F b (x)+W m ·F m (x) 其中,所述Fu(x)为虚拟机资源利用率评分函数,所述Wu为所述Fu(x)对应的权重;所述Fb(x)为物理机负载均衡值评分函数,所述Wb为所述Fb(x)对应的权重;所述Fm(x)为虚拟机迁移开销评分函数,所述Wm为所述Fm(x)对应的权重。Among them, the Fu (x) is the virtual machine resource utilization scoring function, and the Wu is the weight corresponding to the Fu (x); the Fb (x) is the physical machine load balancing value scoring function, and the Wb is the weight corresponding to the Fb (x); the Fm (x) is the virtual machine migration overhead scoring function, and the Wm is the weight corresponding to the Fm (x). 5.根据权利要求4所述的方法,其特征在于,所述虚拟机的资源需求量包括虚拟机的处理器需求量、内存需求量、网络需求量,所述物理机的资源限额包括物理机的处理器限额、内存限额、网络限额,所述虚拟机资源利用率评分函数为:5. The method according to claim 4, characterized in that the resource demand of the virtual machine includes the processor demand, memory demand, and network demand of the virtual machine, the resource limit of the physical machine includes the processor limit, memory limit, and network limit of the physical machine, and the virtual machine resource utilization scoring function is: 其中,所述为虚拟机的处理器需求量,所述为虚拟机所在的物理机的处理器限额;所述为虚拟机的内存需求量,所述为虚拟机所在的物理机的内存限额;所述为虚拟机的网络需求量,所述为虚拟机所在的物理机的网络限额;所述n为所述资源池中的物理机的个数。Among them, the is the processor requirement of the virtual machine, is the processor limit of the physical machine where the virtual machine is located; is the memory requirement of the virtual machine, is the memory limit of the physical machine where the virtual machine is located; is the network demand of the virtual machine, is the network limit of the physical machine where the virtual machine is located; and n is the number of physical machines in the resource pool. 6.如权利要求4所述的方法,其特征在于,所述物理机负载均衡值评分函数为:6. The method according to claim 4, wherein the physical machine load balancing value scoring function is: 其中,所述为物理机的处理器利用率,所述为所述资源池中的物理机的处理器平均利用率;所述为物理机的内存利用率,所述为所述资源池中的物理机的内存平均利用率;所述为物理机的网络利用率,所述为所述资源池中的物理机的网络平均利用率。Among them, the is the processor utilization of the physical machine, is the average processor utilization of the physical machines in the resource pool; is the memory utilization of the physical machine. is the average memory utilization of the physical machines in the resource pool; is the network utilization of the physical machine. is the average network utilization of the physical machines in the resource pool. 7.根据权利要求4所述的方法,其特征在于,所述虚拟机的资源需求量包括虚拟机内存需求量,所述虚拟机迁移开销评分函数为:7. The method according to claim 4, wherein the resource requirement of the virtual machine includes the memory requirement of the virtual machine, and the virtual machine migration cost scoring function is: 其中,为虚拟机的内存需求量,ti用于表示虚拟机是否需要从所在的物理机迁移到另外一个物理机,所述ti的取值为0或1,ti为0时,表示虚拟机不需要从所在的物理机迁移到另外一个物理机;ti为1时,表示虚拟机需要从所在的物理机迁移到另外一个物理机,所述M为所述资源池中的虚拟机的个数。in, is the memory requirement of the virtual machine, ti is used to indicate whether the virtual machine needs to be migrated from the physical machine where it is located to another physical machine, and the value of ti is 0 or 1. When ti is 0, it indicates that the virtual machine does not need to be migrated from the physical machine where it is located to another physical machine; when ti is 1, it indicates that the virtual machine needs to be migrated from the physical machine where it is located to another physical machine, and M is the number of virtual machines in the resource pool. 8.如权利要求1或2所述的方法,其特征在于,所述配置界面还用于提示用户输入虚拟机迁移周期,所述资源池中的虚拟机根据所述虚拟机迁移周期进行周期性迁移。8. The method according to claim 1 or 2, characterized in that the configuration interface is also used to prompt the user to input a virtual machine migration cycle, and the virtual machines in the resource pool are periodically migrated according to the virtual machine migration cycle. 9.一种计算设备,其特征在于,包括:9. A computing device, comprising: 显示模块,用于提供配置界面,所述配置界面用于提示用户输入预设条件,所述预设条件用于对资源池中的虚拟机迁移方式进行约束;A display module, used for providing a configuration interface, wherein the configuration interface is used for prompting a user to input preset conditions, wherein the preset conditions are used for constraining a migration mode of a virtual machine in a resource pool; 处理模块,用于从所述配置界面获取所述预设条件,所述资源池中的虚拟机相关信息包括虚拟机的当前位置信息以及状态信息,所述当前位置信息用于指示当前虚拟机所归属的物理机,所述状态信息包括虚拟机的资源需求量、虚拟机的资源使用量以及虚拟机所在的物理机的资源限额;根据所述当前位置信息产生多个候选位置信息,将所述多个候选位置信息以及所述状态信息分别输入综合评分函数以获取综合评分;在所述综合评分不满足阈值条件时,在不满足阈值条件的综合评分对应的候选位置信息中,选择最接近所述阈值条件的候选位置信息作为父代候选位置信息;对所述父代候选位置信息进行遗传算法处理,并将处理结果输入所述综合评分函数直到所述综合评分函数输出的综合评分满足所述阈值条件,将满足阈值条件的综合评分对应的候选位置信息作为目标位置信息,其中所述资源池的虚拟机根据所述目标位置信息分布在所述资源池中的物理机上时所述资源池的虚拟机资源利用率、虚拟机迁移开销以及物理机负载均衡值的综合评分最高;根据所述目标位置信息确定虚拟机迁移序列;根据所述预设条件和所述资源池中的虚拟机相关信息确定虚拟机迁移序列;a processing module, configured to obtain the preset condition from the configuration interface, wherein the virtual machine related information in the resource pool includes the current location information and status information of the virtual machine, the current location information is used to indicate the physical machine to which the current virtual machine belongs, and the status information includes the resource demand of the virtual machine, the resource usage of the virtual machine, and the resource limit of the physical machine where the virtual machine is located; a plurality of candidate location information is generated according to the current location information, and the plurality of candidate location information and the status information are respectively input into a comprehensive scoring function to obtain a comprehensive score; when the comprehensive score does not meet the threshold condition, the candidate location information corresponding to the comprehensive score that does not meet the threshold condition is selected from the candidate location information that is closest to the threshold condition. Select location information as parent candidate location information; perform genetic algorithm processing on the parent candidate location information, and input the processing result into the comprehensive scoring function until the comprehensive score output by the comprehensive scoring function meets the threshold condition, and use the candidate location information corresponding to the comprehensive score that meets the threshold condition as the target location information, wherein the comprehensive score of the virtual machine resource utilization, virtual machine migration overhead and physical machine load balancing value of the resource pool is the highest when the virtual machines of the resource pool are distributed on the physical machines in the resource pool according to the target location information; determine the virtual machine migration sequence according to the target location information; determine the virtual machine migration sequence according to the preset conditions and the virtual machine related information in the resource pool; 迁移模块,用于根据所述虚拟机迁移序列对所述资源池中的虚拟机进行迁移。A migration module is used to migrate the virtual machines in the resource pool according to the virtual machine migration sequence. 10.如权利要求9所述的计算设备,其特征在于,所述预设条件包括待迁移的虚拟机所在的物理机集群、待优化目标权重、不能迁移的虚拟机和优先迁空的物理机,所述待优化目标包括虚拟机资源利用率、物理机负载均衡值和虚拟机迁移开销。10. The computing device as described in claim 9 is characterized in that the preset conditions include the physical machine cluster where the virtual machine to be migrated is located, the weight of the target to be optimized, the virtual machines that cannot be migrated and the physical machines that are preferentially migrated, and the targets to be optimized include the virtual machine resource utilization, the physical machine load balancing value and the virtual machine migration overhead. 11.根据权利要求9或10所述的计算设备,其特征在于,所述处理模块,还用于:11. The computing device according to claim 9 or 10, wherein the processing module is further configured to: 将所述多个候选位置信息以及所述状态信息分别输入综合评分函数以获取综合评分;Inputting the plurality of candidate position information and the state information into a comprehensive scoring function to obtain a comprehensive score; 在所述综合评分满足阈值条件时,将满足阈值条件的综合评分对应的候选位置信息作为所述目标位置信息。When the comprehensive score meets the threshold condition, the candidate location information corresponding to the comprehensive score meeting the threshold condition is used as the target location information. 12.根据权利要求9或10所述的计算设备,其特征在于,所述综合评分包括虚拟机资源利用率评分、虚拟机迁移开销评分以及物理机负载均衡值评分,所述综合评分函数为:12. The computing device according to claim 9 or 10, characterized in that the comprehensive score includes a virtual machine resource utilization score, a virtual machine migration overhead score, and a physical machine load balancing value score, and the comprehensive score function is: F(x)=Wu·Fu(x)+Wb·Fb(x)+Wm·Fm(x)F(x)=W u ·F u (x)+W b ·F b (x)+W m ·F m (x) 其中,所述Fu(x)为虚拟机资源利用率评分函数,所述Wu为所述Fu(x)对应的权重;所述Fb(x)为物理机负载均衡值评分函数,所述Wb为所述Fb(x)对应的权重;所述Fm(x)为虚拟机迁移开销评分函数,所述Wm为所述Fm(x)对应的权重。Among them, the Fu (x) is the virtual machine resource utilization scoring function, and the Wu is the weight corresponding to the Fu (x); the Fb (x) is the physical machine load balancing value scoring function, and the Wb is the weight corresponding to the Fb (x); the Fm (x) is the virtual machine migration overhead scoring function, and the Wm is the weight corresponding to the Fm (x). 13.根据权利要求12所述的计算设备,其特征在于,所述虚拟机的资源需求量包括虚拟机的处理器需求量、内存需求量、网络需求量,所述物理机的资源限额包括物理机的处理器限额、内存限额、网络限额,所述虚拟机资源利用率评分函数为:13. The computing device according to claim 12, wherein the resource requirement of the virtual machine includes the processor requirement, memory requirement, and network requirement of the virtual machine, the resource limit of the physical machine includes the processor limit, memory limit, and network limit of the physical machine, and the virtual machine resource utilization scoring function is: 其中,所述为虚拟机的处理器需求量,所述为虚拟机所在的物理机的处理器限额;所述为虚拟机的内存需求量,所述为虚拟机所在的物理机的内存限额;所述为虚拟机的网络需求量,所述为虚拟机所在的物理机的网络限额;所述n为所述资源池中的物理机的个数。Among them, the is the processor requirement of the virtual machine, is the processor limit of the physical machine where the virtual machine is located; is the memory requirement of the virtual machine, is the memory limit of the physical machine where the virtual machine is located; is the network demand of the virtual machine, is the network limit of the physical machine where the virtual machine is located; and n is the number of physical machines in the resource pool. 14.根据权利要求12所述的计算设备,其特征在于,所述物理机负载均衡值评分函数为:14. The computing device according to claim 12, wherein the physical machine load balancing value scoring function is: 其中,所述为物理机的处理器利用率,所述为所述资源池中的物理机的处理器平均利用率;所述为物理机的内存利用率,所述为所述资源池中的物理机的内存平均利用率;所述为物理机的网络利用率,所述为所述资源池中的物理机的网络平均利用率。Among them, the is the processor utilization of the physical machine, is the average processor utilization of the physical machines in the resource pool; is the memory utilization of the physical machine. is the average memory utilization of the physical machines in the resource pool; is the network utilization of the physical machine. is the average network utilization of the physical machines in the resource pool. 15.根据权利要求12所述的计算设备,其特征在于,所述虚拟机的资源需求量包括虚拟机内存需求量,所述虚拟机迁移开销评分函数为:15. The computing device according to claim 12, wherein the resource requirement of the virtual machine includes a memory requirement of the virtual machine, and the virtual machine migration cost scoring function is: 其中,为虚拟机的内存需求量,ti用于表示虚拟机是否需要从所在的物理机迁移到另外一个物理机,所述ti的取值为0或1,ti为0时,表示虚拟机不需要从所在的物理机迁移到另外一个物理机;ti为1时,表示虚拟机需要从所在的物理机迁移到另外一个物理机,所述M为所述资源池中的虚拟机的个数。in, is the memory requirement of the virtual machine, ti is used to indicate whether the virtual machine needs to be migrated from the physical machine where it is located to another physical machine, and the value of ti is 0 or 1. When ti is 0, it indicates that the virtual machine does not need to be migrated from the physical machine where it is located to another physical machine; when ti is 1, it indicates that the virtual machine needs to be migrated from the physical machine where it is located to another physical machine, and M is the number of virtual machines in the resource pool. 16.如权利要求9或10所述的计算设备,其特征在于,所述配置界面还用于提示用户输入虚拟机迁移周期,所述资源池中的虚拟机根据所述虚拟机迁移周期进行周期性迁移。16. The computing device according to claim 9 or 10, characterized in that the configuration interface is also used to prompt the user to input a virtual machine migration cycle, and the virtual machines in the resource pool are periodically migrated according to the virtual machine migration cycle. 17.一种计算设备,其特征在于,所述计算设备包括处理器和存储器,所述处理器和所述存储器通过内部总线相连,所述存储器中存储有指令,所述处理器调用所述存储器中的指令以执行权利要求1-8任一项所述的方法。17. A computing device, characterized in that the computing device comprises a processor and a memory, the processor and the memory are connected via an internal bus, instructions are stored in the memory, and the processor calls the instructions in the memory to execute the method described in any one of claims 1-8. 18.一种计算机存储介质,所述计算机存储介质存储有计算机程序,当所述计算机程序被处理器执行时,实现如权利要求1-8任一项所述的方法。18. A computer storage medium storing a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented. 19.一种计算机程序产品,所述计算机程序包括指令,当该计算机程序被计算机执行时,使得计算机执行如权利要求1-8任一项所述的方法。19. A computer program product, the computer program comprising instructions, which, when executed by a computer, causes the computer to execute the method according to any one of claims 1 to 8.
CN202011126630.5A 2019-10-24 2020-10-20 A virtual machine migration method and related equipment Active CN112711461B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/123302 WO2021078256A1 (en) 2019-10-24 2020-10-23 Virtual machine migration method and related device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2019110222275 2019-10-24
CN201911022227 2019-10-24

Publications (2)

Publication Number Publication Date
CN112711461A CN112711461A (en) 2021-04-27
CN112711461B true CN112711461B (en) 2025-05-16

Family

ID=75542851

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011126630.5A Active CN112711461B (en) 2019-10-24 2020-10-20 A virtual machine migration method and related equipment

Country Status (2)

Country Link
CN (1) CN112711461B (en)
WO (1) WO2021078256A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113986478B (en) * 2021-09-26 2025-06-24 阿里巴巴(中国)有限公司 Resource migration strategy determination method and device
CN115952005B (en) * 2023-02-24 2023-05-30 浪潮电子信息产业股份有限公司 Method, device, equipment and readable storage medium for metadata load balancing
CN120011088B (en) * 2025-04-18 2025-07-29 南京凡艺智能科技有限公司 Private cloud resource intelligent scheduling management system based on super fusion architecture

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104679595A (en) * 2015-03-26 2015-06-03 南京大学 Application-oriented dynamic resource allocation method for IaaS (Infrastructure As A Service) layer

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609295A (en) * 2011-10-18 2012-07-25 华中科技大学 Dynamic operation scheduling system of virtual machine
US8892779B2 (en) * 2012-05-10 2014-11-18 International Business Machines Corporation Virtual machine allocation at physical resources
CN102984137A (en) * 2012-11-14 2013-03-20 江苏南开之星软件技术有限公司 Multi-target server scheduling method based on multi-target genetic algorithm
US9552217B2 (en) * 2014-06-28 2017-01-24 Vmware, Inc. Using active/active asynchronous replicated storage for live migration
US9710305B2 (en) * 2015-11-12 2017-07-18 International Business Machines Corporation Virtual machine migration management
CN105843678B (en) * 2016-03-17 2018-02-06 国网山东省电力公司信息通信公司 The scheduling of resource moving method and system of a kind of virtual machine based on Optimum Theory
CN106293883B (en) * 2016-08-15 2019-09-24 上海交通大学 The Optimal Configuration Method and its system of cloud virtual machine based on mixing extended mode
CN109213595B (en) * 2017-07-07 2023-12-26 中兴通讯股份有限公司 Load balancing scheduling method and device and computer readable storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104679595A (en) * 2015-03-26 2015-06-03 南京大学 Application-oriented dynamic resource allocation method for IaaS (Infrastructure As A Service) layer

Also Published As

Publication number Publication date
CN112711461A (en) 2021-04-27
WO2021078256A1 (en) 2021-04-29

Similar Documents

Publication Publication Date Title
Le et al. AlloX: Compute allocation in hybrid clusters
CN112711461B (en) A virtual machine migration method and related equipment
CN107239336B (en) Method and device for realizing task scheduling
Mansouri et al. Cost-based job scheduling strategy in cloud computing environments
US8578381B2 (en) Apparatus, system and method for rapid resource scheduling in a compute farm
CN104750690B (en) A kind of inquiry processing method, apparatus and system
CN103548324B (en) Virtual machine distribution method and virtual machine distributor
EP3537281B1 (en) Storage controller and io request processing method
CN114461386B (en) Task allocation method and task allocation device
Yin et al. An improved genetic algorithm for task scheduling in cloud computing
CN111813500B (en) A multi-objective cloud workflow scheduling method and device
JP2019511773A (en) Service parameter selection method and related device
US9298500B2 (en) Information processing system and control method of information processing system for managing jobs in a distributed multi-node environment
Delavar et al. A synthetic heuristic algorithm for independent task scheduling in cloud systems
Ma et al. Dependency-aware data locality for MapReduce
KR101557747B1 (en) System and method for allocating virtual machine for effective use of multi resource in cloud
CN116719612A (en) Cloud resource scheduling optimization method, device and storage medium
CN106802822A (en) A kind of cloud data center cognitive resources dispatching method based on moth algorithm
Ramezani et al. Task scheduling in cloud environments: A survey of population‐based evolutionary algorithms
CN107528914B (en) Resource requisition scheduling method for data fragmentation
Portaluri et al. Multi objective virtual machine allocation in cloud data centers
CN117424820A (en) Network slice time delay constraint resource allocation method and device and electronic equipment
EP3550421B1 (en) Storage controller and io request processing method
CN114816650A (en) Resource scheduling method and device
Wu et al. A QoS-constrained scheduling for access requests in cloud storage

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
TA01 Transfer of patent application right

Effective date of registration: 20220211

Address after: 550025 Huawei cloud data center, jiaoxinggong Road, Qianzhong Avenue, Gui'an New District, Guiyang City, Guizhou Province

Applicant after: Huawei Cloud Computing Technologies Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Applicant before: HUAWEI TECHNOLOGIES Co.,Ltd.

TA01 Transfer of patent application right
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载