A virtual machine migration method, system, computer device and storage medium

By setting static and adaptive migration modes and dynamically adjusting migration rate limits, the IO pressure problem during virtual machine cross-storage migration is solved, achieving efficient virtual machine migration protection and speed improvement.

CN116302326BActive Publication Date: 2026-04-17JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JINAN INSPUR DATA TECH CO LTD
Filing Date
2023-02-10
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

During virtual machine migration across storage, existing technologies cannot effectively protect business I/O, resulting in high I/O pressure on the system during the migration process and affecting virtual machine performance.

Method used

By setting migration modes, including static migration mode and adaptive migration mode, the migration rate limit can be dynamically adjusted to optimize the virtual machine cross-storage migration process. In static migration mode, the migration is based on the first migration rate limit, while in adaptive migration mode, the second migration rate limit is adjusted according to the real-time performance of the services carried by the virtual machine.

Benefits of technology

It maximizes the protection of business I/O during virtual machine cross-storage migration, improves migration speed, and reduces the impact on business.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116302326B_ABST
    Figure CN116302326B_ABST
Patent Text Reader

Abstract

The application discloses a virtual machine migration method and system, computer equipment and a storage medium. The method comprises the following steps: receiving a migration task, reading source storage information and destination storage information of a to-be-migrated virtual machine based on the migration task; receiving a migration mode, and migrating the to-be-migrated virtual machine from the source storage to the destination storage based on the migration mode, the source storage information and the destination storage information. Through the scheme, the cross-storage migration of the virtual machine is realized, the virtual machine business IO is maximally protected, and the cross-storage migration rate of the virtual machine is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of virtualization technology, and in particular to a virtual machine migration method, system, computer device, and storage medium. Background Technology

[0002] Virtualization technology can reduce enterprise operating costs and improve operational efficiency, and is therefore increasingly favored by users. KVM (Kernel Virtual Machine) virtualization has largely replaced Xen virtualization and become the default open-source solution for creating and supporting virtual machines on most Linux systems.

[0003] As business volume increases, the number of virtual machines also increases, and the demand for storage capacity gradually increases. When storage needs maintenance, storage capacity is insufficient, or to prevent a storage pool from becoming overloaded, it is often necessary to migrate virtual machines from one storage pool to another. However, the storage migration process often puts a lot of IO (Input / Output) pressure on the system, affecting current business operations.

[0004] Virtualization products support online cross-storage migration of virtual machines while hosting them. However, as customer business data volumes increase, cross-storage migration times rise, generating significant I / O pressure that impacts virtual machine performance. Therefore, optimizing cross-storage migration technology to maximize business I / O protection during migration is a pressing technical challenge. Summary of the Invention

[0005] In view of this, the present invention proposes a virtual machine migration method, system, computer device and storage medium, which can set migration rate limits through migration mode, thereby maximizing the protection of business I / O when virtual machines migrate across storage.

[0006] To achieve the above objectives, one aspect of the present invention provides a virtual machine migration method, specifically including the following steps:

[0007] Receive migration task, and read the source storage information and destination storage information of the virtual machine to be migrated based on the migration task;

[0008] The system receives the migration mode and migrates the virtual machine to be migrated from the source storage to the destination storage based on the migration mode, the source storage information, and the destination storage information.

[0009] In some implementations, the migration mode includes a static migration mode and an adaptive migration mode. The static migration mode includes a first migration rate limit, configured to migrate the virtual machine to be migrated from the source storage to the destination storage based on the first migration rate limit.

[0010] The adaptive migration mode includes a second migration rate limit, configured to adjust the second migration rate limit based on the real-time performance of the virtual machine to be migrated while carrying services, so as to migrate the virtual machine to be migrated from the source storage to the destination storage.

[0011] In some implementations, migrating the virtual machine to be migrated from the source storage to the destination storage based on the migration mode, the source storage information, and the destination storage information includes:

[0012] In response to the migration mode being static migration mode, the virtual machine is migrated from the source storage to the destination storage based on the first migration rate limit, the source storage information, and the destination storage information.

[0013] In some implementations, migrating the virtual machine to be migrated from the source storage to the destination storage based on the migration mode, the source storage information, and the destination storage information includes:

[0014] In response to the migration mode being adaptive migration mode, the virtual machine to be migrated is migrated from the source storage to the destination storage based on the real-time performance of the virtual machine carrying the service, the source storage information, and the destination storage information.

[0015] In some implementations, migrating the virtual machine to be migrated from the source storage to the destination storage based on the real-time performance of the virtual machine carrying services, the source storage information, and the destination storage information includes:

[0016] Based on the source storage information and the destination storage information, the virtual machine to be migrated is migrated from the source storage to the destination storage, and the following steps are performed during the migration process:

[0017] Poll the number of I / O operations per second and the data throughput per second of the virtual machine to be migrated while it is carrying the current business;

[0018] The status of the virtual machine to be migrated while carrying the current business is determined based on the number of I / O operations per second and the data throughput per second obtained from polling.

[0019] Query the migration rate of the virtual machine to be migrated at this time;

[0020] The second migration rate limit is adjusted based on the queried migration rate and the judgment result.

[0021] In some implementations, determining the state of the virtual machine to be migrated while carrying the current service based on the polled number of I / O operations per second and the data throughput per second includes:

[0022] If the number of I / O operations per second is less than a first threshold, the data throughput per second is less than a second threshold, and the number of polls meets a preset number, then the input / output pressure of the virtual machine to be migrated carrying the current business is determined to be low.

[0023] If the number of I / O operations per second polled is not less than a first threshold or the data throughput per second is not less than a second threshold, and the number of polls meets a preset number, then the input / output pressure of the virtual machine to be migrated carrying the current business is determined to be large.

[0024] In some implementations, adjusting the second migration rate limit based on the queried migration rate and the determination result includes:

[0025] In response to the high input / output pressure on the virtual machine to be migrated while carrying the current business, the second migration rate limit is reduced based on the queried migration rate;

[0026] In response to the low input / output pressure of the virtual machine to be migrated while carrying the current business, a determination is made as to whether to adjust the second migration rate limit based on the proximity of the queried migration rate and the second migration rate limit.

[0027] In some implementations, determining whether to adjust the second migration rate limit based on the proximity of the queried migration rate and the second migration rate limit includes:

[0028] If the queried migration rate exceeds a preset percentage of the second migration rate limit, then the second migration rate limit is increased.

[0029] If the queried migration rate does not exceed the second migration rate limit by a preset percentage, then the second migration rate limit will not be adjusted.

[0030] Another aspect of this invention provides a virtual machine migration system, comprising:

[0031] An information reading module is configured to receive migration tasks and read the source storage information and destination storage information of the virtual machine to be migrated based on the migration tasks.

[0032] A migration module is configured to receive migration mode and migrate the virtual machine to be migrated from the source storage to the destination storage based on the migration mode, the source storage information, and the destination storage information.

[0033] In another aspect of the present invention, a computer device is provided, comprising: at least one processor; and a memory storing a computer program executable on the processor, the computer program performing the steps of the method described above when executed by the processor.

[0034] In another aspect, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method steps.

[0035] The present invention has at least the following beneficial technical effects: the present invention enables cross-storage migration of virtual machines, and by setting migration speed limits through migration modes, it can maximize the protection of business I / O during cross-storage migration of virtual machines, thereby improving the speed of cross-storage migration of virtual machines. Attached Figure Description

[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these drawings without creative effort.

[0037] Figure 1 A flowchart of an embodiment of the virtual machine migration method provided by the present invention;

[0038] Figure 2 A flowchart of yet another embodiment of the virtual machine migration method provided by the present invention;

[0039] Figure 3 A schematic diagram of an embodiment of the virtual machine migration system provided by the present invention;

[0040] Figure 4 A schematic diagram of the structure of an embodiment of the computer device provided by the present invention;

[0041] Figure 5 This is a schematic diagram of an embodiment of the computer-readable storage medium provided by the present invention. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to specific examples and the accompanying drawings.

[0043] It should be noted that all uses of "first" and "second" in the embodiments of the present invention are for the purpose of distinguishing two entities or parameters with the same name but different names. It is clear that "first" and "second" are only for the convenience of expression and should not be construed as limiting the embodiments of the present invention. Subsequent embodiments will not explain this in detail.

[0044] Based on the above objectives, a first aspect of the present invention provides an embodiment of a virtual machine migration method. For example... Figure 1 As shown, it includes the following steps:

[0045] S10. Receive the migration task and read the source storage information and destination storage information of the virtual machine to be migrated based on the migration task;

[0046] S20. Receive migration mode, and migrate the virtual machine to be migrated from the source storage to the destination storage based on the migration mode, the source storage information, and the destination storage information.

[0047] Specifically, to avoid the impact on business I / O during virtual machine cross-storage migration, this embodiment of the invention implements virtual machine cross-storage migration through the following scheme:

[0048] The migration mode is configured and displayed on the front-end interface for user selection, and allows for adjustment of migration rate limits. Specifically, migration modes include static migration mode and adaptive migration mode. Static migration mode includes a first migration rate limit, used to migrate the virtual machine to be migrated from the source storage to the destination storage based on the first migration rate limit; adaptive migration mode includes a second migration rate limit, dynamically adjusting the second migration rate limit based on the real-time performance of the virtual machine to be migrated while carrying services, and then migrating the virtual machine to be migrated from the source storage to the destination storage.

[0049] The system receives migration tasks selected by the user in the front-end interface. There can be one or more migration tasks. After receiving a migration task, the system reads all storage pool information connected to the physical machine, including storage pool type, connection method, and network card information. It also reads the source and destination storage information of the virtual machine to be migrated. The source and destination storage can also be understood as disks built on the storage pool.

[0050] The system receives the migration mode selected by the user in the front-end interface, and based on the selected migration mode, as well as the source storage information and destination storage information of the virtual machine to be migrated, it migrates the virtual machine to be migrated from the source storage to the destination storage.

[0051] The above solution enables cross-storage migration of virtual machines. By setting migration speed limits through migration modes, the system can maximize the protection of business I / O during cross-storage migration, thereby improving the speed of cross-storage migration of virtual machines.

[0052] In some implementations, the migration mode includes a static migration mode and an adaptive migration mode. The static migration mode includes a first migration rate limit, configured to migrate the virtual machine to be migrated from the source storage to the destination storage based on the first migration rate limit.

[0053] The adaptive migration mode includes a second migration rate limit, configured to adjust the second migration rate limit based on the real-time performance of the virtual machine to be migrated while carrying services, so as to migrate the virtual machine to be migrated from the source storage to the destination storage.

[0054] In one specific embodiment, the static migration mode displays the upper limit of the migration rate and the first migration rate limit on the front-end interface. The first migration rate limit can be the default migration rate limit or a user-defined migration rate limit, with the setting range below the upper limit of the migration rate. When users want to maximize the protection of business I / O, they can set the second migration rate limit to a smaller value (minimum 10M). When users want to accelerate the migration, they can set it to a larger value (or even set it to no rate limit). When set to no rate limit, the upper limit of the migration rate is set by the static migration mode based on the source storage, destination storage, and network card capabilities, taking the lower limit. Static settings only apply to this one migration task. The adaptive migration mode prioritizes protecting business I / O performance. For each migration task, the second migration rate limit is automatically adjusted based on the current business I / O load of the virtual machine and the physical machine load.

[0055] In this embodiment of the invention, a static rate setting entry is provided through a static migration mode, which allows setting the upper limit of the migration rate according to different environments. The adaptive migration mode enables dynamic adjustment of the migration rate limit based on the actual business load, thereby achieving the maximum speed for virtual machine cross-storage migration while ensuring user business.

[0056] In some implementations, migrating the virtual machine to be migrated from the source storage to the destination storage based on the migration mode, the source storage information, and the destination storage information includes:

[0057] In response to the migration mode being static migration mode, the virtual machine is migrated from the source storage to the destination storage based on the first migration rate limit, the source storage information, and the destination storage information.

[0058] In some implementations, migrating the virtual machine to be migrated from the source storage to the destination storage based on the migration mode, the source storage information, and the destination storage information includes:

[0059] In response to the migration mode being adaptive migration mode, the virtual machine to be migrated is migrated from the source storage to the destination storage based on the real-time performance of the virtual machine carrying the service, the source storage information, and the destination storage information.

[0060] In some implementations, migrating the virtual machine to be migrated from the source storage to the destination storage based on the real-time performance of the virtual machine carrying services, the source storage information, and the destination storage information includes:

[0061] Based on the source storage information and the destination storage information, the virtual machine to be migrated is migrated from the source storage to the destination storage, and the following steps are performed during the migration process:

[0062] Poll the number of I / O operations per second and the data throughput per second of the virtual machine to be migrated while it is carrying the current business;

[0063] The status of the virtual machine to be migrated while carrying the current business is determined based on the number of I / O operations per second and the data throughput per second obtained from polling.

[0064] Query the migration rate of the virtual machine to be migrated at this time;

[0065] The second migration rate limit is adjusted based on the queried migration rate and the judgment result.

[0066] In some implementations, determining the state of the virtual machine to be migrated while carrying the current service based on the polled number of I / O operations per second and the data throughput per second includes:

[0067] If the number of I / O operations per second is less than a first threshold, the data throughput per second is less than a second threshold, and the number of polls meets a preset number, then the input / output pressure of the virtual machine to be migrated carrying the current business is determined to be low.

[0068] If the number of I / O operations per second polled is not less than a first threshold or the data throughput per second is not less than a second threshold, and the number of polls meets a preset number, then the input / output pressure of the virtual machine to be migrated carrying the current business is determined to be large.

[0069] In one specific embodiment, the IO state of the virtual machine to be migrated while carrying the current service is determined based on the following steps, and the second migration rate limit adjustment is performed after determining the IO state:

[0070] S110. Based on the number of IOs per second (IOPS) and the data throughput per second (BW) of the virtual machine to be migrated carrying the current business during the first cycle, for example, the first cycle is 10s or 20s, but not limited to this;

[0071] S111. During the first cycle, determine whether the number of I / O operations per second performed by the virtual machine to be migrated while carrying the current business is less than the first threshold and whether the data throughput per second is less than the second threshold.

[0072] S112. In response to the fact that the number of IO operations per second in the first cycle is less than a first threshold and the data throughput per second is less than a second threshold, determine whether the number of polling operations based on the first cycle is less than a first preset number. The first preset number can be set to 10 times, but is not limited to this.

[0073] S113. In response to the fact that the number of polling cycles based on the first period is less than the first preset number, return to step S110;

[0074] S114. In response to the fact that the number of polling cycles based on the first cycle is not less than the first preset number of times, the input / output pressure of the virtual machine to be migrated is determined to be small.

[0075] S115. Query the migration rate of the virtual machine to be migrated at this time;

[0076] S116. Compare the queried migration rate with the second migration rate limit, and determine whether the comparison result triggers the adjustment of the second migration rate limit;

[0077] S117. If the comparison result does not trigger the second migration rate limit adjustment, return to step S110.

[0078] S118. In response to the comparison result triggering the second migration rate limit adjustment, the second migration rate limit is increased, and after the second migration rate limit is increased, the number of IO operations per second and the data throughput per second of the virtual machine to be migrated carrying the current business are obtained.

[0079] S119. Determine whether the number of I / O operations per second when the acquired virtual machine to be migrated is less than the first threshold and whether the data throughput per second is less than the second threshold.

[0080] S120. In response to the fact that the number of IO operations per second when the acquired virtual machine to be migrated is less than the first threshold and the data throughput per second is less than the second threshold when carrying the current business, return to step S115.

[0081] S121. In response to the fact that the number of IO operations per second when the acquired virtual machine to be migrated carries the current business is not less than the first threshold or the data throughput per second is not less than the second threshold, return to step S110.

[0082] In one specific embodiment, the IO state of the virtual machine to be migrated while carrying the current service is determined based on the following steps, and the second migration rate limit adjustment is performed after determining the IO state:

[0083] S210. Based on the number of IOs per second (IOPS) and data throughput per second (BW) of the virtual machine to be migrated carrying the current business in the first cycle, for example, the first cycle can be 10s or 20s, but is not limited to this;

[0084] S211. During the first cycle, determine whether the number of I / O operations per second when the virtual machine to be migrated is carrying the current business is less than the first threshold and whether the data throughput per second is less than the second threshold.

[0085] S212. In response to the fact that the number of IOs executed per second is not less than the first threshold or the data throughput per second is not less than the second threshold in the first cycle, poll the number of IOs executed per second and the data throughput per second when the virtual machine to be migrated carries the current business in the second cycle.

[0086] S213. During the second cycle, determine whether the number of I / O operations per second when the virtual machine to be migrated is carrying the current business is less than the first threshold and whether the data throughput per second is less than the second threshold.

[0087] S214. In response to the fact that the number of IOs performed per second in the second cycle is less than the first threshold and the data throughput per second is less than the second threshold, return to step S210.

[0088] S215. In response to the fact that the number of IO operations per second in the second cycle is not less than the first threshold or the data throughput per second is not less than the second threshold, determine whether the number of polling operations based on the second cycle is less than the second preset number, and the second preset number is greater than 1.

[0089] S216. In response to the fact that the number of polling cycles based on the second period is less than the second preset number, return to step S212.

[0090] S217. In response to the fact that the number of polling cycles based on the second cycle is not less than the second preset number of times, the number of IO operations per second and the data throughput per second of the virtual machine to be migrated carrying the current business are polled based on the third cycle.

[0091] S218. During the third cycle, determine whether the number of I / O operations per second when the virtual machine to be migrated is carrying the current business is less than the first threshold and whether the data throughput per second is less than the second threshold.

[0092] S219. In response to the fact that the number of IOs performed per second in the third cycle is less than the first threshold or the data throughput per second is greater than or equal to the second threshold, return to step S210.

[0093] S220. In response to the fact that the number of IO operations per second in the third cycle is not less than the first threshold or the data throughput per second is greater than or equal to the second threshold, determine whether the number of polling operations based on the third cycle is less than the third preset number.

[0094] S221. In response to the fact that the number of polling cycles based on the third period is less than the third preset number, return to step S212.

[0095] S222. If the number of polling cycles based on the third cycle is not less than the third preset number, then the input and output pressure of the current business is determined to be large.

[0096] S223. Query the migration rate of the virtual machine to be migrated at this time, adjust the second migration rate limit of the virtual machine to be migrated based on the queried migration rate, and return to step S210.

[0097] In the above embodiments, the first cycle, the second cycle, and the third cycle increase sequentially, and the second preset number of times and the third preset number of times increase sequentially.

[0098] The above embodiments realize cross-storage migration of virtual machines through adaptive migration mode, and by setting the second migration rate limit, the service I / O can be protected to the greatest extent during cross-storage migration of virtual machines, thereby improving the cross-storage migration rate of virtual machines.

[0099] In some implementations, adjusting the second migration rate limit based on the queried migration rate and the determination result includes:

[0100] In response to the high input / output pressure on the virtual machine to be migrated while carrying the current business, the second migration rate limit is reduced based on the queried migration rate;

[0101] In response to the low input / output pressure of the virtual machine to be migrated while carrying the current business, a determination is made as to whether to adjust the second migration rate limit based on the proximity of the queried migration rate and the second migration rate limit.

[0102] In some implementations, determining whether to adjust the second migration rate limit based on the proximity of the queried migration rate and the second migration rate limit includes:

[0103] If the queried migration rate exceeds a preset percentage of the second migration rate limit, then the second migration rate limit is increased.

[0104] If the queried migration rate does not exceed the second migration rate limit by a preset percentage, then the second migration rate limit will not be adjusted.

[0105] In one specific embodiment, combined with Figure 2 The adjustment of the second migration rate limit in adaptive migration mode is explained.

[0106] The polling mechanism is used to determine the virtual machine stress level, and then to determine how to adjust the second migration speed limit settings.

[0107] The monitoring process begins with a first cycle (10 seconds) to detect the IOPS or BW value of the virtual machine carrying the current service I / O. If IOPS >= the first threshold or BW >= the second threshold, the monitoring continues with a second cycle (30 seconds interval), executing this process three times. If the IOPS or BW value in the second cycle is also greater than or equal to the first or second threshold, the monitoring continues with a third cycle (1 minute interval), executing this process six times. If all ten queries result in IOPS or BW values ​​exceeding the threshold, the virtual machine is considered to be under high I / O pressure. The current migration rate is then checked, and the second migration rate limit is adjusted to 50% of the current migration rate to reduce the pressure on service I / O, protecting service I / O and ensuring uninterrupted service performance. After adjustment, the monitoring cycle restarts with ten more checks to determine how to adjust the rate limit settings.

[0108] Similarly, through 10 polls, when the IOPS and BW of the service I / O are both less than the threshold, it is determined that the current virtual machine's service I / O pressure is relatively low, and the current migration speed exceeds 80% of the current rate limit. The second migration rate limit is then automatically increased in stages. The first increase is 50% of the current limit. The current service I / O IOPS and BW are checked; if both are less than the threshold, and the current migration speed exceeds 80% of the rate limit, the second migration rate limit is increased further to accelerate the migration. Each increase is 50% until the system's maximum migration limit is reached. The maximum migration limit is the maximum value based on the source storage, destination storage, and network interface card (NIC) capabilities. After each increase, if the current service I / O IOPS or BW is greater than or equal to the threshold, the rate limit adjustment stops, and the polling process restarts with 10 polls to determine how to adjust the rate limit settings.

[0109] The above solution enables cross-storage migration of virtual machines. By setting a second migration rate limit, the system can maximize the protection of business I / O during cross-storage migration, thereby improving the speed of cross-storage migration and meeting the needs of different users in cross-storage migration scenarios, thus enhancing the user experience.

[0110] Based on the same inventive concept, according to another aspect of the present invention, such as Figure 3 As shown, embodiments of the present invention also provide a virtual machine migration system, comprising:

[0111] Information reading module 110 is configured to receive migration tasks and read the source storage information and destination storage information of the virtual machine to be migrated based on the migration tasks.

[0112] Migration module 120 is configured to receive migration mode and migrate the virtual machine to be migrated from source storage to destination storage based on the migration mode, the source storage information, and the destination storage information.

[0113] Based on the same inventive concept, according to another aspect of the present invention, such as Figure 4 As shown, an embodiment of the present invention also provides a computer device 30, which includes a processor 310 and a memory 320. The memory 320 stores a computer program 321 that can be run on the processor. When the processor 310 executes the program, it performs the steps of the method described above.

[0114] Memory, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the virtual machine migration method described in the embodiments of this application. The processor executes various functional applications and data processing of the system by running the non-volatile software programs, instructions, and modules stored in the memory, thereby implementing the virtual machine migration method of the above method embodiments.

[0115] The memory may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on system usage. Furthermore, the memory may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory may optionally include memory remotely located relative to the processor, which can be connected to the local module via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0116] Based on the same inventive concept, according to another aspect of the present invention, such as Figure 5 As shown, embodiments of the present invention also provide a computer-readable storage medium 40, which stores a computer program 410 that, when executed by a processor, performs the methods described above.

[0117] Finally, it should be noted that those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The storage medium for the program can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc. The above computer program embodiments can achieve the same or similar effects as any of the corresponding foregoing method embodiments.

[0118] Those skilled in the art will also understand that the various exemplary logic blocks, modules, circuits, and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software, or a combination of both. To clearly illustrate this interchangeability between hardware and software, the functionality of various illustrative components, blocks, modules, circuits, and steps has been generally described. Whether this functionality is implemented as software or as hardware depends on the specific application and the design constraints imposed on the system as a whole. Those skilled in the art can implement the functionality in various ways for each specific application, but such implementation decisions should not be construed as departing from the scope of the embodiments disclosed herein.

[0119] The above are exemplary embodiments disclosed in this invention. However, it should be noted that various changes and modifications can be made without departing from the scope of the embodiments of this invention as defined by the claims. The functions, steps, and / or actions of the methods according to the disclosed embodiments described herein do not need to be performed in any particular order. The sequence numbers of the disclosed embodiments of this invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. Furthermore, although the elements disclosed in the embodiments of this invention may be described or claimed individually, they may be understood as multiple unless explicitly limited to a singular number.

[0120] It should be understood that, as used herein, the singular form “a” is intended to include the plural form as well, unless the context clearly supports an exception. It should also be understood that, as used herein, “and / or” refers to any and all possible combinations of one or more of the associated listed items.

[0121] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the invention (including the claims) is limited to these examples. Within the framework of the invention, technical features of the above embodiments or different embodiments can be combined, and many other variations of different aspects of the invention exist, which are not provided in the details for the sake of brevity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the protection scope of the invention.

Claims

1. A virtual machine migration method, characterized in that, include: Receive migration task, and read the source storage information and destination storage information of the virtual machine to be migrated based on the migration task; Receive migration mode, and migrate the virtual machine to be migrated from the source storage to the destination storage based on the migration mode, the source storage information, and the destination storage information; The migration of the virtual machine to be migrated from the source storage to the destination storage based on the migration mode, the source storage information, and the destination storage information includes: in response to the migration mode being an adaptive migration mode, migrating the virtual machine to be migrated from the source storage to the destination storage based on the source storage information and the destination storage information, and performing the following steps during the migration process: polling the number of IO operations per second and the data throughput per second of the virtual machine to be migrated while carrying the current business; determining the state of the virtual machine to be migrated while carrying the current business based on the polled number of IO operations per second and the data throughput per second; querying the migration rate of the virtual machine to be migrated at this time; and adjusting the second migration rate limit based on the queried migration rate and the determination result. The determination of the status of the virtual machine to be migrated carrying the current service based on the polled number of I / O operations per second and the data throughput per second includes: if the polled number of I / O operations per second is less than a first threshold and the data throughput per second is less than a second threshold, and the number of polls meets a preset number, then the input / output pressure of the virtual machine to be migrated carrying the current service is determined to be low; if the polled number of I / O operations per second is not less than the first threshold or the data throughput per second is not less than the second threshold, and the number of polls meets a preset number, then the input / output pressure of the virtual machine to be migrated carrying the current service is determined to be high. The adjustment of the second migration rate limit based on the queried migration rate and the determination result includes: in response to the high input / output pressure of the virtual machine to be migrated carrying the current service, lowering the second migration rate limit based on the queried migration rate; in response to the low input / output pressure of the virtual machine to be migrated carrying the current service, determining whether to adjust the second migration rate limit based on the closeness between the queried migration rate and the second migration rate limit; in response to the queried migration rate exceeding a preset percentage of the second migration rate limit, increasing the second migration rate limit; and in response to the queried migration rate not exceeding a preset percentage of the second migration rate limit, not adjusting the second migration rate limit.

2. The method of claim 1, wherein, The migration mode also includes a static migration mode, which includes a first migration rate limit and is configured to migrate the virtual machine to be migrated from the source storage to the destination storage based on the first migration rate limit.

3. The method of claim 2, wherein, Migrating the virtual machine to be migrated from the source storage to the destination storage based on the migration mode, the source storage information, and the destination storage information includes: In response to the migration mode being static migration mode, the virtual machine is migrated from the source storage to the destination storage based on the first migration rate limit, the source storage information, and the destination storage information.

4. A virtual machine migration system, characterized by, include: An information reading module is configured to receive migration tasks and read the source storage information and destination storage information of the virtual machine to be migrated based on the migration tasks. A migration module is configured to receive migration mode and migrate the virtual machine to be migrated from the source storage to the destination storage based on the migration mode, the source storage information, and the destination storage information. The migration of the virtual machine to be migrated from the source storage to the destination storage based on the migration mode, the source storage information, and the destination storage information includes: in response to the migration mode being an adaptive migration mode, migrating the virtual machine to be migrated from the source storage to the destination storage based on the source storage information and the destination storage information, and performing the following steps during the migration process: polling the number of IO operations per second and the data throughput per second of the virtual machine to be migrated while carrying the current business; determining the state of the virtual machine to be migrated while carrying the current business based on the polled number of IO operations per second and the data throughput per second; querying the migration rate of the virtual machine to be migrated at this time; and adjusting the second migration rate limit based on the queried migration rate and the determination result. The determination of the status of the virtual machine to be migrated carrying the current service based on the polled number of I / O operations per second and the data throughput per second includes: if the polled number of I / O operations per second is less than a first threshold and the data throughput per second is less than a second threshold, and the number of polls meets a preset number, then the input / output pressure of the virtual machine to be migrated carrying the current service is determined to be low; if the polled number of I / O operations per second is not less than the first threshold or the data throughput per second is not less than the second threshold, and the number of polls meets a preset number, then the input / output pressure of the virtual machine to be migrated carrying the current service is determined to be high. The adjustment of the second migration rate limit based on the queried migration rate and the determination result includes: in response to the high input / output pressure of the virtual machine to be migrated carrying the current service, lowering the second migration rate limit based on the queried migration rate; in response to the low input / output pressure of the virtual machine to be migrated carrying the current service, determining whether to adjust the second migration rate limit based on the closeness between the queried migration rate and the second migration rate limit; in response to the queried migration rate exceeding a preset percentage of the second migration rate limit, increasing the second migration rate limit; and in response to the queried migration rate not exceeding a preset percentage of the second migration rate limit, not adjusting the second migration rate limit.

5. A computer device, comprising: At least one processor; as well as A memory storing a computer program executable on the processor, characterized in that the processor executes the program by performing the steps of the method as described in any one of claims 1 to 3.

6. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it performs the steps of the method as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Virtual machine migration method and device based on distributed file system

    CN102521038A

  • Virtual machine thermal migration method, device and equipment and storage medium

    CN112181594A