CN112711461A - Virtual machine migration method and related equipment - Google Patents

Virtual machine migration method and related equipment Download PDF

Info

Publication number
CN112711461A
CN112711461A CN202011126630.5A CN202011126630A CN112711461A CN 112711461 A CN112711461 A CN 112711461A CN 202011126630 A CN202011126630 A CN 202011126630A CN 112711461 A CN112711461 A CN 112711461A
Authority
CN
China
Prior art keywords
virtual machine
machine
physical
virtual
physical machine
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.)
Pending
Application number
CN202011126630.5A
Other languages
Chinese (zh)
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 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 Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to PCT/CN2020/123302 priority Critical patent/WO2021078256A1/en
Publication of CN112711461A publication Critical patent/CN112711461A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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; CALCULATING OR 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; CALCULATING OR 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; CALCULATING OR 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; CALCULATING OR 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; CALCULATING OR 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

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)
  • Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Strategic Management (AREA)
  • Development Economics (AREA)
  • Educational Administration (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 application provides a virtual machine migration method and related equipment. Wherein, the method comprises the following steps: the migration management controller provides a configuration interface, wherein the configuration interface is used for prompting a user to input a preset condition, and the preset condition is used for restricting the virtual machine migration mode in the resource pool; the migration management controller acquires the preset conditions from the configuration interface, and determines a virtual machine migration sequence according to the preset conditions and the relevant information of the virtual machines in the resource pool; and the migration management controller migrates the virtual machines in the resource pool according to the virtual machine migration sequence. The method can ensure that the dynamic migration of the virtual machine is carried out under the consideration of various scheduling targets, and the multi-target optimization is realized.

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 wide attention in the scientific research and industrial industries as an emerging industry in recent years. The cloud computing is mainly divided into three types: infrastructure as a service (IaaS), platform as a service (PaaS), software as a service (SaaS). In an infrastructure as a service type cloud computing environment, the reasonable placement of Virtual Machines (VMs) has been a core issue.
In addition, in an infrastructure as a service type cloud computing environment, the demands of virtual machines purchased by users are different, and the load characteristics are also different; the most common classification methods include a Central Processing Unit (CPU) intensive type, a disk input/output (I/O) intensive type, and a network intensive type. If the virtual machines carried on the same physical machine are of the same type, for example, CPU-intensive, the virtual machines compete for the use of CPU resources, while the utilization rate of other resources (such as memory, network, etc.) is low, and as the virtual machines compete for the use of CPU resources, the service quality is reduced, and meanwhile, the resource is wasted due to low utilization rate of the whole resources, and unnecessary loss of energy is generated. Therefore, in order to avoid such a situation, the virtual machine needs to be migrated dynamically, so that the overall resource utilization rate is improved and other indexes are optimized.
At present, the dynamic scheduling technology of the virtual machine in the cloud computing environment has some problems, so that the problem still exists after the virtual machine is migrated, and the performance index is not comprehensively optimized. The scheduling objective (i.e. optimization objective) considered by the existing virtual machine scheduling scheme is relatively single, for example, only scheduling of load balancing, or only scheduling of resource utilization is considered, or only scheduling of virtual machine affinity (network affinity) is considered.
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 and realize multi-objective optimization.
In a first aspect, the present application provides a virtual machine migration method, where the method includes: the migration management controller provides a configuration interface, wherein the configuration interface is used for prompting a user to input a preset condition, and the preset condition is used for restricting the virtual machine migration mode in the resource pool; the migration management controller acquires the preset conditions from the configuration interface, and determines a virtual machine migration sequence according to the preset conditions and the relevant information of the virtual machines in the resource pool; and the migration management controller migrates the virtual machines in the resource pool according to the virtual machine migration sequence.
In the scheme provided by the application, a user directly inputs a preset condition on a configuration interface provided by a migration management controller, so that the migration management controller determines a virtual machine migration sequence according to the preset condition input by the user and the related information of the virtual machines in a resource pool, and therefore the virtual machines meet the preset condition in the migration process and multi-objective optimization is achieved.
With reference to the first aspect, in a possible implementation manner of the first aspect, the preset conditions include a physical machine cluster where a virtual machine to be migrated is located, a target weight to be optimized, a virtual machine that cannot be migrated, and a physical machine that preferentially migrates to the empty, 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.
In the scheme provided by the application, a user can ensure that the migration management controller migrates the virtual machines in the resource pool as required by setting the preset conditions, and the virtual machines can meet service requirements and realize multi-objective optimization in the migration process.
With reference to the first aspect, in a possible implementation manner of the first aspect, the virtual machine related information 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, and the state information includes a resource demand of the virtual machine, a resource usage of the virtual machine, and a resource quota of the physical machine in which the virtual machine is located; the migration management controller generates a plurality of candidate position information according to the current position information; the migration management controller selects target position information from the candidate position information according to the state information, wherein when the virtual machines of the resource pool are distributed on the physical machines in the resource pool according to the target position information, the comprehensive score of the resource utilization rate of the virtual machines, the migration cost of the virtual machines and the load balance value of the physical machines in the resource pool is highest; and the migration management controller determines a virtual machine migration sequence according to the target position information.
In 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 different candidate positions corresponding to a plurality of different virtual machine migration schemes, the migration management controller scores the plurality of different virtual machine migration schemes corresponding to the plurality of candidate position information in the different virtual machine migration schemes according to the resource demand of the virtual machine, the resource usage of the virtual machine and the resource quota of the physical machine where the virtual machine is located, selects the candidate position corresponding to the highest comprehensive score of the virtual machine resource utilization rate, the virtual machine migration overhead and the physical machine load balance value, thereby determining the target position information in the plurality of candidate position information and ensuring that the finally selected target position information can improve the virtual machine resource utilization rate, load balancing is guaranteed, migration overhead is reduced, and multi-objective optimization of virtual machine migration is achieved.
Optionally, the migration management controller randomly obtains a plurality of candidate location information according to the current location information of the virtual machine, where the number of the candidate location information is, for example, 1000 or more than 1000.
With reference to the first aspect, in a possible implementation manner of the first aspect, the migration management controller inputs the plurality of candidate location information and the state information into a composite score function, respectively, to obtain a composite score; and when the comprehensive score meets the threshold condition, the migration management controller takes the candidate position information corresponding to the comprehensive score meeting the threshold condition as the target position information.
Alternatively, the threshold condition may be set as needed, for example, to 0.85.
In the scheme provided by the application, the migration management controller calculates the plurality of candidate position information by using the comprehensive scoring function, compares the calculation result with the threshold value, selects the candidate position information meeting the threshold value as the target position information, can quickly screen the plurality of candidate position information, and finds the target position information.
With reference to the first aspect, in a possible implementation manner of the first aspect, when the composite score does not meet the threshold condition, the migration management controller selects, as parent candidate location information, candidate location information that is closest to the threshold condition from among candidate location information corresponding to the composite score that does not meet the threshold condition; and the migration management controller performs genetic algorithm processing on the parent candidate position information, inputs a processing result into the comprehensive scoring function until the comprehensive score output by the comprehensive scoring function meets the threshold condition, and takes the candidate position information corresponding to the comprehensive score meeting 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 through continuous iteration, the target position information meeting the threshold condition is finally determined. By the method, the finally selected target position information can be ensured to realize multi-target optimization.
With reference to the first aspect, in a 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 score function is:
F(x)=Wu·Fu(x)+Wb·Fb(x)+Wm·Fm(x)
wherein, F isu(x) As a function of virtual machine resource utilization score, said WuIs the said Fu(x) A corresponding weight; said Fb(x) Load balancing values for physical machinesScoring function, said WbIs the said Fb(x) A corresponding weight; said Fm(x) A scoring function for virtual machine migration cost, said WmIs the said Fm(x) The corresponding weight. Optionally, the weights of the sub-scoring functions are obtained empirically.
In the scheme provided by the application, the comprehensive scoring function is formed by multiplying each sub-scoring function by the respective weight, so that the target position information determined from multiple dimensions can be ensured to improve the resource utilization rate of the virtual machine, the load balance is ensured, the migration overhead is reduced, and the multi-target optimization is realized.
With reference to the first aspect, in a possible implementation manner of the first aspect, the resource demand of the virtual machine includes a processor demand, a memory demand, and a network demand 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 scoring function of the resource utilization rate of the virtual machine is as follows:
Figure BDA0002733827060000031
wherein, the
Figure BDA0002733827060000032
Is processor demand of a virtual machine, the
Figure BDA0002733827060000033
A processor quota for a physical machine in which the virtual machine resides; the above-mentioned
Figure BDA0002733827060000034
Is the memory requirement of the virtual machine, the
Figure BDA0002733827060000035
The memory quota of the physical machine where the virtual machine is located; the above-mentioned
Figure BDA0002733827060000036
Web as a virtual machineThe required amount of the collateral, the
Figure BDA0002733827060000037
Network quota for the physical machine where the virtual machine is located; and n is the number of the physical machines in the resource pool.
According to 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, and the comprehensive credibility of the scoring function of the resource utilization rate 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:
Figure BDA0002733827060000038
wherein, the
Figure BDA0002733827060000039
Is the processor utilization of the physical machine, the
Figure BDA00027338270600000310
Average utilization of processors for physical machines in the resource pool; the above-mentioned
Figure BDA00027338270600000311
Is the memory utilization of the physical machine, the
Figure BDA00027338270600000312
The average utilization rate of the memory of the physical machine in the resource pool is obtained; the above-mentioned
Figure BDA00027338270600000313
Is the network utilization of the physical machine, the
Figure BDA00027338270600000314
And the network average utilization rate of the physical machine in the resource pool is obtained.
According to the scheme provided by the application, load balance is embodied through the processor utilization rate, the memory utilization rate and the mean square error of the network utilization rate of each physical machine, the load balance value obtained through calculation is more accurate, and further the comprehensive scoring function is more accurate.
With reference to the first aspect, in a possible implementation manner of the first aspect, the resource demand of the virtual machine includes a virtual machine memory demand, and the virtual machine migration overhead scoring function is:
Figure BDA0002733827060000041
wherein, the
Figure BDA0002733827060000042
Is the memory requirement of the virtual machine, tiT is used for indicating whether the virtual machine needs to be migrated from the physical machine to another physical machineiIs 0 or 1, tiWhen the value is 0, the virtual machine does not need to be migrated from the physical machine to another physical machine; t is tiWhen the number of the virtual machines is 1, the virtual machine needs to be migrated from the physical machine where the virtual machine is located 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 overhead is embodied by the memory amount of the virtual machine to be migrated, and when the number of virtual machines to be migrated is more, the calculated F is obtainedm(x) The smaller the value is, 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, a user can enable the migration management controller to periodically execute the virtual machine migration operation by setting the virtual machine migration period, so that the virtual machine distribution can be periodically updated, the resource utilization rate of the virtual machine is improved, and multi-objective optimization is realized. Optionally, the user may also manually trigger the migration management controller to perform the virtual machine migration operation.
In a second aspect, the present application provides a computing device comprising: the system comprises a display module, a resource pool and a resource management module, wherein the display module is used for providing a configuration interface, the configuration interface is used for prompting a user to input a preset condition, and the preset condition is used for restricting the virtual machine migration mode in the resource pool; the processing module is used for acquiring the preset condition from the configuration interface and determining a virtual machine migration sequence according to the preset condition and the relevant information of the virtual machine in the resource pool; and the migration module is used for migrating the virtual machines in the resource pool according to the virtual machine migration sequence.
With reference to the second aspect, in a possible implementation manner of the second aspect, the preset conditions include a physical machine cluster where a virtual machine to be migrated is located, a target weight to be optimized, a virtual machine that cannot be migrated, and a physical machine that preferentially migrates to the empty, 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.
With reference to the second aspect, in a possible implementation manner of the second aspect, the virtual machine related information 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, and the state 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 is specifically configured to: generating a plurality of candidate position information according to the current position information; selecting target position information from the candidate position information according to the state information, wherein when the virtual machines of the resource pool are distributed on the physical machines in the resource pool according to the target position information, the comprehensive score of the resource utilization rate of the virtual machines, the migration cost of the virtual machines and the load balance value of the physical machines in the resource pool is highest; and determining a virtual machine migration sequence according to the target position information.
With reference to the second aspect, in a possible implementation manner of the second aspect, the processing module is further configured to: respectively inputting the candidate position information and the state information into a comprehensive scoring function to obtain comprehensive scores; and when the comprehensive score meets a threshold condition, taking the candidate position information corresponding to the comprehensive score meeting the threshold condition as the target position information.
With reference to the second aspect, in a possible implementation manner of the second aspect, the processing module is further configured to: 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; and performing genetic algorithm processing on the parent candidate position information, inputting a processing result into the comprehensive scoring function until the comprehensive score output by the comprehensive scoring function meets the threshold condition, and taking the candidate position information corresponding to the comprehensive score meeting the threshold condition as the target position information.
With reference to the second aspect, in a 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 score function is:
F(x)=Wu·Fu(x)+Wb·Fb(x)+Wm·Fm(x)
wherein, F isu(x) As a function of virtual machine resource utilization score, said WuIs the said Fu(x) A corresponding weight; said Fb(x) Scoring a function for a physical machine load balance value, said WbIs the said Fb(x) A corresponding weight; said Fm(x) A scoring function for virtual machine migration cost, said WmIs the said Fm(x) The corresponding weight.
With reference to the second aspect, in a possible implementation manner of the second aspect, the resource demand of the virtual machine includes a processor demand, a memory demand, and a network demand 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 scoring function of the resource utilization rate of the virtual machine is as follows:
Figure BDA0002733827060000051
wherein, the
Figure BDA0002733827060000052
Is processor demand of a virtual machine, the
Figure BDA0002733827060000053
A processor quota for a physical machine in which the virtual machine resides; the above-mentioned
Figure BDA0002733827060000054
Is the memory requirement of the virtual machine, the
Figure BDA0002733827060000055
The memory quota of the physical machine where the virtual machine is located; the above-mentioned
Figure BDA0002733827060000056
Network demand for a virtual machine, said
Figure BDA0002733827060000057
Network quota for the physical machine where the virtual machine is located; and 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:
Figure BDA0002733827060000058
wherein, the
Figure BDA0002733827060000059
Is the processor utilization of the physical machine, the
Figure BDA00027338270600000510
Average utilization of processors for physical machines in the resource pool; the above-mentioned
Figure BDA00027338270600000511
Is the memory utilization of the physical machine, the
Figure BDA00027338270600000512
The average utilization rate of the memory of the physical machine in the resource pool is obtained; the above-mentioned
Figure BDA00027338270600000513
Is the network utilization of the physical machine, the
Figure BDA00027338270600000514
And the network average utilization rate of the physical machine in the resource pool is obtained.
With reference to the second aspect, in a possible implementation manner of the second aspect, the resource demand of the virtual machine includes a virtual machine memory demand, and the virtual machine migration overhead scoring function is:
Figure BDA0002733827060000061
wherein,
Figure BDA0002733827060000062
is the memory requirement of the virtual machine, tiT is used for indicating whether the virtual machine needs to be migrated from the physical machine to another physical machineiIs 0 or 1, tiWhen the value is 0, the virtual machine does not need to be migrated from the physical machine to another physical machine; t is tiWhen the number of the virtual machines is 1, the virtual machine needs to be migrated from the physical machine where the virtual machine is located 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, where the computing device includes a processor and a memory, where the memory is used to store program codes, and the processor is used to call the program codes in the memory to execute the first aspect and the method implemented in conjunction with any one of the first aspects.
In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program can implement the first aspect and the flow of the virtual machine migration method provided in connection with any one implementation manner of the first aspect.
In a fifth aspect, the present application provides a computer program product, which includes instructions that, when executed by a computer, enable the computer to perform the first aspect and the flow of the virtual machine migration method provided in connection with any one implementation manner of the first aspect.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present application;
FIG. 2 is a diagram of a system architecture provided by an embodiment of the present application;
FIG. 3 is a schematic structural diagram of a physical machine according to an embodiment of the present disclosure;
fig. 4 is a schematic flowchart 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 interface diagram before task creation according to an embodiment of the present disclosure;
FIG. 6B is a schematic interface diagram for task creation according to an embodiment of the present disclosure;
FIG. 6C is a schematic diagram of an interface for performing tasks according to an embodiment of the present disclosure;
FIG. 6D is a schematic interface diagram of a task query according to an embodiment of the present disclosure;
fig. 7A is a schematic diagram of block coding location information according to an embodiment of the present application;
fig. 7B is a schematic diagram of vector encoding of location information according to an embodiment of the present application;
fig. 7C is a schematic diagram of another embodiment of the present application for vector-coding location information;
fig. 7D is a schematic diagram of matrix encoding of location 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 in an embodiment of the present application;
fig. 10 is a schematic diagram of a virtual machine migration process provided in an embodiment of the present application;
FIG. 11 is a schematic structural diagram of a computing device according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of another computing device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application are described below clearly and completely with reference to the accompanying drawings, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase 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. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
First, a part of words and related technologies referred to in the present application will be explained with reference to the accompanying drawings so as to be easily 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 physical machine can run one or more virtual machines.
The migration of the virtual machine means that the physical machine running the virtual machine is changed, for example, the virtual machine a runs on the physical machine 1, and now the virtual machine a needs to be migrated to the physical machine 2, then the virtual machine a will run on the physical machine 2, and the virtual machine a will not exist on the physical machine 1.
The genetic algorithm (genetic algorithm) is a randomized search method evolved by the evolution law of the biology world for reference, and is mainly characterized in that a structural object is directly operated, the derivation and the limitation of function continuity do not exist, and the genetic algorithm has the inherent invisibility and better global optimization capability; by adopting a probabilistic optimization method, the optimized search space can be automatically acquired and guided, the search direction can be adaptively adjusted, and no determined rule is needed. The genetic algorithm is a general algorithm for solving the search problem, and can be used for various general problems. The common features of the search algorithms are: firstly, forming a group of candidate solutions; calculating the fitness of the candidate solutions according to certain adaptability conditions; reserving some candidate solutions according to the fitness and abandoning other candidate solutions; and operating the reserved candidate solution to generate a new candidate solution. In genetic algorithms, however, the above-mentioned several features are combined in a special way: based on parallel searches of chromosome clusters, selection operations with guess properties, crossover operations and mutation operations.
The application provides a virtual machine migration method, which is executed by a virtual machine migration system, wherein the virtual machine migration system specifically includes one or more virtual machine monitors, each virtual machine monitor monitors a plurality of virtual machines, and further includes a migration management controller, 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 the acquired related information of the virtual machines in a resource pool, and completes the migration of the virtual machines. The migration method can ensure that multi-objective optimization is realized in the virtual machine migration process.
As shown in fig. 1, the resource pool includes 4 physical machines, which are a physical machine 1, a physical machine 2, a physical machine 3, and a physical machine 4, where two virtual machines are deployed on each physical machine, for example, a virtual machine 1(VM1) and a virtual machine 2(VM2) are deployed on the physical machine 1, and these virtual machines may be migrated between different physical machines. For example, virtual machine 1 begins to be deployed on physical machine 1, which may be migrated to physical machine 2, and virtual machine 5 begins to be deployed on physical machine 3, which may be migrated to physical machine 4.
The virtual machine migration system is used for monitoring the virtual machines in the resource pool, dynamically migrating the virtual machines according to the monitoring information and realizing 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 respectively are a physical machine a — a physical machine H, and 8 physical machines form a resource pool, a virtual machine monitor is deployed in each physical machine, the migration management controller 210 is configured to monitor the virtual machines in the physical machine, report the monitored location information and state information of the virtual machines to the migration management controller 210, generate a plurality of candidate location information according to the location information and state information of the virtual machines 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 requirements from the candidate location information, the method and the device can achieve the purpose of optimizing multiple targets in the process of migrating the virtual machine, such as virtual machine resource utilization rate, migration overhead, load balancing and the like.
Furthermore, 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, which is described below with reference to physical machine a as an example, and other physical machines are similar to physical machine a. As shown in fig. 3, the physical machine a includes a hardware structure 2210 and a software structure 2220, where the hardware structure 2210 includes a processor 2211 (for providing processor resources), a memory 2212 (for providing memory resources), and a network card 2213 (for providing network resources), the software structure 2220 includes an operating system 2221, a virtual machine 2222 (i.e., VM3), and a virtual machine 2223 (i.e., VM4), the operating system 2221 includes a virtual machine monitor 22210, which is used to monitor the virtual machine 2222 and the virtual machine 2223 and obtain location information and state 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 that need to be virtualized.
Based on the above, the virtual machine migration method and the related device provided by the embodiment of the present application are described below. Referring to fig. 4, fig. 4 is a schematic flowchart of a virtual machine migration method according to an embodiment of the present disclosure. As shown in fig. 4, the method includes, but is not limited to, the following steps:
s401: the migration management controller provides a configuration interface.
Specifically, the migration management controller prompts a user to input a preset condition by providing a configuration interface, and the user inputs the preset condition based on the configuration interface, wherein the preset condition is used for restricting the virtual machine migration mode in the resource pool.
Optionally, the preset conditions include a physical machine cluster where a virtual machine to be migrated is located, a target weight to be optimized, a virtual machine that cannot be migrated, and a physical machine that preferentially migrates to the air, 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.
For example, as shown in fig. 5, fig. 5 is a schematic diagram of a configuration interface provided in an embodiment of the present application, a user creates a virtual machine migration task based on the configuration interface, and the user can select a pod name where a container is located and 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 be migrated out of the virtual machine and an identifier corresponding to a physical machine that needs to be migrated in, and select and set preset parameters, for example, an identifier corresponding to a physical machine that preferentially migrates empty, a virtual machine that cannot migrate, a virtual machine resource utilization rate, a physical machine load and a virtual machine migration overhead weight, migration times, and the like, and the user can also select a migration algorithm and an integration algorithm on the configuration interface, thereby showing an integration effect (i.e., an effect after virtual machine migration) and showing migration step information, and after the user completes all selections, by clicking a confirmation button in the interface, the migration management controller can generate a virtual machine migration task according to various parameters selected and input by a user, and the virtual machine migration is carried out.
S402: and 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, executes, and queries the virtual machine migration tasks, refer to fig. 6A-6D. Fig. 6A is an interface schematic diagram before task creation provided in an embodiment of the present application, where a defragmentation option on the left side of the interface corresponds to virtual machine migration in the present application, the option includes two sub-options, namely a host group and a task, the host group option includes a plurality of host group lists, each host group has a corresponding name, identifier, number of hosts, creation time, metadata, and the like, and any one host group can be selected to create a defragmentation task, as shown in fig. 6B, after a user has selected a host group, based on a selection interface corresponding to the host group, corresponding parameters, such as an integration algorithm, a migration algorithm, a virtual machine resource utilization ratio weight, a virtual machine migration cost weight, a physical machine load balance value weight, a virtual machine that cannot be migrated, a physical machine that preferentially migrates to empty, and then clicks a determination button to complete task creation, after the task is created, the migration management controller may execute the task, as shown in fig. 6C, the task option includes a plurality of task lists, each task has a corresponding task identifier, a host group identifier, status information (normal or error), an initially empty host number, a commit time, and optional operations (e.g., sorting, querying, suspending, retrying, deleting, etc.), and it should be noted that the migration management controller may execute a plurality of tasks at the same time. In addition, for each task, a real-time query may be performed, as shown in fig. 6D, for a first task, that is, a task identified as 13e98c72-6fb-465D, a click query may be performed to query relevant information of the first task, for example, an integration algorithm, a migration algorithm, a final number of empty hosts, a number of virtual machines to be migrated, a number of memories to be migrated, and a number of CPUs to be migrated corresponding to the first task may be queried.
S403: and the migration management controller acquires the current position information and the state information of the virtual machine reported by the virtual machine monitor.
In this application, the virtual machine monitor may be any one of the virtual machine monitors deployed in the cloud resource pool. The cloud resource pool comprises a plurality of physical machines, each physical machine is provided with one or more virtual machines, and each physical machine is provided with a virtual machine monitor for monitoring all the 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 multi-objective simultaneous optimization, such as simultaneously improving resource utilization rate, realizing load balancing, reducing migration overhead, meeting service-level aggregation (SLA) requirements and the like.
Specifically, the migration management controller may determine, through the received current location information, the physical machines to which all the virtual machines in the cloud resource pool belong, that is, the correspondence between the current virtual machine and the physical machine is 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 coding on the current location information, that is, the virtual machines located on the same physical machine are grouped into one group, for example, the virtual machine 3 and the virtual machine 4 are grouped into one group, and are located on the physical machine a; virtual machine 2, virtual machine 9, and virtual machine 11 are in a group and located on physical machine D, and virtual machine 1 and virtual machine 5 are in a group 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 Identification (ID) of the virtual machine is 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, and 12, and the identification 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 identified as 3 and 4 are located on the physical machine identified as a, virtual machines identified as 12 are located on the physical machine identified as B, virtual machines identified as 8 and 10 are located on the physical machine identified as C, virtual machines identified as 2, 9 and 11 are located on the physical machine identified as D, virtual machines identified as 1 and 5 are located on the physical machine identified as E, virtual machine identified as 6 is located on the physical machine identified as F, and virtual machine identified as 7 is located on the physical machine identified as H. For ease of presentation, the identification 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 can be converted into a matrix code. As shown in fig. 7D, the vector code shown in fig. 7C corresponds to a matrix form of codes, and the deployment of the virtual machine can be obtained through the matrix. The number of 1's in each row indicates the number of virtual machines existing in one physical machine, and the 1's in each column indicate on which physical machine the virtual machine having the identification corresponding to the column is located.
S404: the migration management controller generates a plurality of candidate location information according to the current location information of the virtual machine.
Specifically, the migration management controller may randomly generate a plurality of candidate location information, and perform matrix-form encoding on the plurality of candidate location information 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 the difference is that the positions of 1 are different, that is, the corresponding (attribution) relationship between the virtual machine and the physical machine is different.
S405: the migration management controller selects target location information among the plurality of candidate location information according to the state information.
In one possible implementation manner, the migration management controller respectively inputs a plurality of candidate position information and the state information into a comprehensive scoring function to obtain comprehensive scores; and when the comprehensive score meets the threshold condition, taking the candidate position information corresponding to the comprehensive score meeting the threshold condition as the target position information.
It is to be understood that the state information corresponding to different pieces of candidate position information is not the same, and therefore, the composite score calculated after the composite score function is input is different, and after each piece of candidate position information is calculated, candidate position information satisfying the threshold condition is selected as target position information. In addition, the threshold condition may be set according to the requirement, for example, may be set to 0.85, or may be other values, which is not limited in this application.
Optionally, 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 score function is:
F(x)=Wu·Fu(x)+Wb·Fb(x)+Wm·Fm(x)
wherein, F isu(x) As a function of virtual machine resource utilization score, said WuIs the said Fu(x) A corresponding weight; said Fb(x) Scoring a function for a physical machine load balance value, said WbIs the said Fb(x) A corresponding weight; said Fm(x) A scoring function for migration costs of the virtual machines, saidWmIs the said Fm(x) The corresponding weight.
Specifically, the migration management controller evaluates each candidate location information from three targets, namely, virtual machine resource utilization rate, virtual machine migration overhead and physical machine load balancing, so that it is ensured that the finally selected target location information can optimize the three targets at the same time. In addition, a weight sum idea is adopted to realize multi-objective optimization, each sub-scoring function (for example, a virtual machine resource utilization scoring function) corresponds to a weight, and a specific value of the weight can be obtained according to an empirical value or obtained in other manners, which is not limited in the present application.
Further, the resource demand of the virtual machine is a resource required by the virtual machine to run on the physical machine, and mainly includes a processor (CPU) demand, a memory (memory) demand, and a network demand (also may be referred to as a bandwidth demand) of the virtual machine, and the resource limit of the physical machine is a resource that can be provided by the physical machine, and mainly includes a processor limit, a memory limit, and a network limit. The virtual machine resource utilization scoring function may be:
Figure BDA0002733827060000111
wherein, the
Figure BDA0002733827060000112
The amount of processor demand for 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,
Figure BDA0002733827060000113
the processor quota for the physical machine in which the virtual machine is located, that is, the total amount of processor resources that can be provided by the physical machine in which the virtual machine is located; the above-mentioned
Figure BDA0002733827060000114
Memory requirements for all virtual machines within a physical machine, i.e. creationThe sum of the memory resources required by all the virtual machines in the physical machine, said
Figure BDA0002733827060000115
The memory quota of the physical machine where the virtual machine is located, that is, the total amount of memory resources that can be provided by the physical machine where the virtual machine is located; the above-mentioned
Figure BDA0002733827060000116
The network demand for all virtual machines within a physical machine, i.e. the sum of the network resources required to create all virtual machines within the physical machine, the
Figure BDA0002733827060000117
The network quota for the physical machine in which the virtual machine is located, that is, the total amount of network resources that can be provided by the physical machine in which 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 resource utilization rate of the virtual machine is embodied by the square sum of the utilization rates of various types of resources in each physical machine, and in addition, normalization processing is carried out, namely F is obtained by dividing by 3n and calculatingu(x) Namely the resource utilization rate of the virtual machine. It should also be understood that for different candidate location information, the corresponding parameters are different, i.e.
Figure BDA0002733827060000118
Etc. are not identical, ultimately resulting in a calculated Fu(x) As well as being different.
For example, assume that there are 8 physical machines, identified as 1-8, with a fixed resource limit for each physical machine, and 12 virtual machines, identified as 1-12, with a fixed resource demand for each virtual machine. As shown in fig. 8, for the candidate location information 1, the virtual machine 2, and the virtual machine 3 are located on the physical machine 1, and the virtual machine 4, the virtual machine 6, and the virtual machine 6 are located on the physical machine 1The virtual machine 11 is positioned on the physical machine 4, the virtual machine 8 and the virtual machine 12 are positioned on the physical machine 6, and the virtual machine 5, the virtual machine 7, the virtual machine 9 and the virtual machine 11 are positioned on the physical machine 8; in the calculation of Fu(x) In this case, since there is no virtual machine on the physical machine 2, the physical machine 3, the physical machine 5, and the physical machine 7, the virtual machine is not present on the physical machine 2, the physical machine 3, the physical machine 5, and the physical machine 7
Figure BDA0002733827060000119
0, memory requirement and network requirement are also 0, and the physical machine 1 has a virtual machine 1, a virtual machine 2 and a virtual machine 3, then
Figure BDA00027338270600001110
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,
Figure BDA00027338270600001111
for processor quota of physical machine 1, the same can be calculated
Figure BDA00027338270600001112
And
Figure BDA00027338270600001113
for the physical machine 4, the physical machine 6, and the physical machine 8, calculation may be performed according to the above method, and F corresponding to the candidate position information 1 may be finally obtainedu(x)。
For the candidate location 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, and the virtual machine 1, the virtual machine 4, the virtual machine 10, and the virtual machine 11 are located on the physical machine 7; f corresponding to candidate position information 2 can be calculated according to the above methodu(x) In that respect 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, and the virtual machine 9, the virtual machine 10, the virtual machine 11 and the virtual machine 12 are located on the physical machine 8; calculating candidate position information 3 according to the above methodCorresponding Fu(x)。
In one possible implementation, the physical machine load balancing value scoring function is:
Figure BDA0002733827060000121
wherein,
Figure BDA0002733827060000122
the 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 it is capable of providing
Figure BDA0002733827060000123
The average utilization rate of the processors of the physical machines in the resource pool is obtained, namely the average utilization rate of the processors of all the physical machines is added and then divided by the total number of the physical machines;
Figure BDA0002733827060000124
the memory utilization rate of a physical machine, namely the ratio of the memory resources already used by the physical machine to the total amount of the memory resources that can be provided by the physical machine, is described
Figure BDA0002733827060000125
The average utilization rate of the memories of the physical machines in the resource pool is obtained, namely the average utilization rate of the memories of all the physical machines is added and then divided by the total number of the physical machines;
Figure BDA0002733827060000126
the network utilization rate of a physical machine, i.e. the ratio of the network resources already used by the physical machine to the total amount of network resources that it is capable of providing
Figure BDA0002733827060000127
And the network average utilization rate of the physical machines in the resource pool is obtained, namely the network utilization rates of all the physical machines are added and then divided by the total number of the physical machines.
It can be seen that, the whole load balance is embodied by the mean square error of the utilization rate of various resources in each physical machine, normalization processing is also carried out, and F obtained by calculation is obtainedb(x) I.e. the load balancing value. It should be understood that for different candidate location information, the corresponding parameters are different, i.e. the location information is associated with different parameters
Figure BDA0002733827060000128
Etc. are different, ultimately resulting in a calculated Fb(x) Are not identical.
For example, in the candidate location information shown in fig. 8, the virtual machines on the same physical machine are not completely consistent with each other for different candidate location information, resulting in the obtained candidate location information
Figure BDA0002733827060000129
Etc. are inconsistent, exemplary, candidate location information 1 corresponds to
Figure BDA00027338270600001210
Corresponding to candidate position information 2
Figure BDA00027338270600001211
It is not the same that the two,
Figure BDA00027338270600001212
are also inconsistent. Similarly, for other parameters, the parameters may also change with the change of the candidate location information, and are not described in detail.
In one possible implementation, the virtual machine migration cost scoring function is:
Figure BDA00027338270600001213
wherein,
Figure BDA0002733827060000131
for the memory requirement of a virtual machine, i.e. the amount of memory resources allocated to the virtual machine when the virtual machine is created,tithe t is whether the virtual machine needs to be migrated from the physical machine to another physical machineiIs 0 or 1, tiWhen the value is 0, the virtual machine does not need to be migrated from the physical machine to another physical machine; t is tiWhen the number of the virtual machines is 1, the virtual machine needs to be migrated from the physical machine where the virtual machine is located to another physical machine, where M is the number of the virtual machines in the 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 the migration overhead of the virtual machine is mainly embodied by the ratio of the total memory requirement of the virtual machine to be migrated to the total memory requirement of all the virtual machines, and F is calculatedm(x) I.e., the virtual machine migration overhead. It should be appreciated that for different candidate location information, the virtual machines that need to be migrated are not the same as compared to the current location information, resulting in a calculated Fm(x) Are not identical.
For example, as the candidate location information 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 location information after migration, the virtual machine that the candidate location information 2 needs to migrate with respect to the current location information and the virtual machine that the candidate location information 3 needs to migrate with respect to the current location information are not consistent, and F is calculatedm(x) Are also inconsistent.
In one possible implementation manner, when the composite score does not meet the threshold condition, selecting candidate position information closest to the threshold condition from candidate position information corresponding to the composite score which does not meet the threshold condition as parent candidate position information; and performing genetic algorithm processing on the parent candidate position information, inputting a processing result into the comprehensive scoring function until the comprehensive score output by the comprehensive scoring function meets the threshold condition, and taking the candidate position information corresponding to the comprehensive score meeting the threshold condition as target position information.
Specifically, none of the randomly generated candidate location information may meet the requirement, that is, the calculated composite score does not meet the threshold condition, but the composite score calculated by some candidate location information is relatively high, and the composite score calculated by some candidate location information is relatively low, and at this time, it is necessary to select candidate location information close to the threshold condition as parent candidate location information and perform genetic algorithm processing. For example, the composite scores corresponding to all candidate location information may be sorted in descending order, and the top 100 or 200 may be selected as parent candidate location information for genetic algorithm processing.
It should be understood 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 crossover operator (may also be referred to as a chromosome) for crossover is selected, that is, two pieces of candidate position information are selected as crossover operators from parent generation candidate position information. As shown in fig. 9, a and B are two chromosomes, each of which represents candidate location information, where 8 physical machines exist in chromosome a, and their corresponding identifiers are a, B, C, D, E, F, G, and 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, for example, when the virtual machine on physical machine a in chromosome a replaces the virtual machine on physical machine a in chromosome b, the virtual machine on physical machine a in chromosome b needs to be put into the temporary queue, as shown in fig. 9.
Next, all the virtual machines on the physical machine on which the duplicate virtual machine appears after the replacement are placed in the temporary queue, and as shown in fig. 9, after the replacement, the physical machine B, the physical machine D, and the physical machine E in the chromosome B appear duplicate virtual machines, and at this time, it is necessary to place the virtual machine 1 on the physical machine B, the virtual machine 2 and the virtual machine 3 on the physical machine D, and the virtual machine 4 and the virtual machine 6 on the physical machine E in the temporary queue.
Finally, the virtual machines which are not duplicated (i.e. do not exist in the chromosome) in the temporary queue are reinserted into the physical machines, as shown in fig. 9, the virtual machine 1, the virtual machine 2, the virtual machine 3, the virtual machine 4, the virtual machine 5 and the virtual machine 6 exist in the temporary queue, wherein the virtual machine 1, the virtual machine 2 and the virtual machine 4 already exist in the chromosome b and do not need to be reinserted, and the virtual machine 3, the virtual machine 5 and the virtual machine 6 need to be reinserted onto the physical machine in the chromosome b, and the virtual machine 3, the virtual machine 5 and the virtual machine 6 are inserted into the physical machine E. Alternatively, a local optimization algorithm may be used for the interpolation.
In particular, portions of the chromosome may be randomly selected for mutation. The specific rule is that a certain physical machine in the chromosome is marked as invalid at random, the virtual machine on the physical machine is put into a temporary queue, and then the virtual machine in the temporary queue is reinserted into other physical machines in the chromosome by adopting algorithms such as local optimization and the like.
For example, chromosome a shown in fig. 9 is selected for mutation, physical machine E in chromosome a is marked as invalid, virtual machine 3 and virtual machine 6 on physical machine E are placed in a temporary queue, and finally virtual machine 3 and virtual machine 6 are reinserted into physical machine D by using a local optimization algorithm.
After hybridization and mutation, more candidate position information is obtained, the candidate position information and the state information are respectively input into a comprehensive scoring function to obtain comprehensive scores, whether the comprehensive scores meet threshold conditions or not is judged, and the candidate position information meeting the threshold conditions 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 (namely hybridizing and mutating) 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.
S406: and 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.
Illustratively, as shown in fig. 10, there are 12 virtual machines respectively deployed on 8 physical machines, where the initial deployment (i.e. current location information) is: 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 post-optimization deployment (i.e., target location information) is: 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, and are consistent with the candidate location information 2 shown in fig. 8, that is, the candidate location information 2 is determined target location information. Thus, the migration sequence generated is: 5:7, 4:2, 1:7, 5:2, 6:3, 8:3, NA, 4:3, 3:7, 4:7, NA. Wherein, 5:7 represents that the virtual machine 1 is migrated from the physical machine to the physical machine 7, 4:2 represents that the virtual machine 2 is migrated from the physical machine 4 to the physical machine 2, the others also represent that the corresponding virtual machine is migrated from the original physical machine to the new physical machine, and NA represents that no migration is required, for example, the virtual machine 8 and the virtual machine 12 do not need to be migrated, and are still deployed on the physical machine 3 and the 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 migrations (i.e., one migration and one migration) are simultaneously supported, so in order to improve migration efficiency, migration may be performed in multiple rounds, and parallel migration is implemented in each round.
Illustratively, as shown in fig. 10 above, the virtual machine parallel migration is completed in four rounds in total, and in the first round, the virtual machine 1 is migrated from the physical machine 5 to the physical machine 7, the virtual machine 2 is migrated from the physical machine 4 to the physical machine 2, and the virtual machine 6 is migrated from the physical machine 6 to the physical machine 3; after completion, performing a second round of migration, and simultaneously migrating the virtual machine 3 from the physical machine 1 to the physical machine 2, migrating the virtual machine 7 from the physical machine 8 to the physical machine 3, and migrating the virtual machine 4 from the physical machine 4 to the physical machine 7; then, performing a third round of migration, and simultaneously migrating the virtual machine 4 from the physical machine 1 to the physical machine 7, migrating the virtual machine 5 from the physical machine 5 to the physical machine 2, and migrating the virtual machine 9 from the physical machine 4 to the physical machine 3; finally, a fourth migration is performed to migrate the virtual machine 10 from the physical machine 3 to the physical machine 7.
The method of the embodiments of the present application is described in detail above, and in order to better implement the above-mentioned aspects of the embodiments of the present application, correspondingly, the following also provides related equipment for implementing the above-mentioned aspects in a matching manner.
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 in fig. 4, and may execute the method and steps of taking the migration management controller as an execution subject in the virtual machine migration method embodiment described 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 used to prompt a user to input a preset condition, and the preset condition is used to constrain a virtual machine migration manner in a 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 relevant information of the virtual machine in the resource pool;
a migration module 130, 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 a virtual machine to be migrated is located, a target weight to be optimized, a virtual machine which cannot be migrated, and a physical machine which is preferentially 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 an embodiment, 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, and the state information includes a resource demand of the virtual machine, a resource usage of the virtual machine, and a resource quota of the physical machine in which the virtual machine is located, and the processing module 120 is specifically configured to: generating a plurality of candidate position information according to the current position information; selecting target position information from the candidate position information according to the state information, wherein when the virtual machines of the resource pool are distributed on the physical machines in the resource pool according to the target position information, the comprehensive score of the resource utilization rate of the virtual machines, the migration cost of the virtual machines and the load balance value of the physical machines in the resource pool is highest; and determining a virtual machine migration sequence according to the target position information.
As an embodiment, the processing module 120 is further configured to: respectively inputting the candidate position information and the state information into a comprehensive scoring function to obtain comprehensive scores; and when the comprehensive score meets a threshold condition, taking the candidate position information corresponding to the comprehensive score meeting the threshold condition as the target position information.
As an embodiment, the processing module 120 is further configured to: 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; and performing genetic algorithm processing on the parent candidate position information, inputting a processing result into the comprehensive scoring function until the comprehensive score output by the comprehensive scoring function meets the threshold condition, and taking the candidate position information corresponding to the comprehensive score meeting the threshold condition as the target position information.
As an 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 score function is:
F(x)=Wu·Fu(x)+Wb·Fb(x)+Wm·Fm(x)
wherein, F isu(x) As a function of virtual machine resource utilization score, said WuIs the said Fu(x) A corresponding weight; said Fb(x) Scoring a function for a physical machine load balance value, said WbIs the said Fb(x) A corresponding weight; said Fm(x) A scoring function for virtual machine migration cost, said WmIs the said Fm(x) The corresponding weight.
As an 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 quota of the physical machine includes a processor quota, a memory quota, and a network quota of the physical machine, and the scoring function of the resource utilization of the virtual machine is as follows:
Figure BDA0002733827060000161
wherein, the
Figure BDA0002733827060000162
Is the processor demand of the virtual machine,
Figure BDA0002733827060000163
a processor quota for a physical machine in which the virtual machine resides; the above-mentioned
Figure BDA0002733827060000164
Is the memory requirement of the virtual machine, the
Figure BDA0002733827060000165
The memory quota of the physical machine where the virtual machine is located; the above-mentioned
Figure BDA0002733827060000166
Network demand for a virtual machine, said
Figure BDA0002733827060000167
Network quota for the physical machine where the virtual machine is located; and n is the number of the physical machines in the resource pool.
As an embodiment, the physical machine load balancing value scoring function is:
Figure BDA0002733827060000168
wherein,
Figure BDA0002733827060000169
is the processor utilization of the physical machine, the
Figure BDA00027338270600001610
Average utilization of processors for physical machines in the resource pool;
Figure BDA00027338270600001611
is the memory utilization of the physical machine, the
Figure BDA00027338270600001612
The average utilization rate of the memory of the physical machine in the resource pool is obtained;
Figure BDA00027338270600001613
is the network utilization of the physical machine, the
Figure BDA00027338270600001614
And the network average utilization rate of the physical machine in the resource pool is obtained.
As an embodiment, the virtual machine migration cost scoring function is:
Figure BDA00027338270600001615
wherein,
Figure BDA00027338270600001616
is the memory requirement of the virtual machine, tiT is used for indicating whether the virtual machine needs to be migrated from the physical machine to another physical machineiIs 0 or 1, tiWhen the value is 0, the virtual machine does not need to be migrated from the physical machine to another physical machine; t is tiWhen the number of the virtual machines is 1, the virtual machine needs to be migrated from the physical machine where the virtual machine is located to another physical machine, and M is the number of the virtual machines in the resource pool.
It is understood that the display module 110 in the embodiments of the present application may be implemented by a display or a display-related circuit component, and the processing module 120 and the migration module 130 may be implemented by a processor or a processor-related circuit component.
It should be noted that the structure of the computing device is merely an example, and should not be construed as being particularly limited, and various modules in the computing device may be added, reduced or combined as needed. In addition, the operations and/or functions of the modules in the computing device are for implementing the corresponding flows of the method described in fig. 4, and are not described herein again 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 connected to each other through an internal bus 240. It should be understood 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 formed by one or more general-purpose processors, such as a Central Processing Unit (CPU), or a combination of a CPU and a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
The bus 240 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus 240 may be divided 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 type of bus.
Memory 230 may include volatile memory (volatile memory), such as Random Access Memory (RAM); the memory 230 may also include a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), a flash memory (flash memory), a Hard Disk Drive (HDD), or a solid-state drive (SSD); memory 230 may also include combinations of the above categories. Memory 230 may be used to store programs and data to facilitate processor 210 in invoking program code stored in memory 230 to implement the virtual machine migration methods described above. The program code may be functional modules for implementing the computing device shown in fig. 11, or for implementing the method steps having the migration management controller as the execution subject in the method embodiment shown in fig. 4.
The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program can implement part or all of the steps of any one of the above method embodiments.
Embodiments of the present invention further provide a computer program, where the computer program includes instructions, and when the computer program is executed by a computer, the computer may perform part or all of the steps of any one of the virtual machine migration methods.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.

Claims (23)

1. A virtual machine migration method is characterized by comprising the following steps:
providing a configuration interface, wherein the configuration interface is used for prompting a user to input a preset condition, and the preset condition is used for restricting the virtual machine migration mode in the resource pool;
acquiring the preset condition from the configuration interface, and determining a virtual machine migration sequence according to the preset condition and the relevant information of the virtual machines in the resource pool;
and migrating the virtual machines in the resource pool according to the virtual machine migration sequence.
2. The method according to claim 1, wherein the preset conditions include a physical machine cluster where a virtual machine to be migrated is located, a target weight to be optimized, a virtual machine which cannot be migrated, and a physical machine which is preferentially migrated to be empty, and the target to be optimized includes a virtual machine resource utilization rate, a physical machine load balancing value, and a virtual machine migration overhead.
3. The method according to claim 1 or 2, wherein the virtual machine related information in the resource pool includes current location information of the virtual machine and state information, 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 amount of the virtual machine, a resource usage amount of the virtual machine, and a resource quota of the physical machine in which the virtual machine is located, and the determining a virtual machine migration sequence according to the preset condition and the virtual machine related information in the resource pool includes:
generating a plurality of candidate position information according to the current position information;
selecting target position information from the candidate position information according to the state information, wherein when the virtual machines of the resource pool are distributed on the physical machines in the resource pool according to the target position information, the comprehensive score of the resource utilization rate of the virtual machines, the migration cost of the virtual machines and the load balance value of the physical machines in the resource pool is highest;
and determining a virtual machine migration sequence according to the target position information.
4. The method of claim 3, wherein selecting target location information among a plurality of candidate location information based on the status information comprises:
respectively inputting the candidate position information and the state information into a comprehensive scoring function to obtain comprehensive scores;
and when the comprehensive score meets a threshold condition, taking the candidate position information corresponding to the comprehensive score meeting the threshold condition as the target position information.
5. The method of claim 4, wherein selecting target location information from a plurality of candidate location information based on the status information further comprises:
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;
and performing genetic algorithm processing on the parent candidate position information, inputting a processing result into the comprehensive scoring function until the comprehensive score output by the comprehensive scoring function meets the threshold condition, and taking the candidate position information corresponding to the comprehensive score meeting the threshold condition as the target position information.
6. The method of claim 4 or 5, wherein the composite score comprises a virtual machine resource utilization score, a virtual machine migration overhead score, and a physical machine load balancing value score, and wherein the composite score function is:
F(x)=Wu·Fu(x)+Wb·Fb(x)+Wm·Fm(x)
wherein, F isu(x) Scoring virtual machine resource utilizationFunction of said WuIs the said Fu(x) A corresponding weight; said Fb(x) Scoring a function for a physical machine load balance value, said WbIs the said Fb(x) A corresponding weight; said Fm(x) A scoring function for virtual machine migration cost, said WmIs the said Fm(x) The corresponding weight.
7. The method of claim 6, wherein the resource demand of the virtual machine includes processor demand, memory demand, and network demand of the virtual machine, the resource quota of the physical machine includes processor quota, memory quota, and network quota of the physical machine, and the scoring function of the resource utilization of the virtual machine is:
Figure FDA0002733827050000021
wherein, the
Figure FDA0002733827050000022
Is processor demand of a virtual machine, the
Figure FDA0002733827050000023
A processor quota for a physical machine in which the virtual machine resides; the above-mentioned
Figure FDA0002733827050000024
Is the memory requirement of the virtual machine, the
Figure FDA0002733827050000025
The memory quota of the physical machine where the virtual machine is located; the above-mentioned
Figure FDA00027338270500000217
Network demand for a virtual machine, said
Figure FDA0002733827050000027
Network quota for the physical machine where the virtual machine is located; and n is the number of the physical machines in the resource pool.
8. The method of claim 6 or 7, wherein the physical machine load balancing value scoring function is:
Figure FDA0002733827050000028
wherein, the
Figure FDA0002733827050000029
Is the processor utilization of the physical machine, the
Figure FDA00027338270500000210
Average utilization of processors for physical machines in the resource pool; the above-mentioned
Figure FDA00027338270500000211
Is the memory utilization of the physical machine, the
Figure FDA00027338270500000212
The average utilization rate of the memory of the physical machine in the resource pool is obtained; the above-mentioned
Figure FDA00027338270500000213
Is the network utilization of the physical machine, the
Figure FDA00027338270500000214
And the network average utilization rate of the physical machine in the resource pool is obtained.
9. The method of claim 6, wherein the resource demand of the virtual machine comprises a virtual machine memory demand, and wherein the virtual machine migration cost scoring function is:
Figure FDA00027338270500000215
wherein,
Figure FDA00027338270500000216
is the memory requirement of the virtual machine, tiT is used for indicating whether the virtual machine needs to be migrated from the physical machine to another physical machineiIs 0 or 1, tiWhen the value is 0, the virtual machine does not need to be migrated from the physical machine to another physical machine; t is tiWhen the number of the virtual machines is 1, the virtual machine needs to be migrated from the physical machine where the virtual machine is located to another physical machine, and M is the number of the virtual machines in the resource pool.
10. The method of any one of claims 1-9, wherein the configuration interface is further configured to prompt a user to enter a virtual machine migration period, and wherein the virtual machines in the resource pool are periodically migrated according to the virtual machine migration period.
11. A computing device, comprising:
the system comprises a display module, a resource pool and a resource management module, wherein the display module is used for providing a configuration interface, the configuration interface is used for prompting a user to input a preset condition, and the preset condition is used for restricting the virtual machine migration mode in the resource pool;
the processing module is used for acquiring the preset condition from the configuration interface and determining a virtual machine migration sequence according to the preset condition and the relevant information of the virtual machine in the resource pool;
and the migration module is used for migrating the virtual machines in the resource pool according to the virtual machine migration sequence.
12. The computing device of claim 11, wherein the preset conditions include a physical machine cluster in which a virtual machine to be migrated is located, a target weight to be optimized, a virtual machine that cannot be migrated, and a physical machine that preferentially migrates to the empty, and the target to be optimized includes a virtual machine resource utilization rate, a physical machine load balancing value, and a virtual machine migration overhead.
13. The computing device according to claim 11 or 12, wherein the virtual machine related information in the resource pool includes current location information of the virtual machine and state information, 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 amount of the virtual machine, a resource usage amount of the virtual machine, and a resource quota of the physical machine in which the virtual machine is located, and the processing module is specifically configured to:
generating a plurality of candidate position information according to the current position information;
selecting target position information from the candidate position information according to the state information, wherein when the virtual machines of the resource pool are distributed on the physical machines in the resource pool according to the target position information, the comprehensive score of the resource utilization rate of the virtual machines, the migration cost of the virtual machines and the load balance value of the physical machines in the resource pool is highest;
and determining a virtual machine migration sequence according to the target position information.
14. The computing device of claim 13, wherein the processing module is further configured to:
respectively inputting the candidate position information and the state information into a comprehensive scoring function to obtain comprehensive scores;
and when the comprehensive score meets a threshold condition, taking the candidate position information corresponding to the comprehensive score meeting the threshold condition as the target position information.
15. The computing device of claim 14, wherein the processing module is further configured to:
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;
and performing genetic algorithm processing on the parent candidate position information, inputting a processing result into the comprehensive scoring function until the comprehensive score output by the comprehensive scoring function meets the threshold condition, and taking the candidate position information corresponding to the comprehensive score meeting the threshold condition as the target position information.
16. The computing device of claim 14 or 15, wherein the composite score comprises a virtual machine resource utilization score, a virtual machine migration overhead score, and a physical machine load balancing value score, and wherein the composite score function is:
F(x)=Wu·Fu(x)+Wb·Fb(x)+Wm·Fm(x)
wherein, F isu(x) As a function of virtual machine resource utilization score, said WuIs the said Fu(x) A corresponding weight; said Fb(x) Scoring a function for a physical machine load balance value, said WbIs the said Fb(x) A corresponding weight; said Fm(x) A scoring function for virtual machine migration cost, said WmIs the said Fm(x) The corresponding weight.
17. The computing device of claim 16, wherein the resource demand of the virtual machine comprises a processor demand, a memory demand, and a network demand of the virtual machine, wherein the resource quota of the physical machine comprises a processor quota, a memory quota, and a network quota of the physical machine, and wherein the scoring function for the resource utilization of the virtual machine is:
Figure FDA0002733827050000041
wherein, the
Figure FDA0002733827050000042
Is deficiency ofProcessor demand of a virtual machine, said
Figure FDA0002733827050000043
A processor quota for a physical machine in which the virtual machine resides; the above-mentioned
Figure FDA0002733827050000044
Is the memory requirement of the virtual machine, the
Figure FDA0002733827050000045
The memory quota of the physical machine where the virtual machine is located; the above-mentioned
Figure FDA00027338270500000415
Network demand for a virtual machine, said
Figure FDA0002733827050000047
Network quota for the physical machine where the virtual machine is located; and n is the number of the physical machines in the resource pool.
18. The computing device of claim 16 or 17, wherein the physical machine load balancing value scoring function is:
Figure FDA0002733827050000048
wherein, the
Figure FDA0002733827050000049
Is the processor utilization of the physical machine, the
Figure FDA00027338270500000410
Average utilization of processors for physical machines in the resource pool; the above-mentioned
Figure FDA00027338270500000411
Is the memory utilization of the physical machine, the
Figure FDA00027338270500000412
The average utilization rate of the memory of the physical machine in the resource pool is obtained; the above-mentioned
Figure FDA00027338270500000413
Is the network utilization of the physical machine, the
Figure FDA00027338270500000414
And the network average utilization rate of the physical machine in the resource pool is obtained.
19. The computing device of claim 16, wherein the resource demand of the virtual machine comprises a virtual machine memory demand, and wherein the virtual machine migration cost scoring function is:
Figure FDA0002733827050000051
wherein,
Figure FDA0002733827050000052
is the memory requirement of the virtual machine, tiT is used for indicating whether the virtual machine needs to be migrated from the physical machine to another physical machineiIs 0 or 1, tiWhen the value is 0, the virtual machine does not need to be migrated from the physical machine to another physical machine; t is tiWhen the number of the virtual machines is 1, the virtual machine needs to be migrated from the physical machine where the virtual machine is located to another physical machine, and M is the number of the virtual machines in the resource pool.
20. The computing device of any of claims 11-19, wherein the configuration interface is further to prompt a user to enter a virtual machine migration period, the virtual machines in the resource pool periodically migrating according to the virtual machine migration period.
21. A computing device comprising a processor and a memory, the processor and the memory being connected by an internal bus, the memory having instructions stored therein, the processor invoking the instructions in the memory to perform the method of any of claims 1-10.
22. A computer storage medium storing a computer program which, when executed by a processor, implements the method of any one of claims 1-10.
23. A computer program product comprising instructions which, when executed by a computer, cause the computer to carry out the method according to any one of claims 1-10.
CN202011126630.5A 2019-10-24 2020-10-20 Virtual machine migration method and related equipment Pending CN112711461A (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 (1)

Publication Number Publication Date
CN112711461A true CN112711461A (en) 2021-04-27

Family

ID=75542851

Family Applications (1)

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

Country Status (2)

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115952005A (en) * 2023-02-24 2023-04-11 浪潮电子信息产业股份有限公司 Metadata load balancing method, device, equipment and readable storage medium

Family Cites Families (6)

* 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
US9588796B2 (en) * 2014-06-28 2017-03-07 Vmware, Inc. Live migration with pre-opened shared disks
CN104679595B (en) * 2015-03-26 2017-10-13 南京大学 A kind of application oriented IaaS layers of dynamic resource allocation method
CN106293883B (en) * 2016-08-15 2019-09-24 上海交通大学 The Optimal Configuration Method and its system of cloud virtual machine based on mixing extended mode

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115952005A (en) * 2023-02-24 2023-04-11 浪潮电子信息产业股份有限公司 Metadata load balancing method, device, equipment and readable storage medium
CN115952005B (en) * 2023-02-24 2023-05-30 浪潮电子信息产业股份有限公司 Metadata load balancing method, device, equipment and readable storage medium

Also Published As

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

Similar Documents

Publication Publication Date Title
CN107239336B (en) Method and device for realizing task scheduling
US10305815B2 (en) System and method for distributed resource management
EP1564638B1 (en) A method of reassigning objects to processing units
CN103098014A (en) Storage system
EP3537281B1 (en) Storage controller and io request processing method
CN111813500B (en) Multi-target cloud workflow scheduling method and device
CN108427602B (en) Distributed computing task cooperative scheduling method and device
Yin et al. An improved genetic algorithm for task scheduling in cloud computing
JP2019511773A (en) Service parameter selection method and related device
CN104881322A (en) Method and device for dispatching cluster resource based on packing model
Delavar et al. A synthetic heuristic algorithm for independent task scheduling in cloud systems
CN110414569A (en) Cluster realizing method and device
CN110221920A (en) Dispositions method, device, storage medium and system
KR101557747B1 (en) System and method for allocating virtual machine for effective use of multi resource in cloud
CN114461386A (en) Task allocation method and task allocation device
CN109976879B (en) Cloud computing virtual machine placement method based on resource usage curve complementation
CN112000460A (en) Service capacity expansion method based on improved Bayesian algorithm and related equipment
CN106802822A (en) A kind of cloud data center cognitive resources dispatching method based on moth algorithm
CN112711461A (en) Virtual machine migration method and related equipment
Ramezani et al. Task scheduling in cloud environments: A survey of population‐based evolutionary algorithms
US11237745B2 (en) Computer system and volume arrangement method in computer system to reduce resource imbalance
CN113407336B (en) Full-comparison data distribution method based on tabu search optimization algorithm
CN116048723A (en) Virtual machine scheduling method and system based on non-dominant ordering multi-target genetic algorithm
US11928517B2 (en) Feature resource self-tuning and rebalancing
EP3550421B1 (en) Storage controller and io request processing method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
TA01 Transfer of patent application right
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.

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination