CN114168266A - Virtual machine migration method and system - Google Patents
Virtual machine migration method and system Download PDFInfo
- Publication number
- CN114168266A CN114168266A CN202111532266.7A CN202111532266A CN114168266A CN 114168266 A CN114168266 A CN 114168266A CN 202111532266 A CN202111532266 A CN 202111532266A CN 114168266 A CN114168266 A CN 114168266A
- Authority
- CN
- China
- Prior art keywords
- virtual machine
- server
- key monitoring
- monitoring index
- time interval
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/4557—Distribution of virtual machine instances; Migration and load balancing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45587—Isolation or security of virtual machine instances
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention provides a virtual machine migration method and a virtual machine migration system. The method comprises the following steps: the method comprises the steps of adding a sample standard deviation on the basis of a sampling mean value of the utilization rate of the virtual machine, subtracting the sampling standard deviation on the basis of a resource idle rate sampling mean value of a server, calculating the distance between each key monitoring index of the virtual machine and each key monitoring index of the server on the basis of the characteristics, finding the most similar matching relation, enabling the target server to have certain resource redundancy, and avoiding the target virtual machine from migrating to the target server again in a short period as far as possible, thereby reducing the migration times.
Description
Technical Field
The invention belongs to the field of online migration of virtual machines, and particularly relates to a virtual machine migration method and system.
Background
The cloud computing virtualizes physical resources into virtual resources through a virtualization technology, so that multiple clients share computing, storage and network resources of the same physical server, and the utilization rate of the server resources is improved.
Virtual machine migration techniques may migrate a virtual machine on one physical server to another physical server. The shutdown operation is carried out on the physical server of the migrated virtual machine, so that resources and energy consumption can be saved, or when a fault occurs, the reliability and the usability of the operation of a service system can be improved by migrating the virtual machine to other normal servers.
In the prior art, the similarity of changes between the virtual machine and the server is usually calculated according to the monitoring sampling data, and the physical server with the most similar changes is found for migration. Since the traffic fluctuates with time, the utilization of physical resources is affected, and if the resources of the physical server lack redundancy, the virtual machine may need to be frequently migrated, which consumes excessive computing and network resources, and affects the availability and reliability of the service.
Disclosure of Invention
In order to solve the above technical problems, the present invention provides a technical solution of a virtual machine migration method, so as to solve the above technical problems.
The invention discloses a virtual machine migration method in a first aspect, which comprises the following steps:
step S1, acquiring a cluster list of n virtual machines to be migrated and utilization rate data of P virtual machine key monitoring indexes of each virtual machine in a certain time interval;
step S2, traversing p virtual machine key monitoring indexes of n virtual machines one by one, and respectively calculating the average value and the sample standard deviation of the utilization rate data of each virtual machine key monitoring index corresponding to each virtual machine in the sampling data within the certain time interval;
step S3, obtaining a utilization rate representation of each virtual machine key monitoring index corresponding to each virtual machine by applying the mean value and the sample standard deviation of the sampling data of each virtual machine key monitoring index corresponding to each virtual machine in the certain time interval;
step S4, acquiring a cluster list of m candidate servers and P server key monitoring indexes of each server in a certain time interval;
step S5, traversing p server key monitoring indexes of m candidate servers one by one, and respectively calculating the vacancy rate data sequence of each server key monitoring index by using the sampling data of the utilization rate data of each server key monitoring index in the certain time interval;
step S6, calculating the mean value and sample standard deviation of the idle rate data sequence of each server key monitoring index;
step S7, obtaining the idle rate representation of each server key monitoring index corresponding to each server by applying the average value and the sample standard deviation of the idle rate data sequence of each server key monitoring index;
step S8, calculating the distance of the corresponding monitoring index between each virtual machine and each server by using the utilization rate of the key monitoring index of each virtual machine corresponding to each virtual machine and the idle rate representation of the key monitoring index of each server corresponding to each server;
and step S9, finding the target virtual machine to be migrated and the target server to which the virtual machine can be migrated by applying the distance of the corresponding monitoring index between each virtual machine and each server.
According to the method of the first aspect of the present invention, in the step S3, the specific method for obtaining the utilization rate representation of each virtual machine key monitoring index corresponding to each virtual machine by applying the mean value and the sample standard deviation of the sampling data of each virtual machine key monitoring index corresponding to each virtual machine in the certain time interval includes:
and adding the mean value and the sample standard deviation of the sampling data of each virtual machine key monitoring index corresponding to each virtual machine in the certain time interval to obtain the utilization rate representation of each virtual machine key monitoring index corresponding to each virtual machine.
According to the method of the first aspect of the present invention, in step S5, the specific method for calculating the idle rate data sequence of each server key monitoring index by using the sampling data of the utilization data of each server key monitoring index in the certain time interval includes:
and the idle rate data sequence of each server key monitoring index is 1-the utilization rate data of each server key monitoring index is the sampling data in the certain time interval.
According to the method of the first aspect of the present invention, in step S7, the specific method for obtaining the idle rate characterization of each server key monitoring indicator corresponding to each server by applying the mean value and the sample standard deviation of the idle rate data sequence of each server key monitoring indicator includes:
and (4) subtracting the average value and the sample standard deviation of the idle rate data sequence of the key monitoring indexes of each server to obtain the idle rate representation of each key monitoring index of each server corresponding to each server.
According to the method of the first aspect of the present invention, in step S8, a distance matrix R is formed by using the distance between each virtual machine and each server corresponding to the monitoring index.
According to the method of the first aspect of the present invention, in step S9, the specific method for finding the target virtual machine to be migrated and the target server to which the virtual machine can be migrated by applying the distance between each virtual machine and each server corresponding to the monitoring index includes:
and traversing the elements in the matrix R, and finding out the row and the column corresponding to the minimum value, wherein the virtual machine corresponding to the row is determined as a target virtual machine to be migrated, and the server corresponding to the column is determined as a target server to be migrated.
According to the method of the first aspect of the present invention, in the step S8, the method for calculating the elements in the distance matrix R includes:
the distance matrix is:
wherein the distance r between the ith virtual machine and the d-th serveridComprises the following steps:
wherein,
representing the utilization rate of the key monitoring index of the j virtual machine corresponding to the ith virtual machine in the time interval;
no. d table clothesRepresenting the idleness of the server key monitoring index of the jth server key monitoring index corresponding to the server in the time interval;
p: the number of the key monitoring indexes of the virtual machine and the key monitoring indexes of the server.
The second aspect of the present invention discloses a virtual machine migration system, which includes:
the first processing module is configured to acquire n virtual machine cluster lists to be migrated and utilization rate data of P virtual machine key monitoring indexes of each virtual machine in a certain time interval;
the second processing module is configured to traverse p virtual machine key monitoring indexes of n virtual machines one by one, and respectively calculate the mean value and the sample standard deviation of the sampling data of the utilization rate data of each virtual machine key monitoring index corresponding to each virtual machine in the certain time interval;
the third processing module is configured to apply the mean value and the sample standard deviation of the sampling data of each virtual machine key monitoring index corresponding to each virtual machine in the certain time interval to obtain a utilization rate representation of each virtual machine key monitoring index corresponding to each virtual machine;
the fourth processing module is configured to acquire m candidate server cluster lists and P server key monitoring indexes of each server in a certain time interval;
the fifth processing module is configured to traverse p server key monitoring indexes of the m candidate servers one by one, and calculate an idle rate data sequence of each server key monitoring index by respectively applying the sampling data of the utilization rate data of each server key monitoring index in the certain time interval;
the sixth processing module is configured to calculate a mean value and a sample standard deviation of the idle rate data sequence of each server key monitoring index;
the seventh processing module is configured to apply the mean value and the sample standard deviation of the idle rate data sequence of the key monitoring indexes of each server to obtain an idle rate representation of each key monitoring index of each server corresponding to each server;
the eighth processing module is configured to calculate a distance between each virtual machine and each server according to the utilization rate of each virtual machine key monitoring index corresponding to each virtual machine and the idle rate representation of each server key monitoring index corresponding to each server;
and the ninth processing module is configured to find the target virtual machine to be migrated and the target server to which the virtual machine can be migrated by applying the distance of the corresponding monitoring index between each virtual machine and each server.
A third aspect of the invention discloses an electronic device. The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the steps in the virtual machine migration method according to any one of the first aspect of the disclosure when executing the computer program.
A fourth aspect of the invention discloses a computer-readable storage medium. The computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps in a virtual machine migration method of any one of the first aspects of the present disclosure.
The scheme provided by the invention can consider the resource complementarity of the virtual machine and the server and also consider the resource redundancy of the virtual machine by the server. The method comprises the steps of adding a sample standard deviation on the basis of a sampling mean value of the utilization rate of the virtual machine, subtracting the sampling standard deviation on the basis of a resource idle rate sampling mean value of a server, calculating the distance between each key monitoring index of the virtual machine and each key monitoring index of the server on the basis of the characteristics, finding the most similar matching relation, enabling the target server to have certain resource redundancy, and avoiding the target virtual machine from migrating to the target server again in a short period as far as possible, thereby reducing the migration times.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a virtual machine migration method according to an embodiment of the present invention;
FIG. 2 is a block diagram of a virtual machine migration system according to an embodiment of the present invention;
fig. 3 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
The invention discloses a virtual machine migration method in a first aspect. Fig. 1 is a flowchart of a virtual machine migration method according to an embodiment of the present invention, as shown in fig. 1, the method includes:
step S1, acquiring a cluster list of n virtual machines to be migrated and utilization rate data of P virtual machine key monitoring indexes of each virtual machine in a certain time interval;
step S2, traversing p virtual machine key monitoring indexes of n virtual machines one by one, and respectively calculating the average value and the sample standard deviation of the utilization rate data of each virtual machine key monitoring index corresponding to each virtual machine in the sampling data within the certain time interval;
step S3, obtaining a utilization rate representation of each virtual machine key monitoring index corresponding to each virtual machine by applying the mean value and the sample standard deviation of the sampling data of each virtual machine key monitoring index corresponding to each virtual machine in the certain time interval;
step S4, acquiring a cluster list of m candidate servers and P server key monitoring indexes of each server in a certain time interval;
step S5, traversing p server key monitoring indexes of m candidate servers one by one, and respectively calculating the vacancy rate data sequence of each server key monitoring index by using the sampling data of the utilization rate data of each server key monitoring index in the certain time interval;
step S6, calculating the mean value and sample standard deviation of the idle rate data sequence of each server key monitoring index;
step S7, obtaining the idle rate representation of each server key monitoring index corresponding to each server by applying the average value and the sample standard deviation of the idle rate data sequence of each server key monitoring index;
step S8, calculating the distance of the corresponding monitoring index between each virtual machine and each server by using the utilization rate of the key monitoring index of each virtual machine corresponding to each virtual machine and the idle rate representation of the key monitoring index of each server corresponding to each server;
and step S9, finding the target virtual machine to be migrated and the target server to which the virtual machine can be migrated by applying the distance of the corresponding monitoring index between each virtual machine and each server.
In step S1, a cluster list of n virtual machines to be migrated and utilization data of P virtual machine key monitoring indicators of each virtual machine within a certain time interval are obtained.
Specifically, a virtual machine cluster list { V ] to be migrated is obtained1,V2,…,VnAnd a certain time interval [ T }s,Te]Key monitoring index { R of each virtual machine in the table1,R2,…,RpUtilization rate data of the ith virtual machine ViCorresponding jth monitoring index RjIn the time interval [ Ts,Te]Sampling data of internal utilization rate dataIs composed of
In step S2, p virtual machine key monitoring indexes of n virtual machines are traversed one by one, and the mean value and the sample standard deviation of the sampling data of the utilization rate data of each virtual machine key monitoring index corresponding to each virtual machine in the certain time interval are calculated respectively.
Specifically, the ith virtual machine ViCorresponding jth virtual machine monitoring index RjIn the time interval [ Ts,Te]Sampled data withinThe mean value of (A) is:
the sample standard deviations were:
in step S3, the average value and the sample standard deviation of the sampling data of each virtual machine key monitoring index corresponding to each virtual machine in the certain time interval are used to obtain the utilization rate representation of each virtual machine key monitoring index corresponding to each virtual machine.
In some embodiments, in the step S3, in the step S3, the specific method for obtaining the utilization rate indicator of each virtual machine corresponding to each virtual machine by applying the mean and the sample standard deviation of the sampled data of each virtual machine corresponding to each virtual machine in the certain time interval includes:
and adding the mean value and the sample standard deviation of the sampling data of each virtual machine key monitoring index corresponding to each virtual machine in the certain time interval to obtain the utilization rate representation of each virtual machine key monitoring index corresponding to each virtual machine.
In particular, the amount of the solvent to be used,
in step S4, a cluster list of m candidate servers and P server key monitoring indicators of each server within a certain time interval are obtained.
Specifically, a candidate server cluster list { P is obtained1,P2,…,PmAnd a certain time interval [ T }s,Te]Key monitoring index of each server in the system { R }1,R2,…,RpUtilization data of the d-th server PdCorresponding jth monitoring index RjIn the time interval [ Ts,Te]Sampled data withinIs composed of
In step S5, p server key monitoring indexes of m candidate servers are traversed one by one, and the idleness data sequence of each server key monitoring index is calculated by using the sampling data of the utilization data of each server key monitoring index in the certain time interval.
In some embodiments, in step S5, the specific method for calculating the idle rate data sequence of each server key monitoring indicator by using the sampled data of the utilization rate data of each server key monitoring indicator in the certain time interval includes:
and the idle rate data sequence of each server key monitoring index is 1-the utilization rate data of each server key monitoring index is the sampling data in the certain time interval.
Specifically, p server monitoring indexes of m servers are traversed one by one, the idleness of key monitoring indexes of each server is calculated respectively, an idleness sequence is obtained, and the d-th serverPdCorresponding jth monitoring index RjIn the time interval [ Ts,Te]Inner idle rate dataIs composed ofWherein
In step S6, the mean and sample standard deviation of the idle rate data sequence of each server key monitoring index are calculated.
In particular, wherein the d-th server PdCorresponding jth monitoring index RjIn the time interval [ Ts,Te]Inner idle rate dataThe mean value of (A) is:
the sample standard deviations were:
in step S7, the mean and the sample standard deviation of the idle rate data sequence of the key monitoring index of each server are used to obtain the idle rate representation of each key monitoring index of each server corresponding to each server.
In some embodiments, in the step S7, the specific method for obtaining the idle rate characterization of each server key monitoring indicator corresponding to each server by applying the mean and the sample standard deviation of the idle rate data sequence of each server key monitoring indicator includes:
and (4) subtracting the average value and the sample standard deviation of the idle rate data sequence of the key monitoring indexes of each server to obtain the idle rate representation of each key monitoring index of each server corresponding to each server.
in step S8, the distance between each virtual machine and each server corresponding to the monitoring index is calculated using the utilization rate of each virtual machine key monitoring index corresponding to each virtual machine and the idle rate characterization of each server key monitoring index corresponding to each server.
In some embodiments, in the step S8, the distance between each virtual machine and each server corresponding to the monitoring index is used to form the distance matrix R.
In some embodiments, in the step S8, the method for calculating the elements in the distance matrix R includes:
the distance matrix is:
wherein the distance r between the ith virtual machine and the d-th serveridComprises the following steps:
wherein,
representing the utilization rate of the key monitoring index of the j virtual machine corresponding to the ith virtual machine in the time interval;
the j server key monitoring index corresponding to the d server is in the timeRepresenting the idleness of key monitoring indexes of the server in the interval;
p: the number of the key monitoring indexes of the virtual machine and the key monitoring indexes of the server.
In step S9, the target virtual machine to be migrated and the target server to which the virtual machine can be migrated are found by using the distance between each virtual machine and each server corresponding to the monitoring index.
In some embodiments, in the step S9, the specific method for finding the target virtual machine to be migrated and the target server to be migrated by applying the distance corresponding to the monitoring index between each virtual machine and each server includes:
and traversing the elements in the matrix R, and finding out the row and the column corresponding to the minimum value, wherein the virtual machine corresponding to the row is determined as a target virtual machine to be migrated, and the server corresponding to the column is determined as a target server to be migrated.
In summary, the scheme provided by the invention can consider the resource complementarity of the virtual machine and the server and also consider the resource redundancy of the virtual machine by the server. The method comprises the steps of adding a sample standard deviation on the basis of a sampling mean value of the utilization rate of the virtual machine, subtracting the sampling standard deviation on the basis of a resource idle rate sampling mean value of a server, calculating the distance between each key monitoring index of the virtual machine and each key monitoring index of the server on the basis of the characteristics, finding the most similar matching relation, enabling the target server to have certain resource redundancy, and avoiding the target virtual machine from migrating to the target server again in a short period as far as possible, thereby reducing the migration times.
The invention discloses a virtual machine migration system in a second aspect. FIG. 2 is a block diagram of a virtual machine migration system according to an embodiment of the present invention; as shown in fig. 2, the system 100 includes:
the first processing module 101 is configured to obtain n virtual machine cluster lists to be migrated and utilization rate data of P virtual machine key monitoring indexes of each virtual machine within a certain time interval;
the second processing module 102 is configured to traverse p virtual machine key monitoring indexes of n virtual machines one by one, and respectively calculate a mean value and a sample standard deviation of sampling data of utilization rate data of each virtual machine key monitoring index corresponding to each virtual machine in the certain time interval;
the third processing module 103 is configured to apply a mean value and a sample standard deviation of the sampling data of each virtual machine key monitoring index corresponding to each virtual machine in the certain time interval to obtain a utilization rate representation of each virtual machine key monitoring index corresponding to each virtual machine;
a fourth processing module 104, configured to obtain m candidate server cluster lists and P server key monitoring indicators of each server within a certain time interval;
a fifth processing module 105, configured to traverse p server key monitoring indexes of m candidate servers one by one, and calculate an idle rate data sequence of each server key monitoring index by respectively applying the sampling data of the utilization rate data of each server key monitoring index in the certain time interval;
a sixth processing module 106, configured to calculate a mean value and a sample standard deviation of the idle rate data sequence of each server key monitoring index;
a seventh processing module 107, configured to apply the mean and the sample standard deviation of the idle rate data sequence of the key monitoring index of each server to obtain an idle rate representation of each key monitoring index of each server corresponding to each server;
an eighth processing module 108, configured to calculate a distance between each virtual machine and each server according to the utilization rate of each virtual machine key monitoring index corresponding to each virtual machine and the idle rate characterization of each server key monitoring index corresponding to each server;
the ninth processing module 109 is configured to apply the distance between each virtual machine and each server corresponding to the monitoring index to find a target virtual machine to be migrated and a target server to which the virtual machine can be migrated.
The specific method for obtaining the utilization rate representation of each virtual machine key monitoring index corresponding to each virtual machine by applying the mean value and the sample standard deviation of the sampling data of each virtual machine key monitoring index corresponding to each virtual machine in the certain time interval comprises the following steps:
and adding the mean value and the sample standard deviation of the sampling data of each virtual machine key monitoring index corresponding to each virtual machine in the certain time interval to obtain the utilization rate representation of each virtual machine key monitoring index corresponding to each virtual machine.
According to the system of the second aspect of the present invention, the fifth processing module 105 is specifically configured to, the specific method for calculating the idle rate data sequence of each server key monitoring index by applying the sampled data of the utilization rate data of each server key monitoring index in the certain time interval includes:
and the idle rate data sequence of each server key monitoring index is 1-the utilization rate data of each server key monitoring index is the sampling data in the certain time interval.
According to the system of the second aspect of the present invention, the seventh processing module 107 is specifically configured to, the specific method for obtaining the idle rate characterization of each server key monitoring indicator corresponding to each server by applying the mean value and the sample standard deviation of the idle rate data sequence of each server key monitoring indicator includes:
and (4) subtracting the average value and the sample standard deviation of the idle rate data sequence of the key monitoring indexes of each server to obtain the idle rate representation of each key monitoring index of each server corresponding to each server.
In the system according to the second aspect of the present invention, the eighth processing module 108 is specifically configured to apply a distance between each virtual machine and each server corresponding to the monitoring index to form a distance matrix R.
The method for calculating the elements in the distance matrix R comprises the following steps:
the distance matrix is:
wherein the distance r between the ith virtual machine and the d-th serveridComprises the following steps:
wherein,
representing the utilization rate of the key monitoring index of the j virtual machine corresponding to the ith virtual machine in the time interval;
the idleness of the server key monitoring index of the jth server key monitoring index corresponding to the d-th server in the time interval is represented;
p: the number of the key monitoring indexes of the virtual machine and the key monitoring indexes of the server.
According to the system of the second aspect of the present invention, the ninth processing module 109 is specifically configured such that, the specific method for finding the target virtual machine to be migrated and the migratable target server by applying the distance between each virtual machine and each server corresponding to the monitoring index includes:
and traversing the elements in the matrix R, and finding out the row and the column corresponding to the minimum value, wherein the virtual machine corresponding to the row is determined as a target virtual machine to be migrated, and the server corresponding to the column is determined as a target server to be migrated.
A third aspect of the invention discloses an electronic device. The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the steps of the virtual machine migration method according to any one of the first aspect of the disclosure when executing the computer program.
Fig. 3 is a block diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 3, the electronic device includes a processor, a memory, a communication interface, a display screen, and an input device, which are connected by a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic equipment comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the electronic device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, Near Field Communication (NFC) or other technologies. The display screen of the electronic equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the electronic equipment, an external keyboard, a touch pad or a mouse and the like.
It will be understood by those skilled in the art that the structure shown in fig. 3 is only a partial block diagram related to the technical solution of the present disclosure, and does not constitute a limitation of the electronic device to which the solution of the present application is applied, and a specific electronic device may include more or less components than those shown in the drawings, or combine some components, or have a different arrangement of components.
A fourth aspect of the invention discloses a computer-readable storage medium. The computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the steps in a virtual machine migration method according to any one of the first aspect of the present disclosure.
It should be noted that the technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, however, as long as there is no contradiction between the combinations of the technical features, the scope of the present description should be considered. The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (10)
1. A virtual machine migration method, the method comprising:
step S1, acquiring a cluster list of n virtual machines to be migrated and utilization rate data of P virtual machine key monitoring indexes of each virtual machine in a certain time interval;
step S2, traversing p virtual machine key monitoring indexes of n virtual machines one by one, and respectively calculating the average value and the sample standard deviation of the utilization rate data of each virtual machine key monitoring index corresponding to each virtual machine in the sampling data within the certain time interval;
step S3, obtaining a utilization rate representation of each virtual machine key monitoring index corresponding to each virtual machine by applying the mean value and the sample standard deviation of the sampling data of each virtual machine key monitoring index corresponding to each virtual machine in the certain time interval;
step S4, acquiring a cluster list of m candidate servers and P server key monitoring indexes of each server in a certain time interval;
step S5, traversing the p server key monitoring indexes of the m candidate servers one by one, and respectively applying the sampling data of the utilization rate data of each server key monitoring index in the certain time interval to calculate the idle rate data sequence of each server key monitoring index;
step S6, calculating the mean value and sample standard deviation of the idle rate data sequence of each server key monitoring index;
step S7, obtaining the idle rate representation of each server key monitoring index corresponding to each server by applying the average value and the sample standard deviation of the idle rate data sequence of each server key monitoring index;
step S8, calculating the distance of the corresponding monitoring index between each virtual machine and each server by using the utilization rate of the key monitoring index of each virtual machine corresponding to each virtual machine and the idle rate representation of the key monitoring index of each server corresponding to each server;
and step S9, finding the target virtual machine to be migrated and the target server to which the virtual machine can be migrated by applying the distance of the corresponding monitoring index between each virtual machine and each server.
2. The method of claim 1, wherein in the step S3, the specific method for obtaining the utilization rate indicator of each virtual machine by applying the mean and the sample standard deviation of the sampled data of each virtual machine key monitoring indicator corresponding to each virtual machine in the certain time interval includes:
and adding the mean value and the sample standard deviation of the sampling data of each virtual machine key monitoring index corresponding to each virtual machine in the certain time interval to obtain the utilization rate representation of each virtual machine key monitoring index corresponding to each virtual machine.
3. The method according to claim 1, wherein in step S5, the specific method for calculating the idle rate data sequence of each server key monitoring indicator by using the sampled data of the utilization data of each server key monitoring indicator in the certain time interval includes:
and the idle rate data sequence of each server key monitoring index is 1-the utilization rate data of each server key monitoring index is the sampling data in the certain time interval.
4. The method according to claim 1, wherein in step S7, the specific method for obtaining the idle rate characterization of each server key monitoring indicator corresponding to each server by applying the mean and the sample standard deviation of the idle rate data sequence of each server key monitoring indicator includes:
and (4) subtracting the average value and the sample standard deviation of the idle rate data sequence of the key monitoring indexes of each server to obtain the idle rate representation of each key monitoring index of each server corresponding to each server.
5. The method for migrating virtual machines according to claim 1, wherein in step S8, a distance matrix R is formed by using a distance between each virtual machine and each server corresponding to the monitoring index.
6. The method for migrating a virtual machine according to claim 5, wherein in the step S9, the specific method for finding the target virtual machine to be migrated and the target server to be migrated by applying the distance corresponding to the monitoring index between each virtual machine and each server includes:
and traversing the elements in the matrix R, and finding out the row and the column corresponding to the minimum value, wherein the virtual machine corresponding to the row is determined as a target virtual machine to be migrated, and the server corresponding to the column is determined as a target server to be migrated.
7. The method for migrating a virtual machine according to claim 6, wherein in the step S8, the method for calculating the elements in the distance matrix R includes:
the distance matrix is:
wherein the distance r between the ith virtual machine and the d-th serveridComprises the following steps:
wherein,
representing the utilization rate of the key monitoring index of the j virtual machine corresponding to the ith virtual machine in the time interval;
the idleness of the server key monitoring index of the jth server key monitoring index corresponding to the d-th server in the time interval is represented;
p: the number of the key monitoring indexes of the virtual machine and the key monitoring indexes of the server.
8. A system for virtual machine migration, the system comprising:
the first processing module is configured to acquire n virtual machine cluster lists to be migrated and utilization rate data of P virtual machine key monitoring indexes of each virtual machine in a certain time interval;
the second processing module is configured to traverse p virtual machine key monitoring indexes of n virtual machines one by one, and respectively calculate the mean value and the sample standard deviation of the sampling data of the utilization rate data of each virtual machine key monitoring index corresponding to each virtual machine in the certain time interval;
the third processing module is configured to apply the mean value and the sample standard deviation of the sampling data of each virtual machine key monitoring index corresponding to each virtual machine in the certain time interval to obtain a utilization rate representation of each virtual machine key monitoring index corresponding to each virtual machine;
the fourth processing module is configured to acquire m candidate server cluster lists and P server key monitoring indexes of each server in a certain time interval;
the fifth processing module is configured to traverse p server key monitoring indexes of the m candidate servers one by one, and calculate an idle rate data sequence of each server key monitoring index by respectively applying the sampling data of the utilization rate data of each server key monitoring index in the certain time interval;
the sixth processing module is configured to calculate a mean value and a sample standard deviation of the idle rate data sequence of each server key monitoring index;
the seventh processing module is configured to apply the mean value and the sample standard deviation of the idle rate data sequence of the key monitoring indexes of each server to obtain an idle rate representation of each key monitoring index of each server corresponding to each server;
the eighth processing module is configured to calculate a distance between each virtual machine and each server according to the utilization rate of each virtual machine key monitoring index corresponding to each virtual machine and the idle rate representation of each server key monitoring index corresponding to each server;
and the ninth processing module is configured to find the target virtual machine to be migrated and the target server to which the virtual machine can be migrated by applying the distance of the corresponding monitoring index between each virtual machine and each server.
9. An electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of a virtual machine migration method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, performs the steps of a method for virtual machine migration as claimed in any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111532266.7A CN114168266B (en) | 2021-12-15 | 2021-12-15 | Virtual machine migration method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111532266.7A CN114168266B (en) | 2021-12-15 | 2021-12-15 | Virtual machine migration method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114168266A true CN114168266A (en) | 2022-03-11 |
CN114168266B CN114168266B (en) | 2024-08-09 |
Family
ID=80486683
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111532266.7A Active CN114168266B (en) | 2021-12-15 | 2021-12-15 | Virtual machine migration method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114168266B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060069761A1 (en) * | 2004-09-14 | 2006-03-30 | Dell Products L.P. | System and method for load balancing virtual machines in a computer network |
CN102185779A (en) * | 2011-05-11 | 2011-09-14 | 田文洪 | Method and device for realizing data center resource load balance in proportion to comprehensive allocation capability |
JP2013239095A (en) * | 2012-05-17 | 2013-11-28 | Nippon Telegr & Teleph Corp <Ntt> | Virtual machine arrangement device and virtual machine arrangement method |
CN106775947A (en) * | 2016-12-06 | 2017-05-31 | 中国电子科技集团公司第三十二研究所 | Large-scale virtual computing dynamic load balancing method based on openstack |
-
2021
- 2021-12-15 CN CN202111532266.7A patent/CN114168266B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060069761A1 (en) * | 2004-09-14 | 2006-03-30 | Dell Products L.P. | System and method for load balancing virtual machines in a computer network |
CN102185779A (en) * | 2011-05-11 | 2011-09-14 | 田文洪 | Method and device for realizing data center resource load balance in proportion to comprehensive allocation capability |
JP2013239095A (en) * | 2012-05-17 | 2013-11-28 | Nippon Telegr & Teleph Corp <Ntt> | Virtual machine arrangement device and virtual machine arrangement method |
CN106775947A (en) * | 2016-12-06 | 2017-05-31 | 中国电子科技集团公司第三十二研究所 | Large-scale virtual computing dynamic load balancing method based on openstack |
Non-Patent Citations (1)
Title |
---|
胡荣辉;王瑞通: "云环境下虚拟机集群迁移策略研究", 计算机技术与发展, no. 011, 31 December 2017 (2017-12-31) * |
Also Published As
Publication number | Publication date |
---|---|
CN114168266B (en) | 2024-08-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10877986B2 (en) | Obtaining performance data via an application programming interface (API) for correlation with log data | |
US11074092B2 (en) | Virtual machine batch live migration | |
US11163481B2 (en) | Monitoring storage systems for performance | |
US8255906B2 (en) | Modeling overhead for a plurality of virtualization technologies in a computer system | |
CN109643243B (en) | Method, system, device, apparatus, and medium for dynamic virtual CPU core allocation | |
US11290360B2 (en) | Analyzing resource placement fragmentation for capacity planning | |
US10318541B2 (en) | Correlating log data with performance measurements having a specified relationship to a threshold value | |
US10353957B2 (en) | Processing of performance data and raw log data from an information technology environment | |
US9813423B2 (en) | Trust-based computing resource authorization in a networked computing environment | |
US20180060132A1 (en) | Stateful resource pool management for job execution | |
US10785320B2 (en) | Managing operation of instances | |
US10261811B2 (en) | Systems and methods for contextually allocating emulation resources | |
CN112836152B (en) | Page rendering method, system, computer device and computer readable storage medium | |
US20170255639A1 (en) | Processing of Performance Data and Structure Data from an Information Technology Environment | |
US20150277959A1 (en) | Capture point determination method and capture point determination system | |
US20200036741A1 (en) | Identifying vulnerabilities in processing nodes | |
CN112085535A (en) | Resource metering charging method, device, cluster and storage medium | |
CN113778644A (en) | Task processing method, device, equipment and storage medium | |
US8438284B2 (en) | Network buffer allocations based on consumption patterns | |
CN110895491A (en) | System and method for auxiliary resource allocation optimization | |
CN113791890A (en) | Container distribution method and device, electronic equipment and storage medium | |
CN114442910A (en) | Method, electronic device and computer program product for managing storage system | |
CN114168266B (en) | Virtual machine migration method and system | |
CN116391177A (en) | Prioritized inactive memory device updates | |
US10594620B1 (en) | Bit vector analysis for resource placement in a distributed system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |