CN-121996348-A - Virtual machine live migration method based on information creation cloud
Abstract
The invention relates to the technical field of virtual machine migration and discloses a virtual machine live migration method based on a message creation cloud, which comprises the steps of preparing resources of a destination host for normal operation of a source host to be migrated, dividing the priority of the application of the source host, and distinguishing the application with high priority and the application with low priority; the method comprises the steps of copying all internal memories in a source host to a destination host by using pre-copying, iteratively copying dirty pages generated by all high-priority applications to the destination host, suspending the operation of the source host when the dirty pages with high priority in a virtual machine reach a shutdown condition, starting the destination host after all the rest high-priority dirty pages in the source virtual machine are completely copied to the destination host, enabling the high-priority applications of the destination host to normally operate, copying the dirty pages of low-priority applications to the destination host, and reducing the overall migration time and further reducing the shutdown time of the virtual machine by grading the priorities of the applications.
Inventors
- ZHOU TENG
Assignees
- 常德旭腾科技服务有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20251203
Claims (15)
- 1. A virtual machine live migration method based on a belief-creating cloud is characterized by comprising the following steps: Step 101, a source host to be migrated normally operates, prepares the resources of a destination host, divides the priority of the source host application, and distinguishes high-priority and low-priority applications; 102, copying all memories in a source host to a destination host by using pre-copying; Step 103, iteratively copying all dirty pages generated by the high-priority application to a target host; 104, suspending the operation of the source host when the dirty pages with high priority in the virtual machine reach the shutdown condition; step 105, after all the remaining high-priority dirty pages in the source virtual machine are completely copied to the destination host, starting the destination host, wherein the high-priority application of the destination host can normally run; And 106, copying the dirty pages of the low-priority application to the target host, and starting the low-priority application after all the rest dirty pages are copied to the target host.
- 2. The virtual machine live migration method based on the creation cloud according to claim 1, wherein the method for prioritizing applications of the source host comprises: Step 201, extracting application information of a source host; step 202, generating an information item for each application of a source host based on the application information of the source host, wherein the information item of one application comprises information such as the number of processes, the number of bus processes, the average number of processes, the average running time of the processes, the number of memory pages occupied by the processes, the amount of memory data occupied by the processes and the like; step 203, generating an attribute and an attribute value of the application based on the information item of the application; Extracting application information of the historical host from the historical data, and generating attributes and attribute values of the application of the historical host; The method comprises the steps that the application of a source host and the historical application are combined to obtain an original application set; Step 204, establishing a square matrix containing N units, randomly selecting N from the historical applications, and then endowing the selected historical application attributes and attribute values to the square matrix units; step 205, randomly selecting an application from the original application set as a first application, and then calculating a first distance between the first application and a unit of the square matrix; Step 206, updating the attribute values of the first cell and the neighborhood cells of the first cell, wherein the updated formula is as follows:
- 3. wherein the method comprises the steps of Values representing the x-th item attribute of the cells of the matrix after updating, Values representing the x-th item attribute of the cells of the matrix prior to updating, A value representing an x-th item attribute of the first application, c representing the number of times a cell of the square matrix is updated; step 207, iteratively executing step 205 and step 206 until the set iteration number is reached; Step 208, a unit domain is established for each unit of the square matrix, applications in the original application set are divided into the unit domains, and the first distance between the application in one unit domain and the unit to which the unit domain belongs is smaller than the first distance between the application and other units; in step 209, the priority parameter of the application of the source host is calculated, and the calculation formula of the priority parameter is as follows:
- 4. Wherein the method comprises the steps of Priority parameters for the y-th application, where For the average of the ith attribute values of all applications in the cell domain for the y-th application, The total number of attributes for the y-th application; The weighting parameters for the y-th application are calculated as follows:
- 5. Where f is the number of memory pages occupied by all processes of the y-th application, The average of page numbers of memory pages occupied by all processes of the y-th application, The page number of the z-th memory page occupied by all processes of the y-th application; step 210, dividing the priority of the source host based on the priority parameter of the application of the source host; the priority of an application is proportional to the priority parameter of the application.
- 6. The virtual machine live migration method based on the information creation cloud of claim 1, wherein the method for iteratively copying all dirty pages generated by the high-priority application to the destination host comprises the steps of copying dirty page data generated by the current high-priority application to the destination host in a first round, enabling the source host to continue to operate without being powered off in the first round of copying, recalculating the dirty page data generated by the high-priority application in the process after the first round of copying is finished, then conducting a second round of copying, copying the new dirty page data to the destination host, and circulating until the data quantity of the dirty page data newly generated by the high-priority application is smaller than a set data quantity threshold value, entering a shutdown copying stage, and suspending the operation of the source host.
- 7. The virtual machine live migration method based on the creation cloud according to claim 2, wherein the attribute of the application corresponds to the number of processes, the number of bus threads, the average number of threads, the average running time of the processes, the number of memory pages occupied by the processes, and the amount of memory data occupied by the processes.
- 8. The virtual machine live migration method based on the information creation cloud as claimed in claim 2, wherein a first distance between a first application and a unit of a square matrix is calculated The formula of (2) is as follows:
- 9. Wherein, the For the i-th attribute value of the first application, The i-th attribute value of the unit of the square matrix, n is the total number of attributes of the first application.
- 10. The virtual machine live migration method based on the information creation cloud as claimed in claim 2, wherein the second distance between the units is The calculation formula of (2) is as follows:
- 11. Wherein the method comprises the steps of And The number of rows where the two cells are located, And The number of columns in which the two cells are located, respectively.
- 12. The virtual machine live migration method based on the creation cloud of claim 2, wherein the neighborhood cells of the first cell refer to cells having a second distance from the first cell of less than 8.
- 13. The virtual machine live migration method of claim 2, wherein the steps 205 and 206 are iteratively performed for a number of times = Where Z is the number of applications of the source host.
- 14. The virtual machine live migration method based on the creation cloud according to claim 2, wherein a first priority threshold is set, and the priority parameter of the application is less than or equal to the first priority threshold, and is classified as low priority, otherwise, classified as high priority.
- 15. A virtual machine live migration system based on a belief-creating cloud, which is used for executing the virtual machine live migration method based on the belief-creating cloud according to any one of claims 1 to 8, wherein the virtual machine live migration system based on the belief-creating cloud comprises: the right acquisition module is used for acquiring the management right of the source host and the destination host; the front-end verification module is used for verifying whether the configurations of the target host and the source host are consistent; The pre-copy module is used for copying all the memories in the source host to the destination host; the iteration copy module is used for iteratively copying all dirty pages generated by the high-priority application to the target host; A host starting module for starting the destination host after iteratively copying all dirty pages generated by the high-priority application to the destination host, and running the high-priority application which has been copied; the general copying module is used for copying the dirty pages of the low-priority application to the target host after the iterative copying module is executed; and the full start module starts the low-priority application on the target host after the general copy module is executed.
Description
Virtual machine live migration method based on information creation cloud Technical Field The invention relates to the technical field of virtual machine migration, in particular to a virtual machine live migration method based on a belief-creating cloud. Background The live migration technology of the virtual machine is to transfer and copy the virtual machine from the source physical host to another physical host completely, and plays an important role in load balancing and disaster recovery. The pre-copy algorithm realizes the real-time migration of the virtual machine, but in a high-load scene, some memory pages are repeatedly transmitted, so that the migration efficiency is seriously influenced, and the total migration time is prolonged. Disclosure of Invention The invention provides a virtual machine live migration method based on a created cloud, which solves the technical problem of long live migration time of a virtual machine in the related technology. According to one aspect of the invention, a virtual machine live migration method based on a belief-creating cloud is provided, comprising the following steps: Step 101, a source host to be migrated normally operates, prepares the resources of a destination host, divides the priority of the source host application, and distinguishes high-priority and low-priority applications; 102, copying all memories in a source host to a destination host by using pre-copying; Step 103, iteratively copying all dirty pages generated by the high-priority application to a target host; 104, suspending the operation of the source host when the dirty pages with high priority in the virtual machine reach the shutdown condition; step 105, after all the remaining high-priority dirty pages in the source virtual machine are completely copied to the destination host, starting the destination host, wherein the high-priority application of the destination host can normally run; And 106, copying the dirty pages of the low-priority application to the target host, and starting the low-priority application after all the rest dirty pages are copied to the target host. Further, the method for prioritizing applications of the source host includes: Step 201, extracting application information of a source host; step 202, generating an information item for each application of a source host based on the application information of the source host, wherein the information item of one application comprises information such as the number of processes, the number of bus processes, the average number of processes, the average running time of the processes, the number of memory pages occupied by the processes, the amount of memory data occupied by the processes and the like; step 203, generating an attribute and an attribute value of the application based on the information item of the application; Extracting application information of the historical host from the historical data, and generating attributes and attribute values of the application of the historical host; The method comprises the steps that the application of a source host and the historical application are combined to obtain an original application set; Step 204, establishing a square matrix containing N units, randomly selecting N from the historical applications, and then endowing the selected historical application attributes and attribute values to the square matrix units; step 205, randomly selecting an application from the original application set as a first application, and then calculating a first distance between the first application and a unit of the square matrix; Step 206, updating the attribute values of the first cell and the neighborhood cells of the first cell, wherein the updated formula is as follows: Wherein the method comprises the steps of Values representing the x-th item attribute of the cells of the matrix after updating,Values representing the x-th item attribute of the cells of the matrix prior to updating,A value representing an x-th item attribute of the first application, c representing the number of times a cell of the square matrix is updated; step 207, iteratively executing step 205 and step 206 until the set iteration number is reached; Step 208, a unit domain is established for each unit of the square matrix, applications in the original application set are divided into the unit domains, and the first distance between the application in one unit domain and the unit to which the unit domain belongs is smaller than the first distance between the application and other units; in step 209, the priority parameter of the application of the source host is calculated, and the calculation formula of the priority parameter is as follows: Wherein the method comprises the steps of Priority parameters for the y-th application, whereFor the average of the ith attribute values of all applications in the cell domain for the y-th application,The total number of attributes for the y-th application; The weighting pa