Virtual machine migration time measuring and calculating method and device, electronic equipment and storage medium

By simulating virtual machine migration tasks, obtaining and recording performance data of storage pools and networks, and using machine learning algorithms to establish correspondence relationships, solving the accuracy of virtual machine migration time calculation, reducing resource waste, and realizing virtual machine migration time Accurate calculation and improvement of success rate.

CN119201346APending Publication Date: 2024-12-27JINAN INSPUR DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411328072.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

During the virtual machine migration process, it is difficult for the existing technology to accurately calculate the migration time, resulting in insufficient estimated time or waste of time, and the inability to effectively reduce resource waste.

Method used

By traversing the preset IO pressure set, simulate virtual machine migration tasks, obtain the read rate, write rate and bandwidth of the source storage pool, destination storage pool and transmission network, record and use machine learning algorithms to establish corresponding relationships, and realize the virtual machine migration time. Accurate calculation.

Benefits of technology

It realizes accurate calculation of virtual machine migration time, ensures successful migration and reduces resource waste, and improves the credibility and accuracy of the migration process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201346A_ABST
    Figure CN119201346A_ABST
Patent Text Reader

Abstract

The invention discloses a virtual machine migration time measuring and calculating method and device, electronic equipment and a storage medium, IO pressure injection is performed on a source storage pool and a target storage pool corresponding to a simulation virtual machine according to different IO pressure values, and a simulation virtual machine migration task is executed in each IO pressure injection process. According to the method, a source storage pool read rate, a target storage pool write rate and a transmission network bandwidth in the migration process of the simulated virtual machine can be obtained, and an average migration rate can be calculated according to migration data volume and migration time of the simulated virtual machine; therefore, the corresponding relation among the source storage pool read rate, the target storage pool write rate, the transmission network bandwidth and the average migration rate is recorded in the process of simulating the migration of the virtual machine each time, and the real corresponding relation among the source storage pool read rate, the target storage pool write rate, the transmission network bandwidth and the average migration rate is determined according to multiple groups of corresponding relations, so that the migration time of the real virtual machine is measured and calculated. According to the scheme, the cross-cloud migration time of the virtual machine can be accurately measured and calculated, and resource waste is reduced while successful migration of the virtual machine is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cross-cloud technology, and in particular to a method for calculating virtual machine migration time, and also to a device for calculating virtual machine migration time, an electronic device, and a computer-readable storage medium. Background Art

[0002] As the market demand for cloud platforms grows, domestic cloud platforms are developing rapidly, are easier to use, and have better after-sales service guarantees, which are attracting more and more VMware platform (virtualization platform) users to start choosing these domestic cloud platforms. When the cloud platform is replaced, it is necessary to migrate the virtual machine resources on the original VMware system to the new cloud platform. However, in the actual migration scenario, most of the customer's original virtual machines are in use, and the migration time that can be reserved is limited. The hardware information of different customer cloud platforms is also different, and it is often impossible to provide customers with a relatively accurate migration time, which may result in insufficient estimated time or time waste.

[0003] Therefore, how to accurately measure the time for virtual machine cross-cloud migration and reduce resource waste while ensuring successful virtual machine migration is an urgent problem to be solved by technical personnel in this field. Summary of the invention

[0004] The purpose of the present application is to provide a method for measuring the migration time of a virtual machine, which can accurately measure the time for virtual machine migration across clouds, thereby reducing resource waste while ensuring successful migration of the virtual machine; another purpose of the present application is to provide a device for measuring the migration time of a virtual machine, an electronic device, a computer-readable storage medium, and a computer program product, all of which have the above-mentioned beneficial effects.

[0005] In a first aspect, the present application provides a method for measuring virtual machine migration time, comprising:

[0006] Traverse the preset IO pressure set to obtain the target IO pressure;

[0007] Injecting IO pressure into the source storage pool and the destination storage pool corresponding to the simulated virtual machine according to the target IO pressure, and starting a migration task for the simulated virtual machine;

[0008] During the execution of the migration task, obtaining the read rate of the source storage pool, the write rate of the destination storage pool, and the transmission network bandwidth;

[0009] After the migration task is completed, the virtual machine migration time is obtained, and an average migration rate is determined according to the migration data volume of the simulated virtual machine and the virtual machine migration time;

[0010] Recording the corresponding relationship between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth and the average migration rate;

[0011] When the preset IO pressure set has not been traversed completely, returning to the step of traversing the preset IO pressure set to obtain the target IO pressure, until the preset IO pressure set is traversed completely and a plurality of sets of the corresponding relationships are obtained;

[0012] Determine, according to all the corresponding relationships, a true corresponding relationship between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth and the average migration rate;

[0013] The real corresponding relationship is used to realize the migration time calculation of the real virtual machine.

[0014] Optionally, obtaining the virtual machine migration time after the migration task is completed includes:

[0015] After the migration task is completed, obtaining the execution result of the migration task;

[0016] If the execution result is that the migration task is successfully executed, obtaining the virtual machine migration time;

[0017] If the execution result is that the migration task fails to execute, the process returns to the step of traversing the preset IO pressure set to obtain the target IO pressure.

[0018] Optionally, if the execution result is that the migration task fails to execute, returning to the step of traversing the preset IO pressure set to obtain the target IO pressure includes:

[0019] If the execution result is that the migration task fails to execute, error information is obtained;

[0020] If the error message does not include IO pressure overload information, returning to the step of traversing the preset IO pressure set to obtain the target IO pressure;

[0021] If the error message contains the IO pressure overload information, a prompt indicating that the experiment failed is output.

[0022] Optionally, before traversing the preset IO pressure set to obtain the target IO pressure, the method further includes:

[0023] Obtaining pre-configuration information, the pre-configuration information including source cloud platform environment information, destination cloud platform environment information, source storage pool configuration information, destination storage pool configuration information, transmission network configuration information, and simulated virtual machine configuration information; the simulated virtual machine configuration information includes the migration data volume;

[0024] Determine the connectivity status between the source cloud platform and the destination cloud platform according to the source cloud platform environment information and the destination cloud platform environment information;

[0025] If the connectivity status is disconnected, an error message is output;

[0026] If the connection state is connected, initializing the environment of the source cloud platform, and determining the source storage pool in the source cloud platform according to the source storage pool configuration information;

[0027] Creating the simulated virtual machine on the source storage pool according to the simulated virtual machine configuration information, and writing virtual machine data into the simulated virtual machine according to the migration data amount;

[0028] Initializing the environment of the destination cloud platform, and creating the destination storage pool on the destination cloud platform according to the destination storage pool configuration information;

[0029] The transmission network type and the transmission network bandwidth are set according to the transmission network configuration information.

[0030] Optionally, when the preset IO pressure set is not traversed completely, returning to the step of traversing the preset IO pressure set to obtain the target IO pressure includes:

[0031] When the preset IO pressure set is not completely traversed, the source storage pool and the destination storage pool are cleared, and the process returns to the step of traversing the preset IO pressure set to obtain the target IO pressure.

[0032] Optionally, determining a true correspondence between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth, and the average migration rate according to all the correspondences includes:

[0033] For each corresponding relationship, generating a training sample pair corresponding to the corresponding relationship;

[0034] A preset machine learning algorithm is used to perform machine learning on all the training sample pairs to obtain the true correspondence between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth and the average migration rate.

[0035] Optionally, using the real corresponding relationship to realize the migration time calculation of the real virtual machine includes:

[0036] Obtaining a real read rate of a source storage pool, a real write rate of a destination storage pool, a real bandwidth of a transmission network, and a real migration data volume of the real virtual machine corresponding to the real virtual machine;

[0037] Determine, according to the real corresponding relationship, the real read rate of the source storage pool, the real write rate of the destination storage pool, and the real average migration rate corresponding to the real bandwidth of the transmission network;

[0038] The real migration time of the real virtual machine is calculated according to the real migration data volume and the real average migration rate.

[0039] In a second aspect, the present application further discloses a device for measuring virtual machine migration time, comprising:

[0040] A traversal module is used to traverse the preset IO pressure set to obtain the target IO pressure;

[0041] An injection module, used to inject IO pressure into a source storage pool and a destination storage pool corresponding to the simulated virtual machine according to the target IO pressure, and start a migration task for the simulated virtual machine;

[0042] An acquisition module, used to acquire the read rate of the source storage pool, the write rate of the destination storage pool and the transmission network bandwidth during the execution of the migration task;

[0043] A calculation module, used for obtaining the virtual machine migration time after the migration task is completed, and determining an average migration rate according to the migration data volume of the simulated virtual machine and the virtual machine migration time;

[0044] A recording module, used to record the corresponding relationship between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth and the average migration rate;

[0045] a loop module, used for returning to the step of traversing the preset IO pressure set to obtain the target IO pressure when the preset IO pressure set has not been traversed completely, until the preset IO pressure set is traversed completely to obtain multiple sets of the corresponding relationships;

[0046] A determination module, configured to determine a real correspondence between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth and the average migration rate according to all the correspondences;

[0047] The calculation module is used to calculate the migration time of the real virtual machine by using the real corresponding relationship.

[0048] In a third aspect, the present application further discloses an electronic device, comprising:

[0049] Memory for storing computer programs;

[0050] A processor is used to implement the steps of any one of the above-mentioned methods for measuring virtual machine migration time when executing the computer program.

[0051] In a fourth aspect, the present application further discloses a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the methods for measuring virtual machine migration time as described above are implemented.

[0052] In a fifth aspect, the present invention further discloses a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of any of the methods for measuring virtual machine migration time as described above.

[0053] The present application provides a method for measuring virtual machine migration time, comprising: traversing a preset IO pressure set to obtain a target IO pressure; injecting IO pressure into a source storage pool and a destination storage pool corresponding to a simulated virtual machine according to the target IO pressure, and starting a migration task for the simulated virtual machine; during the execution of the migration task, obtaining the read rate of the source storage pool, the write rate of the destination storage pool, and the transmission network bandwidth; obtaining the virtual machine migration time after the migration task is completed, and determining the average migration rate according to the migration data volume of the simulated virtual machine and the virtual machine migration time; recording the corresponding relationship between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth, and the average migration rate; when the preset IO pressure set is not completely traversed, returning to the step of traversing the preset IO pressure set to obtain the target IO pressure until the preset IO pressure set is completely traversed to obtain multiple groups of the corresponding relationships; determining the real corresponding relationship between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth, and the average migration rate according to all the corresponding relationships; and realizing the migration time measurement of the real virtual machine by using the real corresponding relationship.

[0054] Applying the technical solution provided by the present application, the source storage pool and the destination storage pool corresponding to the simulated virtual machine are simulated with IO pressure injection simulation according to different IO pressure values, and the migration task of the simulated virtual machine is executed during each IO pressure injection simulation process to obtain the source storage pool read rate, the destination storage pool write rate and the transmission network bandwidth during the simulated virtual machine migration process. At the same time, the average migration rate can also be calculated based on the migration data volume and migration time of the simulated virtual machine. Thus, the corresponding relationship between the source storage pool read rate, the destination storage pool write rate, the transmission network bandwidth and the average migration rate can be recorded during each simulated virtual machine migration process, and the real corresponding relationship between the source storage pool read rate, the destination storage pool write rate, the transmission network bandwidth and the average migration rate can be determined based on multiple groups of corresponding relationships, thereby realizing the migration time measurement of the real virtual machine. It can be seen that the technical solution obtains the real corresponding relationship between the source storage pool read rate, the destination storage pool write rate, the transmission network bandwidth and the average migration rate by simulating the virtual machine migration task in the real scenario, which can be used to accurately measure the cross-cloud migration time of the virtual machine, while ensuring the successful migration of the virtual machine and reducing resource waste.

[0055] In one embodiment of the present application, since the average migration rate is calculated based on the migration data volume and migration time of the simulated virtual machine, the migration time refers to the time taken by the simulated virtual machine to migrate from the source cloud platform to the destination platform. Therefore, only when the migration task of the simulated virtual machine is successfully executed, the migration time taken is credible, and the accurate average migration rate can be further calculated. Therefore, after the migration task of the simulated virtual machine is completed, the corresponding migration result can be obtained to determine whether the migration task is successfully executed, and only the virtual machine migration time in the scenario where the migration task is successfully executed is retained, thereby ensuring the accuracy and credibility of the recorded virtual machine migration time, and further ensuring the accuracy of the average migration rate, which helps to build a more accurate correspondence between the source storage pool read rate, the destination storage pool write rate, the transmission network bandwidth and the average migration rate, and thus helps to achieve more accurate virtual machine migration time measurement.

[0056] The virtual machine migration time measurement device, electronic device, computer-readable storage medium and computer program product provided in this application also have the above-mentioned technical effects, and this application will not repeat them here. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions in the prior art and the embodiments of the present application, the drawings required for use in the description of the prior art and the embodiments of the present application are briefly introduced below. Of course, the drawings described below in relation to the embodiments of the present application are only part of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without creative work, and the obtained other drawings also belong to the protection scope of the present application.

[0058] Figure 1 A flowchart of a method for calculating virtual machine migration time provided in this application;

[0059] Figure 2 A flowchart of another method for calculating virtual machine migration time provided in this application;

[0060] Figure 3 A schematic diagram of the structure of a device for measuring virtual machine migration time provided in this application;

[0061] Figure 4 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION

[0062] The core of the present application is to provide a method for measuring the migration time of a virtual machine, which can accurately measure the time for virtual machine migration across clouds, thereby reducing resource waste while ensuring successful migration of the virtual machine; another core of the present application is to provide a device for measuring the migration time of a virtual machine, an electronic device, a computer-readable storage medium, and a computer program product, all of which have the above-mentioned beneficial effects.

[0063] In order to describe the technical solutions in the embodiments of the present application more clearly and completely, the technical solutions in the embodiments of the present application will be introduced below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0064] An embodiment of the present application provides a method for calculating virtual machine migration time.

[0065] Please refer to Figure 1 , Figure 1 This is a flow chart of a method for calculating virtual machine migration time provided in the present application. The method for calculating virtual machine migration time may include the following S101 to S108.

[0066] S101: Traverse the preset IO pressure set to obtain the target IO pressure.

[0067] This step aims to obtain the target IO pressure by traversing the preset IO pressure set, so as to use the target IO pressure to simulate the IO pressure injection scenario. The preset IO pressure set includes multiple IO pressure values, specifically multiple IO pressure values ​​within the preset IO pressure range. Each time the traversal operation of the preset IO pressure set is performed, a target IO pressure can be obtained for simulating the IO pressure injection scenario. Here, the traversal operation of the preset IO pressure set can be performed by sequential traversal.

[0068] S102: Inject IO pressure into the source storage pool and the destination storage pool corresponding to the simulated virtual machine according to the target IO pressure, and start the migration task of the simulated virtual machine.

[0069] This step aims to simulate the IO pressure injection scenario, that is, to inject IO pressure into the source storage pool and destination storage pool corresponding to the simulated virtual machine according to the target IO pressure, wherein the simulated virtual machine is the virtual machine to be migrated in the current IO pressure injection simulation scenario, the source storage pool is the storage pool of the source cloud platform where the simulated virtual machine is located, and the destination storage pool is the storage pool of the destination cloud platform where the simulated virtual machine needs to be migrated. Furthermore, during the IO pressure injection process, the migration task of the simulated virtual machine can be started to simulate the virtual machine migration task in the real scenario.

[0070] In one embodiment of the present application, injecting IO pressure into a source storage pool and a destination storage pool corresponding to a simulated virtual machine according to a target IO pressure, and starting a migration task for the simulated virtual machine may include:

[0071] According to the target IO pressure, IO pressure is injected into the source storage pool and the destination storage pool corresponding to the simulated virtual machine, and the IO pressure injection duration is counted;

[0072] When the IO pressure injection duration reaches the preset duration, the migration task of the simulated virtual machine is started.

[0073] In an embodiment of the present application, in the process of injecting IO pressure into the source storage pool and the destination storage pool corresponding to the simulated virtual machine according to the target IO pressure, before starting the migration task of the simulated virtual machine, the IO pressure injection duration can be monitored in real time, and the migration task of the simulated virtual machine can be started only when the IO pressure injection duration reaches the preset duration. It is understandable that in the early stage of injecting the target IO pressure into the source storage pool and the destination storage pool, since the system may be unstable due to the IO pressure just being injected into the system, immediately starting the migration task of the simulated virtual machine at this time may lead to the problem of simulated virtual machine migration failure, affecting the normal progress of the simulation experiment. Therefore, the migration task of the simulated virtual machine can be started after a certain period of IO pressure injection, so as to effectively ensure the successful execution of the simulated virtual machine migration task, and thus ensure the normal progress of the simulation experiment.

[0074] It should be noted that the specific value of the above-mentioned preset time length does not affect the implementation of the present technical solution, and can be set by technical personnel according to actual conditions, and this application does not limit this.

[0075] S103: During the execution of the migration task, the read rate of the source storage pool, the write rate of the destination storage pool, and the transmission network bandwidth are obtained.

[0076] This step aims to realize data collection during the execution of the simulated virtual machine migration task. The collection content may specifically include the read rate of the source storage pool, the write rate of the destination storage pool, and the transmission network bandwidth. The read rate of the source storage pool is the data reading rate of the source storage pool, the write rate of the destination storage pool is the data writing rate of the destination storage pool, and the transmission network bandwidth is the bandwidth of the transmission network between the source cloud platform and the destination cloud platform.

[0077] S104: After the migration task is completed, the virtual machine migration time is obtained, and an average migration rate is determined according to the migration data volume of the simulated virtual machine and the virtual machine migration time.

