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