[0078] This step aims to calculate the average migration rate of the simulated virtual machine. First, after the migration task is completed, the virtual machine migration time can be obtained, that is, the time taken by the simulated virtual machine to migrate from the source cloud platform to the destination cloud platform; further, the average migration rate of the simulated virtual machine can be calculated in combination with the migration data volume of the simulated virtual machine. It can be understood that the migration data volume is the amount of virtual machine data that needs to be migrated in the simulated virtual machine, and the average migration rate is the quotient between the migration data volume and the virtual machine migration time.

[0079] In one embodiment of the present application, obtaining the virtual machine migration time after the migration task is completed may include:

[0080] After the migration task is completed, the execution result of the migration task is obtained;

[0081] If the execution result is that the migration task is successfully executed, the virtual machine migration time is obtained;

[0082] If the execution result is that the migration task fails, the process returns to the step of traversing the preset IO pressure set to obtain the target IO pressure.

[0083] The embodiment of the present application provides a method for obtaining the migration time of a virtual machine. It is understandable that since the average migration rate is calculated based on the amount of migration data and the migration time of the simulated virtual machine, the migration time refers to the time taken by the simulated virtual machine to migrate from the source cloud platform to the destination platform. Therefore, only when the migration task of the simulated virtual machine is successfully executed, the migration time taken is credible, and the accurate average migration rate can be further calculated. Therefore, after the migration task of the simulated virtual machine is completed, the corresponding migration result can be obtained to determine whether the migration task is successfully executed, and only the virtual machine migration time in the scenario where the migration task is successfully executed is retained, so as to ensure the accuracy and credibility of the recorded virtual machine migration time, and then ensure the accuracy of the average migration rate, which helps to build a more accurate real correspondence between the source storage pool read rate, the destination storage pool write rate, the transmission network bandwidth and the average migration rate, that is, it helps to achieve more accurate virtual machine migration time measurement.

[0084] If the execution result is that the migration task fails, returning to traverse the preset IO pressure set to obtain the target IO pressure step may include:

[0085] If the execution result is that the migration task fails, the error information is obtained;

[0086] If the error message does not contain IO pressure overload information, return to the step of traversing the preset IO pressure set to obtain the target IO pressure;

[0087] If the error message contains IO pressure overload information, the output prompt will be failed.

[0088] It is understandable that the various IO pressure values ​​in the preset IO pressure set are generally arranged in ascending order. If the reason for the failure of the simulated virtual machine migration task is IO pressure overload, then even if more different target IO pressures are switched, the simulated virtual machine migration task will continue to fail. Therefore, if the reason for the failure of the simulated virtual machine migration task is IO pressure overload, the experiment failure prompt information can be directly output to inform the technicians that this round of simulation experiment has failed and a new round of simulation experiment needs to be restarted. Of course, if the reason for the failure of the simulated virtual machine migration task is not IO pressure overload, continue to switch to the next target IO to continue the simulation experiment.

[0089] S105: Record the corresponding relationship between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth, and the average migration rate.

[0090] S106: When the preset IO pressure set is not completely traversed, return to the step of traversing the preset IO pressure set to obtain the target IO pressure, until the preset IO pressure set is completely traversed to obtain multiple sets of corresponding relationships.

[0091] It can be seen that, by using each target IO pressure in the preset IO pressure set, a set of corresponding relationships between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth and the average migration rate can be obtained, that is, multiple sets of corresponding relationships between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth and the average migration rate can be obtained. Obviously, the number of corresponding relationships should be less than or equal to the number of elements in the preset IO pressure set.

[0092] Wherein, when the preset IO pressure set is not completely traversed, the step of returning to traverse the preset IO pressure set to obtain the target IO pressure may include: when the preset IO pressure set is not completely traversed, clearing the source storage pool and the destination storage pool, and returning to traverse the preset IO pressure set to obtain the target IO pressure. That is, after each IO pressure injection simulation, the source storage pool and the destination storage pool may be cleared first to restore the two to the initial empty storage pool state, and then the next round of IO pressure injection simulation is started to effectively ensure that the test environment is not affected by irrelevant factors.

[0093] S107: Determine the actual corresponding relationship between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth, and the average migration rate according to all the corresponding relationships.

[0094] This step aims to determine the true correspondence between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth and the average migration rate. The true correspondence can be calculated based on the correspondence between multiple groups of source storage pool read rates, destination storage pool write rates, transmission network bandwidth and the average migration rate obtained from the above simulation experiments.

[0095] Determining the actual correspondence between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth, and the average migration rate according to all the correspondences may include:

[0096] For each corresponding relationship, generate a pair of training samples corresponding to the corresponding relationship;

[0097] The preset machine learning algorithm is used to perform machine learning on all training sample pairs to obtain the true correspondence between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth and the average migration rate.

[0098] The embodiment of the present application provides a method for determining the real correspondence between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth and the average migration rate according to all the correspondences, that is, it can be implemented based on a training scheme of machine learning technology. Of course, this implementation method is only a preferred method provided by the embodiment of the present application, and it is not the only one. It can also be implemented by fitting calculation of multiple groups of correspondences, which will not be repeated in this application.

[0099] S108: Calculate the migration time of the real virtual machine using the real corresponding relationship.

[0100] In this step, after obtaining the real correspondence between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth and the average migration rate based on S101 to S107, the real correspondence can be applied to the migration scenario of the real virtual machine to achieve the migration time measurement of the real virtual machine. It can be understood that the above S101 to S107 are experimental calculation processes for the real correspondence between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth and the average migration rate. In actual application scenarios, it can be executed only once and the real correspondence can be saved, and it can be directly called in the migration scenario of the real virtual machine.

[0101] The method of calculating the migration time of a real virtual machine by using the real corresponding relationship may include:

[0102] Obtain the real read rate of the source storage pool, the real write rate of the destination storage pool, the real bandwidth of the transmission network, and the real migration data volume of the real virtual machine;

[0103] Determine the actual average migration rate corresponding to the actual read rate of the source storage pool, the actual write rate of the destination storage pool, and the actual bandwidth of the transmission network based on the actual corresponding relationship;

[0104] The actual migration time of the actual virtual machine is calculated based on the actual migration data volume and the actual average migration rate.

[0105] Specifically, when the real correspondence between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth and the average migration rate is applied to the migration scenario of the real virtual machine, the real read rate of the source storage pool, the real write rate of the destination storage pool and the real bandwidth of the transmission network corresponding to the real virtual machine can be obtained, and the real migration data volume of the real virtual machine can be determined. Therefore, the migration time of the real virtual machine can be measured in combination with the above-mentioned real correspondence, and the real migration time of the real virtual machine can be obtained.

[0106] It can be seen that the method for calculating the virtual machine migration time provided in the embodiment of the present application performs IO pressure injection simulation on the source storage pool and the destination storage pool corresponding to the simulated virtual machine according to different IO pressure values, and executes the migration task of the simulated virtual machine during each IO pressure injection simulation process to obtain the source storage pool read rate, the destination storage pool write rate and the transmission network bandwidth during the simulated virtual machine migration process. At the same time, the average migration rate can also be calculated according to the migration data volume and migration time of the simulated virtual machine. Thus, the corresponding relationship between the source storage pool read rate, the destination storage pool write rate, the transmission network bandwidth and the average migration rate can be recorded during each simulated virtual machine migration process, and the real corresponding relationship between the source storage pool read rate, the destination storage pool write rate, the transmission network bandwidth and the average migration rate can be determined according to multiple groups of corresponding relationships, thereby realizing the migration time measurement of the real virtual machine. It can be seen that the technical solution obtains the real corresponding relationship between the source storage pool read rate, the destination storage pool write rate, the transmission network bandwidth and the average migration rate by simulating the virtual machine migration task in the real scene, which can be used to accurately calculate the virtual machine cross-cloud migration time, while ensuring the successful migration of the virtual machine and reducing resource waste.

[0107] Based on the above embodiments:

[0108] In one embodiment of the present application, before traversing the preset IO pressure set and obtaining the target IO pressure, the following steps may also be included:

[0109] Obtaining pre-configuration information, including source cloud platform environment information, destination cloud platform environment information, source storage pool configuration information, destination storage pool configuration information, transmission network configuration information, and simulated virtual machine configuration information; the simulated virtual machine configuration information includes the amount of data to be migrated;

[0110] Determine the connectivity status between the source cloud platform and the destination cloud platform based on the source cloud platform environment information and the destination cloud platform environment information;

[0111] If the connection status is not connected, an error message will be output;

[0112] If the connection status is connected, the environment of the source cloud platform is initialized, and the source storage pool is determined in the source cloud platform according to the source storage pool configuration information;

[0113] Create a simulated virtual machine on the source storage pool according to the simulated virtual machine configuration information, and write virtual machine data into the simulated virtual machine according to the amount of migrated data;

[0114] Initialize the environment of the destination cloud platform and create a destination storage pool on the destination cloud platform according to the destination storage pool configuration information;

[0115] Set the transmission network type and transmission network bandwidth according to the transmission network configuration information.

[0116] The method for calculating the virtual machine migration time provided in the embodiment of the present application realizes the initial configuration of the source cloud platform and the destination platform, and the configuration content includes but is not limited to the cloud platform environment in the source cloud platform, the source storage pool, the simulated virtual machine to be migrated, the cloud platform environment in the destination cloud platform, the destination storage pool, the connection network between the source cloud platform and the destination cloud platform, etc. It should be noted that the simulation experiment can only be started when the connection network between the source cloud platform and the destination cloud platform can be connected normally, otherwise the simulation experiment will fail.

[0117] Based on the above embodiments, an embodiment of the present application provides another method for measuring virtual machine migration time.

[0118] Please refer to Figure 2 , Figure 2 A flowchart of another method for calculating virtual machine migration time provided in this application is as follows:

[0119] 1. Configuration phase:

[0120] (1) The virtual center management IP address of the virtualization platform VMware (source cloud platform) and the IP address of the host to be tested (simulated virtual machine), which are recorded as vCenterIp and vCenterHostIp respectively;

[0121] (2) The virtual center management IP and host (after migration) IP of the destination cloud platform, denoted as iCenterIp and iCenterHostIp respectively;

[0122] (3) Set the storage pool type of the source storage pool on VMware and the destination storage pool on the destination cloud platform;

[0123] (4) Set the network type used during migration, which can support the setting of management network and data network;

[0124] (5) Set the range of IO injection to the source storage pool and the destination storage pool to: 0~N (the default is 0~30), which means the maximum amount of data injected into the storage pool is: storage pool storage capacity * N%.

[0125] 2. Preparation stage:

[0126] (1) System startup to confirm environment information: Execute the command telnet iCenterIp 902 on the target cloud platform host iCenterHostIp to confirm whether the target cloud platform is connected to VMware. If not, an error message will be displayed to the user and the process will be terminated. If connected, continue to (2).

[0127] (2) Initialize the VMware environment, determine the VMware storage pool (source storage pool), record it as vCenterStorage, create a simulated virtual machine on the source storage pool, record it as vm1, and write D amount of data into vm1;

[0128] (3) Initialize the destination cloud platform environment and create a destination storage pool, recorded as iCenterStorage;

[0129] (4) Obtain the transmission network bandwidth and record it in Gigabit or 10 Gigabit.

[0130] 3. IO pressure injection:

[0131] (1) Inject IO pressure into the storage pool according to the preset IO pressure range. If not set, the storage pool will be injected with IO pressure of 0 to 30 by default. The meaning of the IO pressure range is as follows: 0 means no IO injection, and 1 means writing 1 / 100 of the total capacity of the storage pool into the storage pool every minute. By injecting IO pressure into the storage pool, the write rate of the destination storage pool and the read rate of the VMware storage pool are affected, so as to obtain the migration rate under different read and write rates.

[0132] (2) After each IO pressure injection, the read rate on the VMware side storage pool and the write rate on the destination cloud platform storage pool are detected respectively, which are recorded as Vread and Vwrite.

[0133] 4. Initiate the migration task:

[0134] (1) After the IO injection experiment is stable, initiate a virtual machine migration task on VMware and detect the task status during the migration process. When the task status is completed, record the task completion time. At this point, a set of data is acquired. If the task status is detected as failed, obtain the error message ERROR and determine whether the ERROR contains the information "Storage pool IO pressure is too high". If so, it indicates that the IO pressure has reached the migration limit and the migration task can no longer be performed normally. The experiment ends.

[0135] (2) Based on the data size D of the virtual machine and the task completion time t, the average migration rate v = D / t is calculated;

[0136] (3) Save the complete data (transmission network bandwidth, VMware-side storage pool read rate, destination cloud platform storage pool write rate). After multiple experiments, the overall data is shown in Table 1:

[0137] Table 1: Average migration rate records at different disk read and write rates

[0138]

[0139] (4) Use chaos engineering to inject IO into recovery and clear all data on the destination storage pool to restore the empty storage pool state, ensuring that the test environment is not affected by irrelevant factors.

[0140] 5. Data processing:

[0141] (1) After obtaining n sets of data, the data is trained through machine learning methods to obtain the true correspondence between the average VMware cross-cloud migration rate and the transmission network bandwidth, the VMware-side storage pool read rate, and the destination cloud platform storage pool write rate: V = β (Vnetwork, Vread, Vwrite);

[0142] (2) By obtaining Vnetwork, Vread, and Vwrite of the actual migration environment, the average migration rate V can be calculated. Based on the actual amount of virtual machine data Data and V that need to be migrated, the actual migration time can be calculated.

[0143] It can be seen that the method for calculating the virtual machine migration time provided in the embodiment of the present application performs IO pressure injection simulation on the source storage pool and the destination storage pool corresponding to the simulated virtual machine according to different IO pressure values, and executes the migration task of the simulated virtual machine during each IO pressure injection simulation process to obtain the source storage pool read rate, the destination storage pool write rate and the transmission network bandwidth during the simulated virtual machine migration process. At the same time, the average migration rate can also be calculated according to the migration data volume and migration time of the simulated virtual machine. Thus, the corresponding relationship between the source storage pool read rate, the destination storage pool write rate, the transmission network bandwidth and the average migration rate can be recorded during each simulated virtual machine migration process, and the real corresponding relationship between the source storage pool read rate, the destination storage pool write rate, the transmission network bandwidth and the average migration rate can be determined according to multiple groups of corresponding relationships, thereby realizing the migration time measurement of the real virtual machine. It can be seen that the technical solution obtains the real corresponding relationship between the source storage pool read rate, the destination storage pool write rate, the transmission network bandwidth and the average migration rate by simulating the virtual machine migration task in the real scene, which can be used to accurately calculate the virtual machine cross-cloud migration time, while ensuring the successful migration of the virtual machine and reducing resource waste.

[0144] An embodiment of the present application provides a device for measuring virtual machine migration time.

[0145] Please refer to Figure 3 , Figure 3 This is a schematic diagram of the structure of a virtual machine migration time measurement device provided by the present application. The virtual machine migration time measurement device is applied to a management service platform and may include:

[0146] A traversal module 1 is used to traverse a preset IO pressure set to obtain a target IO pressure;

[0147] Injection module 2, used to inject IO pressure into the source storage pool and the destination storage pool corresponding to the simulated virtual machine according to the target IO pressure, and start the migration task of the simulated virtual machine;

[0148] The acquisition module 3 is used to acquire the read rate of the source storage pool, the write rate of the destination storage pool and the transmission network bandwidth during the execution of the migration task;

[0149] Calculation module 4, used to obtain the virtual machine migration time after the migration task is completed, and determine the average migration rate according to the amount of migration data of the simulated virtual machine and the virtual machine migration time;

[0150] Recording module 5, used to record the corresponding relationship between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth and the average migration rate;

[0151] A loop module 6, which is used to return to the step of traversing the preset IO pressure set to obtain the target IO pressure when the preset IO pressure set has not been traversed completely, until the preset IO pressure set is traversed completely and multiple groups of corresponding relationships are obtained;

[0152] Determination module 7, used to determine the real correspondence between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth and the average migration rate according to all the correspondences;

[0153] The calculation module 8 is used to calculate the migration time of the real virtual machine by using the real corresponding relationship.

[0154] It can be seen that the virtual machine migration time measurement device provided in the embodiment of the present application performs IO pressure injection simulation on the source storage pool and the destination storage pool corresponding to the simulated virtual machine according to different IO pressure values, and executes the migration task of the simulated virtual machine in each IO pressure injection simulation process to obtain the source storage pool read rate, the destination storage pool write rate and the transmission network bandwidth in the simulated virtual machine migration process. At the same time, the average migration rate can also be calculated according to the migration data volume and migration time of the simulated virtual machine. Thus, the corresponding relationship between the source storage pool read rate, the destination storage pool write rate, the transmission network bandwidth and the average migration rate can be recorded in each simulated virtual machine migration process, and the real corresponding relationship between the source storage pool read rate, the destination storage pool write rate, the transmission network bandwidth and the average migration rate can be determined according to multiple groups of corresponding relationships, thereby realizing the migration time measurement of the real virtual machine. It can be seen that the technical solution obtains the real corresponding relationship between the source storage pool read rate, the destination storage pool write rate, the transmission network bandwidth and the average migration rate by simulating the virtual machine migration task in the real scene, which can be used to accurately measure the virtual machine cross-cloud migration time, while ensuring the successful migration of the virtual machine and reducing resource waste.

[0155] In one embodiment of the present application, the calculation module 4 may include:

[0156] A determination unit, used to obtain the execution result of the migration task after the migration task is completed;

[0157] An acquisition unit, configured to acquire the virtual machine migration time if the execution result is that the migration task is successfully executed;

[0158] The returning unit is used to return to the step of traversing the preset IO pressure set to obtain the target IO pressure if the execution result is that the migration task fails.

[0159] In one embodiment of the present application, the above-mentioned return unit can be specifically used to obtain error information if the execution result is that the migration task fails to execute; if the error information does not contain IO pressure overload information, return to the step of traversing the preset IO pressure set to obtain the target IO pressure; if the error information contains IO pressure overload information, output an experiment failure prompt.

[0160] In one embodiment of the present application, the device for calculating the virtual machine migration time may also include a configuration module, which is used to obtain pre-configuration information before traversing the preset IO pressure set and obtaining the target IO pressure. The pre-configuration information includes source cloud platform environment information, destination cloud platform environment information, source storage pool configuration information, destination storage pool configuration information, transmission network configuration information, and simulated virtual machine configuration information; the simulated virtual machine configuration information includes the amount of migration data; the connectivity status between the source cloud platform and the destination cloud platform is determined according to the source cloud platform environment information and the destination cloud platform environment information; if the connectivity status is not connected, an error prompt is output; if the connectivity status is connected, the source cloud platform environment is initialized, and the source storage pool is determined in the source cloud platform according to the source storage pool configuration information; a simulated virtual machine is created on the source storage pool according to the simulated virtual machine configuration information, and virtual machine data is written to the simulated virtual machine according to the amount of migration data; the destination cloud platform environment is initialized, and a destination storage pool is created on the destination cloud platform according to the destination storage pool configuration information; the transmission network type and the transmission network bandwidth are set according to the transmission network configuration information.

[0161] In one embodiment of the present application, the loop module 6 may be specifically used to clear the source storage pool and the destination storage pool when the preset IO pressure set has not been traversed completely, and return to the step of traversing the preset IO pressure set to obtain the target IO pressure.

[0162] In one embodiment of the present application, the above-mentioned determination module 7 can be specifically used to generate a training sample pair corresponding to each corresponding relationship; use a preset machine learning algorithm to perform machine learning on all training sample pairs to obtain the true correspondence between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth and the average migration rate.

[0163] In one embodiment of the present application, the above-mentioned measurement module 8 can be specifically used to obtain the real read rate of the source storage pool, the real write rate of the destination storage pool, the real bandwidth of the transmission network and the real migration data volume of the real virtual machine corresponding to the real virtual machine; determine the real average migration rate corresponding to the real read rate of the source storage pool, the real write rate of the destination storage pool, and the real bandwidth of the transmission network according to the real corresponding relationship; calculate the real migration time of the real virtual machine according to the real migration data volume and the real average migration rate.

[0164] For an introduction to the device provided in the embodiments of the present application, please refer to the above method embodiments, and the present application will not elaborate on them here.

[0165] An embodiment of the present application provides an electronic device.

[0166] Please refer to Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in this application, and the electronic device may include:

[0167] A memory 11, used for storing computer programs;

[0168] The processor 10 can implement the steps of any one of the above-mentioned methods for measuring virtual machine migration time when executing a computer program.

[0169] like Figure 4 , which is a schematic diagram of the composition structure of an electronic device, the electronic device may include: a processor 10, a memory 11, a communication interface 12 and a communication bus 13. The processor 10, the memory 11 and the communication interface 12 all communicate with each other through the communication bus 13.

[0170] In the embodiment of the present application, the processor 10 may be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic devices, etc.

[0171] The processor 10 may call a program stored in the memory 11. Specifically, the processor 10 may execute operations in an embodiment of the method for measuring virtual machine migration time.

[0172] The memory 11 is used to store one or more programs, which may include program codes, and the program codes include computer operation instructions. In the embodiment of the present application, the memory 11 at least stores programs for implementing the following functions:

[0173] Traverse the preset IO pressure set to obtain the target IO pressure;

[0174] Inject IO pressure into the source storage pool and the destination storage pool corresponding to the simulated virtual machine according to the target IO pressure, and start the migration task of the simulated virtual machine;

[0175] During the migration task execution, obtain the read rate of the source storage pool, the write rate of the destination storage pool, and the transmission network bandwidth;

[0176] After the migration task is completed, the virtual machine migration time is obtained, and the average migration rate is determined according to the amount of migration data of the simulated virtual machine and the virtual machine migration time;

[0177] Record the corresponding relationship between the source storage pool's read rate, the destination storage pool's write rate, the transmission network bandwidth, and the average migration rate;

[0178] When the preset IO pressure set is not traversed completely, return to the step of traversing the preset IO pressure set to obtain the target IO pressure, until the preset IO pressure set is traversed completely and multiple sets of corresponding relationships are obtained;

[0179] Determine the actual correspondence between the source storage pool's read rate, the destination storage pool's write rate, the transmission network bandwidth, and the average migration rate based on all correspondences;

[0180] The real correspondence relationship is used to realize the migration time calculation of the real virtual machine.

[0181] In a possible implementation, the memory 11 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during use.

[0182] In addition, the memory 11 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.

[0183] The communication interface 12 may be an interface of a communication module, and is used to connect to other devices or systems.

[0184] Of course, it should be noted that Figure 4 The structure shown does not constitute a limitation on the electronic device in the embodiment of the present application. In actual applications, the electronic device may include Figure 4 More or fewer components than shown, or combinations of certain components.

[0185] An embodiment of the present application provides a computer-readable storage medium.

[0186] The computer-readable storage medium provided in the embodiment of the present application stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned methods for calculating the virtual machine migration time can be implemented.

[0187] Among them, the computer-readable storage medium can be any available medium that can be stored in a computer or a data storage device such as a server or data center that includes one or more available media integrated. For example, it can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape, etc.), an optical medium (such as a DVD) or a semiconductor medium (such as a solid-state hard disk) and other media that can store computer program codes.

[0188] For an introduction to the computer-readable storage medium provided in the embodiments of the present application, please refer to the above method embodiments, and the present application will not elaborate on them here.

[0189] An embodiment of the present application provides a computer program product.

[0190] The computer program product provided in the embodiment of the present application includes a computer program / instruction, and when the computer program / instruction is executed by a processor, the steps of any of the above-mentioned methods for measuring the virtual machine migration time can be implemented.

[0191] Specifically, in the above embodiments, all or part of them can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of them can be implemented in the form of a computer program product.

[0192] Among them, the computer program product may include one or more computer programs / instructions, and when the computer program / instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application may be generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line, etc.) or wireless (e.g., infrared, wireless, microwave, etc.) means.

[0193] For an introduction to the computer program product provided in the embodiments of the present application, please refer to the above method embodiments, and the present application will not elaborate on them here.

[0194] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0195] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0196] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0197] The technical solution provided by the present application is described in detail above. The principle and implementation method of the present application are described in detail using specific examples herein, and the description of the above embodiments is only used to help understand the method and core idea of ​​the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the present application.

Claims

1. A method for calculating virtual machine migration time, characterized in that: include: Traverse the preset IO pressure set to obtain the target IO pressure; Injecting IO pressure into the source storage pool and the destination storage pool corresponding to the simulated virtual machine according to the target IO pressure, and starting a migration task for the simulated virtual machine; During the execution of the migration task, obtaining the read rate of the source storage pool, the write rate of the destination storage pool, and the transmission network bandwidth; After the migration task is completed, the virtual machine migration time is obtained, and an average migration rate is determined according to the migration data volume of the simulated virtual machine and the virtual machine migration time; Recording the corresponding relationship between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth and the average migration rate; When the preset IO pressure set has not been traversed completely, returning to the step of traversing the preset IO pressure set to obtain the target IO pressure, until the preset IO pressure set is traversed completely and a plurality of sets of the corresponding relationships are obtained; Determine, according to all the corresponding relationships, a true corresponding relationship between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth and the average migration rate; The real corresponding relationship is used to realize the migration time calculation of the real virtual machine.

2. The method for calculating virtual machine migration time according to claim 1, characterized in that: After the migration task is completed, the virtual machine migration time is obtained, including: After the migration task is completed, obtaining the execution result of the migration task; If the execution result is that the migration task is successfully executed, obtaining the virtual machine migration time; If the execution result is that the migration task fails to execute, the process returns to the step of traversing the preset IO pressure set to obtain the target IO pressure.

3. The method for calculating virtual machine migration time according to claim 2, characterized in that: If the execution result is that the migration task fails to execute, returning to the step of traversing the preset IO pressure set to obtain the target IO pressure includes: If the execution result is that the migration task fails to execute, error information is obtained; If the error message does not include IO pressure overload information, returning to the step of traversing the preset IO pressure set to obtain the target IO pressure; If the error message contains the IO pressure overload information, a prompt indicating that the experiment failed is output.

4. The method for calculating virtual machine migration time according to claim 1, characterized in that: Before traversing the preset IO pressure set and obtaining the target IO pressure, the following steps are also included: Obtaining pre-configuration information, the pre-configuration information including source cloud platform environment information, destination cloud platform environment information, source storage pool configuration information, destination storage pool configuration information, transmission network configuration information, and simulated virtual machine configuration information; the simulated virtual machine configuration information includes the migration data volume; Determine the connectivity status between the source cloud platform and the destination cloud platform according to the source cloud platform environment information and the destination cloud platform environment information; If the connectivity status is disconnected, an error message is output; If the connection state is connected, initializing the environment of the source cloud platform, and determining the source storage pool in the source cloud platform according to the source storage pool configuration information; Creating the simulated virtual machine on the source storage pool according to the simulated virtual machine configuration information, and writing virtual machine data into the simulated virtual machine according to the migration data amount; Initializing the environment of the destination cloud platform, and creating the destination storage pool on the destination cloud platform according to the destination storage pool configuration information; The transmission network type and the transmission network bandwidth are set according to the transmission network configuration information.

5. The method for calculating virtual machine migration time according to claim 1, characterized in that: When the preset IO pressure set is not traversed completely, returning to the step of traversing the preset IO pressure set to obtain the target IO pressure includes: When the preset IO pressure set is not completely traversed, the source storage pool and the destination storage pool are cleared, and the process returns to the step of traversing the preset IO pressure set to obtain the target IO pressure.

6. The method for calculating virtual machine migration time according to claim 1, characterized in that: Determining a true correspondence between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth, and the average migration rate according to all the correspondences includes: For each corresponding relationship, generating a training sample pair corresponding to the corresponding relationship; A preset machine learning algorithm is used to perform machine learning on all the training sample pairs to obtain the true correspondence between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth and the average migration rate.

7. The method for calculating virtual machine migration time according to claim 1, characterized in that: The real corresponding relationship is used to realize the migration time calculation of the real virtual machine, including: Obtaining a real read rate of a source storage pool, a real write rate of a destination storage pool, a real bandwidth of a transmission network, and a real migration data volume of the real virtual machine corresponding to the real virtual machine; Determine, according to the real corresponding relationship, the real read rate of the source storage pool, the real write rate of the destination storage pool, and the real average migration rate corresponding to the real bandwidth of the transmission network; The real migration time of the real virtual machine is calculated according to the real migration data volume and the real average migration rate.

8. A device for measuring virtual machine migration time, characterized in that: include: A traversal module is used to traverse the preset IO pressure set to obtain the target IO pressure; An injection module, used to inject IO pressure into a source storage pool and a destination storage pool corresponding to the simulated virtual machine according to the target IO pressure, and start a migration task for the simulated virtual machine; An acquisition module, used to acquire the read rate of the source storage pool, the write rate of the destination storage pool and the transmission network bandwidth during the execution of the migration task; A calculation module, used for obtaining the virtual machine migration time after the migration task is completed, and determining an average migration rate according to the migration data volume of the simulated virtual machine and the virtual machine migration time; A recording module, used to record the corresponding relationship between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth and the average migration rate; a loop module, used for returning to the step of traversing the preset IO pressure set to obtain the target IO pressure when the preset IO pressure set has not been traversed completely, until the preset IO pressure set is traversed completely to obtain multiple sets of the corresponding relationships; A determination module, configured to determine a real correspondence between the read rate of the source storage pool, the write rate of the destination storage pool, the transmission network bandwidth and the average migration rate according to all the correspondences; The calculation module is used to calculate the migration time of the real virtual machine by using the real corresponding relationship.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the method for measuring virtual machine migration time as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for measuring the virtual machine migration time according to any one of claims 1 to 7 are implemented.