CN117950796A - Data migration method and server - Google Patents

Data migration method and server Download PDF

Info

Publication number
CN117950796A
CN117950796A CN202311818170.6A CN202311818170A CN117950796A CN 117950796 A CN117950796 A CN 117950796A CN 202311818170 A CN202311818170 A CN 202311818170A CN 117950796 A CN117950796 A CN 117950796A
Authority
CN
China
Prior art keywords
virtual machine
data
disk
condition
copy
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311818170.6A
Other languages
Chinese (zh)
Inventor
黄云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
XFusion Digital Technologies Co Ltd
Original Assignee
XFusion Digital Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by XFusion Digital Technologies Co Ltd filed Critical XFusion Digital Technologies Co Ltd
Priority to CN202311818170.6A priority Critical patent/CN117950796A/en
Publication of CN117950796A publication Critical patent/CN117950796A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application provides a data migration method and a server, wherein the method comprises the following steps: copying the data of the first virtual machine to the second virtual machine; acquiring the size of first incremental data, wherein the first incremental data is data generated by the first virtual machine in the process of data copying; and executing a virtual machine switching operation under the condition that the switching condition is met based on the size of the first incremental data and the disk information of the first virtual machine, wherein the virtual machine switching operation is used for indicating that the service operated by the first virtual machine is switched to the second virtual machine. The data migration method provided by the embodiment of the application can reduce the duration of service interruption in the data migration process, reduce the influence on the service, and meet the requirements of the service on continuity and high availability.

Description

Data migration method and server
Technical Field
The present application relates to the field of server technologies, and in particular, to a data migration method and a server.
Background
In the present digital age, virtualization technology has become one of the key technologies for enterprises and service providers, which can manage and use computing resources more efficiently, improving service performance and reliability. For example, a Virtual Machine (VM) is a physical server-based virtualization technology that emulates a real computer environment through software and runs an operating system and applications in the environment. The virtual machine operating system and application programs may share the hardware resources of the physical server, but each own independent operating system and application program environment.
For heterogeneous cluster virtual machine data migration including cold migration and warm migration, the virtual machine cold migration needs to stop a source virtual machine and copy data to a target virtual machine, so that service interruption and service unavailability are caused, and the requirements of service on continuity and high availability cannot be met. The virtual machine warm migration can be performed under the condition that the source virtual machine operates, that is, the source virtual machine copies data to the target virtual machine before shutdown, however, because in the process of data copying, the service can continuously operate, the source virtual machine generates newly added service data, in order to avoid data loss, the newly added service data needs to be copied to the target virtual machine after the source virtual machine is shut down, then the target virtual machine is started to operate the service, if the newly added service data is larger, the copying time is longer, the service interruption duration is increased, and the requirements of the service on continuity and high availability cannot be met.
Disclosure of Invention
The embodiment of the application provides a data migration method and a server, which can reduce the duration of service interruption in the data migration process, reduce the influence on the service and meet the requirements of the service on continuity and high availability.
In a first aspect, an embodiment of the present application provides a data migration method, where the method includes:
copying the data of the first virtual machine to the second virtual machine;
acquiring the size of first incremental data, wherein the first incremental data is data generated by the first virtual machine in the process of data copying;
and executing a virtual machine switching operation under the condition that the switching condition is met based on the size of the first incremental data and the disk information of the first virtual machine, wherein the virtual machine switching operation is used for indicating that the service operated by the first virtual machine is switched to the second virtual machine.
That is, according to the data migration method provided by the embodiment of the application, whether the switching condition is met is judged according to the size of the incremental data and the disk information, so that the service interruption duration is reduced, and the accuracy is higher.
In one possible implementation manner, the performing a virtual machine switching operation when determining that a switching condition is met based on the size of the first incremental data and the disk information of the first virtual machine, where the virtual machine switching operation is used to indicate that the service operated by the first virtual machine is switched to the second virtual machine, includes:
Determining a first disk increment condition and/or a first disk copy condition of the first virtual machine based on the size of the first increment data and the disk information of the first virtual machine;
And executing virtual machine switching operation under the condition that the first disk increment condition and/or the first disk copy condition of the first virtual machine meet the switching condition, wherein the virtual machine switching operation is used for indicating that the service operated by the first virtual machine is switched to the second virtual machine.
Considering the influence of the incremental data and the disk information on the duration of service interruption, before the first virtual machine stops running, judging whether a switching condition is met according to the first disk incremental condition and/or the first disk copying condition of the first virtual machine, if the switching condition is met, indicating that the duration of service interruption is shorter, the influence on the service is lower, and executing virtual machine switching operation to meet the requirements of the service on continuity and high availability, and if the switching condition is not met, indicating that the duration of service interruption is longer, and not executing virtual machine switching operation to reduce the influence on the service.
In one possible implementation manner, the disk information includes a disk capacity of the first virtual machine, the first disk increment situation includes a first disk increment ratio, and determining, based on a size of the first increment data and the disk information, the first disk increment situation of the first virtual machine includes:
The first disk delta ratio is determined based on the size of the first delta data and the disk capacity.
In the embodiment of the application, the disk increment ratio is used for representing the disk increment condition of the first virtual machine, so that the influence degree of the increment data size generated by the service on the service can be more accurately represented.
In one possible implementation manner, the disk information includes a total disk copy duration of the first virtual machine, a data size of a last data copy, and a last data copy duration, the first disk copy condition includes a first copy duration ratio, and determining, based on the first incremental data and the disk capacity, the first disk copy condition of the first virtual machine includes:
determining a first copy duration based on the size of the first incremental data and the data size of the last data copy and the duration of the last data copy;
and determining the first copy time length ratio based on the first copy time length and the total disk copy time length.
In the embodiment of the application, the disk copy condition of the first virtual machine is represented by adopting the copy time length ratio, so that the influence degree of the copy time length of the incremental data generated by the service on the service can be more accurately represented.
In one possible implementation manner, the method further includes:
if the first disk increment ratio is smaller than the first threshold value and the first copy time length ratio is smaller than the second threshold value, the switching condition is met;
if the first disk increment ratio is greater than or equal to a first threshold, or the first copy length ratio is greater than or equal to a second threshold, the switching condition is not satisfied.
In the embodiment of the application, in order to further reduce the duration of service interruption in the data migration process and reduce the influence on the service, the virtual machine switching operation is executed under the condition that the disk increment ratio is smaller than the first threshold value and the copy duration ratio is smaller than the second threshold value, otherwise, the virtual machine switching operation is not executed.
In one possible implementation manner, the first threshold value and/or the second threshold value are set values, or the first threshold value and/or the second threshold value are adjusted according to the service importance.
In the embodiment of the application, considering that the importance degrees of different services may be different, to adapt to the different services, the first threshold and/or the second threshold may be adjusted according to the importance degrees of the services.
In one possible implementation manner, the copying the data of the first virtual machine to the second virtual machine includes:
Performing full snapshot processing on the first virtual machine to obtain full data of the first virtual machine;
copying the full amount of data to the second virtual machine.
In the embodiment of the application, in order to improve the efficiency of data copying, the data copying is performed in a snapshot mode.
In one possible implementation manner, the performing a virtual machine switching operation includes:
Stopping running the first virtual machine;
Performing incremental snapshot processing on the first virtual machine to obtain incremental data;
copying the incremental data to the second virtual machine;
And running the second virtual machine.
In the embodiment of the application, in order to avoid data loss and reduce the service interruption time, the data is copied in an incremental snapshot mode in the switching process of the virtual machine.
In one possible implementation manner, the method further includes:
Copying the first increment data to the second virtual machine under the condition that the first disk increment condition and/or the first disk copy condition do not meet the switching condition;
Acquiring the size of second incremental data, wherein the second incremental data is data generated by the first virtual machine in the process of copying the first incremental data to the second virtual machine;
determining a second disk increment condition and/or a second disk copy condition of the first virtual machine based on the size of the second increment data and the disk information;
And executing virtual machine switching operation under the condition that the second disk increment condition and/or the second disk copy condition meet the switching condition.
In the embodiment of the application, if the switching condition is not met, the first incremental data is copied to the second virtual machine, after the copying is completed, whether the switching condition is met is judged again according to the size of the second incremental data and the disk information, if the switching condition is met, the virtual machine switching operation is executed, otherwise, the cycle is executed until the service operated by the first virtual machine is switched to the second virtual machine or the execution of the data migration method is finished.
In one possible implementation manner, the first virtual machine and the second virtual machine are in heterogeneous clusters.
In the embodiment of the application, the data migration method is suitable for virtual machine temperature migration in the heterogeneous cluster, reduces the influence of the virtual machine temperature migration in the heterogeneous cluster on the service, and meets the requirements of the service on continuity and high availability.
In a second aspect, the present application provides a data migration system comprising:
The data copying module is used for copying the data of the first virtual machine to the second virtual machine;
The data acquisition module is used for acquiring the size of first incremental data, wherein the first incremental data is data generated by the first virtual machine in the process of data copying;
the determining module is used for determining a first disk increment condition and/or a first disk copy condition of the first virtual machine based on the size of the first increment data and the disk information of the first virtual machine;
The switching module is used for executing virtual machine switching operation under the condition that the first disk increment condition and/or the first disk copy condition meet the switching condition, and the virtual machine switching operation is used for indicating that the service operated by the first virtual machine is switched to the second virtual machine.
In a third aspect, an embodiment of the present application provides a server, including: a processor and a memory, the processor being connected to the memory, the memory storing a computer program, the processor implementing the method according to the first aspect when executing the computer program.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having stored therein a computer program which, when executed by a computer, implements the method of any of the first aspects.
In a fifth aspect, an embodiment of the present application provides a computer program product comprising a computer program which, when executed by a computer, implements the method of any of the first aspects.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the application, and that other drawings can be obtained according to these drawings without inventive faculty for a person skilled in the art.
Fig. 1 is a schematic diagram of a data migration method according to an embodiment of the present application;
Fig. 2 is a schematic diagram of steps S401 to S404 in a data migration method according to an embodiment of the present application;
fig. 3 is a schematic diagram of steps S501 to S504 in a data migration method according to an embodiment of the present application;
FIG. 4 is a schematic flow chart of a data migration method according to an embodiment of the present application;
FIG. 5A is a schematic diagram illustrating copying of full data of a source virtual machine to a target virtual machine in a data migration method according to an embodiment of the present application;
FIG. 5B is a schematic diagram illustrating copying of first incremental data of a source virtual machine to a target virtual machine in a data migration method according to an embodiment of the present application;
FIG. 5C is a schematic diagram illustrating copying of second incremental data of a source virtual machine to a target virtual machine in a data migration method according to an embodiment of the present application;
fig. 6 is a block diagram of a server according to an embodiment of the present application;
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The embodiment of the application provides a data migration method, a server and a computer readable storage medium, wherein the method comprises the following steps: copying the data of the first virtual machine to the second virtual machine; acquiring the size of first incremental data, wherein the first incremental data is data generated by the first virtual machine in the process of data copying; determining a first disk increment condition and/or a first disk copy condition of the first virtual machine based on the size of the first increment data and the disk information of the first virtual machine; and executing virtual machine switching operation under the condition that the first disk increment condition and/or the first disk copy condition meet the switching condition, wherein the virtual machine switching operation is used for indicating switching the service operated by the first virtual machine to the second virtual machine. The data migration method provided by the embodiment of the application can reduce the duration of service interruption in the data migration process, reduce the influence on the service, and meet the requirements of the service on continuity and high availability.
In the embodiment of the present application, the data migration method may be applied to a server (such as a management server, etc.), where the server may include, but is not limited to, a rack server, a blade server, etc., or the server may be a general-purpose server, a heterogeneous server, a DPU server, a GPU server, an AI server, etc.
The data migration method may be applied to a server cluster, where the server cluster may include a plurality of servers, such as a management server, a computing server, or a storage server, where a plurality of virtual machines may be running in the server cluster, where the virtual machines may be deployed in any one of the servers, the data migration method may be performed by a management server in the server cluster, where the management server may perform data communication with the plurality of virtual machines, and in a scenario of virtual machine service migration, the management server may perform the data migration method to migrate a service of a source virtual machine to a target virtual machine to meet requirements of the service for continuity and high availability, where a first virtual machine is a source virtual machine and a second virtual machine is a target virtual machine.
For example, the server cluster may be a heterogeneous cluster, that is, the data migration method provided by the embodiment of the present application may be suitable for virtual machine temperature migration in a heterogeneous cluster, that is, the data migration method may be performed by a management server in a heterogeneous cluster, where the heterogeneous cluster may include a plurality of clusters with different functions or types, such as a first cluster, a second cluster, a third cluster, and the like, and the clusters may include, for example, but not limited to, kubernetes (K8S) clusters, distributed storage clusters, load balancing clusters, high performance clusters, high availability clusters, grid computing clusters, and the like. For example, the first virtual machine and the second virtual machine may be virtual machines in the same cluster or different clusters, and the management server may be in data communication with the virtual machines in each cluster, for example, the first virtual machine may be a virtual machine running in the first cluster, and the second virtual machine may be a virtual machine running in the second cluster, where the management server may migrate a service of the first virtual machine in the first cluster to the second virtual machine in the second cluster, where the service is not limited.
The technical scheme of the application is described in detail below by specific examples. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
Fig. 1 is a schematic diagram of a data migration method according to an embodiment of the present application. Referring to fig. 1, the method may include steps S101 to S103, specifically as follows:
s101, copying the data of the first virtual machine to the second virtual machine.
In the embodiment of the application, the server can provide a management interface, and the user can access the management interface through the browser of the terminal so as to realize man-machine interaction. For example, the management interface may display information of multiple virtual machines, for example, resource information (such as resources of a host, a CPU, a GPU, a memory, a disk, a network card, or resource usage information, etc.), service information (such as service type, service volume, service operation condition, etc.), operation status (such as virtual machine fault condition, performance condition, etc.), and so on.
The service migration request includes an identifier of the first virtual machine and an identifier of the second virtual machine, and the service migration request is used for requesting to migrate the service in the first virtual machine to the second virtual machine. And the server responds to the received service migration request and triggers the execution of the data migration method so as to realize the migration of the service running in the first virtual machine to the second virtual machine. In step S101, the server copies data of the first virtual machine to the second virtual machine in response to the received service migration request. More specifically, the server copies data in the disk mounted by the first virtual machine to the disk mounted by the second virtual machine according to the identifier of the first virtual machine and the identifier of the second virtual machine.
For example, the server may determine, according to information of the plurality of virtual machines, whether to trigger execution of the data migration method, e.g., if there is a failure of the virtual machine, or insufficient resources, etc., the execution of the data migration method is triggered. In step S101, the server determines a first virtual machine and a second virtual machine from the plurality of virtual machines according to information of the plurality of virtual machines, and copies data of the first virtual machine to the second virtual machine. For example, the first virtual machine may be a virtual machine that satisfies a first condition, and the second virtual machine may be a virtual machine that satisfies a second condition, which may include, but is not limited to: the resource information of the virtual machine does not meet the resource condition, the virtual machine fails, the service information of the virtual machine does not meet the service condition, the running state of the virtual machine does not meet the running condition, and the like, and the second condition may include, but is not limited to: the resource information of the virtual machine meets the resource condition, the service information of the virtual machine meets the service condition or the running state of the virtual machine meets the running condition, and the like.
In the embodiment of the application, the data generated by the running service of the virtual machine can be stored in the disk mounted on the virtual machine, and the disk capacity mounted on the virtual machine can be determined according to the disk capacity allocated to the virtual machine, for example, the disk capacity allocated to the virtual machine is 1GB, and the sum of all the disk capacities mounted on the virtual machine is greater than or equal to 1GB. Step S101 may be performed during the operation of the first virtual machine, that is, during the operation of the first virtual machine, data (such as full data or incremental data) in the disk mounted on the first virtual machine is copied to the disk mounted on the second virtual machine.
For example, the server may copy data (e.g., full data or delta data, etc.) from the disk mounted on the first virtual machine and store the copied data (e.g., full data or delta data, etc.) to the disk mounted on the second virtual machine. Or the server sends a data copying request to the first virtual machine, wherein the data copying request is used for requesting the first virtual machine to copy data (such as full data or incremental data) to the second virtual machine, and the first virtual machine responds to the data copying request to transmit and store the data (such as the full data or the incremental data) to a disk mounted on the second virtual machine.
S102, acquiring the size of first incremental data, wherein the first incremental data is data generated by the first virtual machine in the process of data copying.
That is, during the execution of step S101, the first virtual machine is in operation, and service data, i.e., the first incremental data, is continuously generated. Specifically, from the beginning time of data copying to the ending time of data copying, data generated by the running service of the first virtual machine is written into a disk mounted on the first virtual machine. For example, in step S102, the size of the first incremental data may be obtained by way of a snapshot. Or at the end time of copying the data (such as full data, etc.), the size of the first incremental data is obtained by reading the sizes of the incremental data in all the disks mounted on the first virtual machine, for example, the size of the first incremental data is the sum of the sizes of the incremental data in all the disks mounted on the first virtual machine.
In an embodiment of the present application, the method may further include: and obtaining disk information of the first virtual machine.
Illustratively, the disk information of the first virtual machine is used to represent disk information related to data copy, or disk information affecting the duration of data copy, etc., for example, the disk information of the first virtual machine may include, but is not limited to, the disk capacity of the first virtual machine, the total duration of disk copy of the first virtual machine, the data size of the last data copy, or the duration of the last data copy, etc. The disk capacity of the first virtual machine may be determined according to the disk capacity allocated to the first virtual machine, or according to the sum of all the disk capacities mounted on the first virtual machine. The total duration of disk copies of the first virtual machine may be determined according to the sum of the durations of all data copies of the first virtual machine during the service migration. The data size of the last data copy may be determined according to the data size of the copy in the last data copy process, for example, obtained by means of a snapshot. The duration of the last data copy may be determined according to the start time and the end time of the last data copy, for example, the difference between the start time and the end time, etc.
And S103, executing a virtual machine switching operation under the condition that the switching condition is met based on the size of the first incremental data and the disk information of the first virtual machine, wherein the virtual machine switching operation is used for indicating that the service operated by the first virtual machine is switched to the second virtual machine.
That is, according to the data migration method provided by the embodiment of the application, whether the switching condition is met is judged according to the size of the incremental data and the disk information, so that the service interruption duration is reduced, and the accuracy is higher.
In one possible implementation manner, step S103 may include:
S1031, determining a first disk increment condition and/or a first disk copy condition of the first virtual machine based on the size of the first increment data and the disk information of the first virtual machine;
S1032, executing a virtual machine switching operation under the condition that the first disk increment condition and/or the first disk copy condition of the first virtual machine meet the switching condition, wherein the virtual machine switching operation is used for indicating that the service operated by the first virtual machine is switched to the second virtual machine.
The disk increment condition of the first virtual machine is used for representing increment conditions of service data generated by the first virtual machine in a data copying process, such as the size of disk increment data, disk increment ratio and the like, and the disk copy request of the first virtual machine is used for representing data copying condition of the first virtual machine, such as the size of copy time length, copy time length ratio and the like.
In the embodiment of the present application, step S1031 may further include: and determining a first disk increment condition and/or a first disk copy condition of the first virtual machine based on the size of the first increment data and the disk information.
In step S1031, a first disk delta condition can be determined based on the size of the first delta data and the disk information. In one possible implementation manner, the first disk increment situation may include a first disk increment ratio, and determining, based on the size of the first increment data and the disk information, the first disk increment situation of the first virtual machine includes:
S10311, determining the first disk increment ratio based on the size of the first increment data and the disk capacity.
In the embodiment of the application, the disk increment ratio is used for representing the disk increment condition of the first virtual machine, so that the influence degree of the increment data size generated by the service on the service can be more accurately represented.
Illustratively, the first disk increment ratio may be calculated from the following formula:
△sizeThreshold=Sum(disk_i.incrementSize)/Sum(disk_i.Size)
Where Δ sizeThreshold is the first disk increment ratio, sum (disk_i.incrustsize) is the size of the first increment data, sum (disk_i.size) is the disk capacity of the first virtual machine.
Illustratively, the first virtual machine mounted disk may include a first disk1, a second disk2, … nth disk diskN, and the like, and the size of the first incremental data may be calculated according to the following formula, where the formula is:
△incrementSize=disk1.incrementSize+disk2.incrementSize+....+diskN.incrementSize=Sum(disk_i.incrementSize)
wherein Delta incrementSize is the size of the first delta data, and disk1. Incrustation Size, disk2. Incrustation Size, … disk N. Incrustation Size are the sizes of the delta data of disk1, disk2, … diskN, respectively.
For example, the disk capacity of the first virtual machine may be calculated by the following formula:
△totalDiskSize=disk1.Size+disk2.Size+...+diskN.Size=Sum(disk_i.Size)
Wherein Δ totalDiskSize is the disk capacity of the first virtual machine, and disk1.Size, disk2.Size, … diskN are the incremental capacities of disk1, disk2, … diskN, respectively.
In step S1031, a first disk copy condition may be determined according to the size of the first delta data and the disk information. In one possible implementation manner, the first disk copy condition may include a first copy duration ratio, and determining, based on the first incremental data and the disk capacity, the first disk copy condition of the first virtual machine includes:
S10312, determining a first copy time based on the size of the first incremental data, the data size of the last data copy and the time length of the last data copy;
S10313, determining the first copy time length ratio based on the first copy time length and the total disk copy time length.
In the embodiment of the application, the disk copy condition of the first virtual machine is represented by adopting the copy time length ratio, so that the influence degree of the copy time length of the incremental data generated by the service on the service can be more accurately represented.
Illustratively, the first copy length may be calculated from the following formula:
△estimatedTime=△incrementSize/△v
Wherein Delta ESTIMATEDTIME is the first copy time length and Deltav is the data copy rate, which is determined based on the data size of the last data copy and the time length of the last data copy.
Illustratively, the data copy rate may be calculated from the following formula:
△v=△preCopySize/△preCopyTime
Wherein Δ preCopySize is the data size of the last data copy, Δ preCopyTime is the time length of the last data copy, and may be obtained by snapshot, Δ preCopyTime =t1-t 0, t1 is the start time of the last data copy, and t0 is the end time of the last data copy.
It should be noted that, by determining the data copy rate by the size and duration of the last data copy, the influence caused by the disk IO performance or the network performance can be covered, so as to improve the accuracy of predicting the first copy duration.
Illustratively, the first copy length ratio may be calculated from the following formula:
△copyTimeThreshold=△estimatedTime/Sum(disk_i.copyTime)
The delta copyTimeThreshold is a first copy time length ratio, and Sum (disk_i.copy time) is a total disk copy time length, where the total disk copy time length may be determined according to a Sum of time lengths of all data copies of the first virtual machine in a service migration process.
Illustratively, the total disk copy time length may be calculated by the following formula:
△totalCopytime=copyTime1+copyTime2+...+copyTimeN=Sum(disk_i.copyTime)
wherein Delta totalCopytime is the total length of the disk copy, copyTime, copyTime, … copyTimeN are the lengths of the first N data copies, respectively.
It is to be understood that the determination of the disk increment status and/or the disk copy status of the first virtual machine is not limited to the examples in the embodiments of the present application, and is not limited herein.
In the embodiment of the present application, the virtual machine switching operation may include, but is not limited to, stopping running the first virtual machine (such as the first virtual machine is turned off, etc.), copying incremental data of the first virtual machine to the second virtual machine, or running the second virtual machine (such as the second virtual machine is turned on, etc.), so as to implement switching the service running by the first virtual machine to the second virtual machine.
It should be noted that, in the service migration process, the duration of the service interruption may include, but is not limited to, a power-off duration of the first virtual machine, a data copy duration after the first virtual machine is powered off, or a power-on duration of the second virtual machine. In order to reduce the duration of service interruption to the greatest extent, in the embodiment of the present application, whether to execute the virtual machine switching operation is determined according to the first disk increment condition and/or the first disk copy condition, specifically, if the first disk increment condition and/or the first disk copy condition satisfy the switching condition, it indicates that the duration of data copy after the first virtual machine is turned off is shorter, the influence on the service is lower, and the virtual machine switching operation is executed, thereby reducing the duration of service interruption. If the first disk increment condition and/or the first disk copy condition do not meet the switching condition, the method indicates that the data copy time length after the first virtual machine is shut down is longer, the influence on the service is larger, the virtual machine switching operation is not executed, and therefore the influence on the service is reduced.
It can be understood that, in the data migration method provided by the embodiment of the application, the duration of service interruption is shortened at least by reducing the data copy duration after the first virtual machine is powered off, so that the influence on the service is reduced. In some optional embodiments, the duration of the service interruption may be further reduced by further reducing the duration of the shutdown of the first virtual machine or reducing the duration of the startup of the second virtual machine, etc.
In an embodiment of the present application, the method may further include:
S201, if the first disk increment ratio is smaller than a first threshold value and the first copy duration ratio is smaller than a second threshold value, a switching condition is met;
S202, if the first disk increment ratio is greater than or equal to a first threshold value or the first copy duration ratio is greater than or equal to a second threshold value, the switching condition is not satisfied.
In one example of the present application, to further reduce the duration of service interruption during data migration, the impact on the service is reduced, and if the disk increment ratio is smaller than the first threshold and the copy duration ratio is smaller than the second threshold, the virtual machine switching operation is performed, otherwise, the virtual machine switching operation is not performed.
In one possible implementation manner, the first threshold value and/or the second threshold value are set values (for example, preset values, etc.), or the first threshold value and/or the second threshold value are adjusted according to the service importance. That is, in consideration of the possible difference in importance of different services, the first threshold and/or the second threshold may be adjusted according to the importance of the service, for example, the importance of the service may be divided into multiple levels, such as high, medium, and low, if the importance of the service is high, the value range of the first threshold and/or the second threshold may be less than 1% or 1% to 5%, if the importance of the service is high, the value range of the first threshold and/or the second threshold may be 5% to 10%, and if the importance of the service is low, the value range of the first threshold and/or the second threshold may be greater than or equal to 10%, and so on.
It will be appreciated that the determination of whether the switching condition is met based on the first disk increment condition and/or the first disk copy condition is not limited to the examples provided in the embodiments of the present application, and that other manners may be used in alternative embodiments to determine whether the switching condition is met or the switching condition may be changed, which is not limited herein. For example, the first disk delta condition includes a size of the first delta data and/or the first disk copy condition includes a first copy duration. In step S1032, if the first disk increment ratio is smaller than the first threshold, or the first copy length ratio is smaller than the second threshold, the switching condition is satisfied, otherwise, the switching condition is not satisfied. Or if the size of the first increment data is smaller than the increment threshold, the switching condition is met, otherwise, the switching condition is not met. Or if the first copy time length is smaller than the copy time length threshold value, the switching condition is met, otherwise, the switching condition is not met. Or if the size of the first incremental data is smaller than the incremental threshold and the first copying time length is smaller than the copying time length threshold, the switching condition is met, otherwise, the switching condition is not met.
In summary, in the data migration method provided by the embodiment of the application, considering the influence of incremental data and disk information on the duration of service interruption, before the first virtual machine stops running, whether the switching condition is met or not is judged according to the first disk incremental condition and/or the first disk copying condition of the first virtual machine, if the switching condition is met, the duration of service interruption is indicated to be shorter, the influence on the service is lower, the virtual machine switching operation can be executed to meet the requirements of the service on continuity and high availability, if the switching condition is not met, the duration of service interruption is indicated to be longer, the influence on the service is larger, and the virtual machine switching operation is not executed to reduce the influence on the service.
In one possible implementation manner, step S101 may include:
S301, performing full snapshot processing on the first virtual machine to obtain full data of the first virtual machine;
S302, copying the full data to the second virtual machine.
That is, in the embodiment of the present application, in order to improve the efficiency of data copying, the data copying may be performed in a snapshot manner. Specifically, in step S101, during the service migration, when the data is copied for the first time, the data of the first virtual machine may be copied to the second virtual machine in a full snapshot.
Accordingly, in step S102, the first incremental data is the incremental data generated by the first virtual machine during the process of copying the full-volume data.
It can be appreciated that if the first virtual machine does not generate incremental data in the data copying process, the virtual machine switching operation can be performed, that is, after the first virtual machine is powered off, incremental data copying is not required, so that the influence on the service is low.
In one possible implementation manner, as shown in fig. 2, step S103 may include:
S401, stopping running the first virtual machine;
S402, performing incremental snapshot processing on the first virtual machine to obtain incremental data;
S403, copying the increment data to the second virtual machine;
s404, running the second virtual machine.
Specifically, in the case where the switching condition is satisfied, it is explained that the degree of influence of the execution of the virtual machine switching operation on the service is small, and therefore, in step S401, the operation of the first virtual machine, such as the shutdown of the first virtual machine, may be stopped.
In step S402 to step S404, in order to avoid the loss of service data, after the first virtual machine is powered off, incremental snapshot processing is performed on the first virtual machine to obtain incremental data, the incremental data is copied to the second virtual machine, and then the second virtual machine is operated, for example, the second virtual machine is powered on, so that the service is migrated to the second virtual machine to operate, thereby meeting the requirements of the service on continuity and high availability.
In the embodiment of the application, in order to avoid data loss and reduce the service interruption time, the data is copied in an incremental snapshot mode in the switching process of the virtual machine.
Optionally, after the incremental data is copied to the second virtual machine, the performing the virtual machine switching operation may further include: virtual machine image conversion, such as converting data copied to the second virtual machine into a virtual machine image file, or image file format conversion, etc., so that the second virtual machine can continue to run the service.
In one possible implementation manner, as shown in fig. 3, the method may further include:
s501, copying the first increment data to the second virtual machine under the condition that the first disk increment condition and/or the first disk copy condition do not meet a switching condition;
S502, acquiring the size of second incremental data, wherein the second incremental data is data generated by the first virtual machine in the process of copying the first incremental data to the second virtual machine;
S503, determining a second disk increment condition and/or a second disk copy condition of the first virtual machine based on the size of the second increment data and the disk information;
S504, executing virtual machine switching operation under the condition that the second disk increment condition and/or the second disk copy condition meet the switching condition.
In step S501, incremental snapshot processing may be performed on the first virtual machine, to obtain first incremental data, and copy the first incremental data to the second virtual machine. The implementation principles or functions of step S502 to step S504 may refer to step S102 to step S103, which are not described herein.
In the embodiment of the application, if the switching condition is not met, the first incremental data is copied to the second virtual machine, after the copying is completed, whether the switching condition is met is judged again according to the size of the second incremental data and the disk information, if the switching condition is met, the virtual machine switching operation is executed, otherwise, the cycle is executed until the service operated by the first virtual machine is switched to the second virtual machine or the execution of the data migration method is finished.
That is, the delta data may include first delta data, second delta data, third delta data, fourth delta data …. In the service migration process, the first incremental data is data generated by the first virtual machine in a first data copying process (such as full data copying process, etc.), the second incremental data is data generated by the first virtual machine in a second data copying process (such as first incremental data copying process, etc.), the third incremental data is data generated by the first virtual machine in a third data copying process (such as second incremental data copying process, etc.), the fourth incremental data is data generated by the fourth data copying process (such as third incremental data copying process, etc.), … and so on.
After determining the first disk increment condition and/or the second disk copy condition based on the size of the first increment data, in the case that the first disk increment condition and/or the first disk copy condition does not meet the switching condition, virtual machine switching operation is not performed, then the size of the second increment data is obtained, the second disk increment condition and/or the second disk copy condition is determined based on the size of the second increment data, and if the second disk increment condition and/or the second disk copy condition meet the switching condition, virtual machine switching operation is performed, so that service migration is completed. If the second disk increment condition and/or the second disk copy condition do not meet the switching condition, virtual machine switching operation is not executed, the size of third increment data is continuously obtained, the third disk increment condition and/or the third disk copy condition is determined based on the size of the third increment data, and if the third disk increment condition and/or the third disk copy condition meet the switching condition, virtual machine switching operation is executed, and service migration is completed. If the third disk increment condition and/or the third disk copy condition do not meet the switching condition, continuing to acquire the size of the fourth increment data, determining the fourth disk increment condition and/or the fourth disk copy condition based on the size of the fourth increment data, executing the virtual machine switching operation if the fourth disk increment condition and/or the fourth disk copy condition meet the switching condition, completing the service migration, if the fourth disk increment condition and/or the fourth disk copy condition do not meet the switching condition, not executing the virtual machine switching operation, …, and so on.
Optionally, to ensure the reliability of the server, the method may further include: and recording the cycle times, and if the cycle times reach the time threshold, executing virtual machine switching operation or ending executing the data migration method. For example, the number of cycles may be determined based on the number of determinations of the switching condition, or the number of cycles may be determined based on the acquisition or copy number of the incremental data, or the like. The number threshold may be a set value or determined according to the importance of the service, etc. Optionally, if the service importance degree is low, the virtual machine switching operation may be performed to complete service migration if the cycle number reaches the number threshold, and if the service importance degree is high, the data migration method is finished and prompt information is sent to prompt that service migration is incomplete or the cycle number is too high.
Illustratively, as shown in fig. 4, the process flow of migrating the service of the source virtual machine to the target virtual machine by the server includes:
S1, triggering and executing a data migration method, for example, if a data migration request of a user is received, triggering and executing the data migration method;
S2, performing full snapshot copy processing on the source virtual machine to obtain full data;
S3, copying the full data to a target virtual machine;
S4, acquiring the size of the incremental data;
S5, judging whether the switching condition is met according to the size of the incremental data, and if not, executing the step S6; if yes, executing step S7;
s6, copying the incremental data to the target virtual machine, for example, performing incremental snapshot processing on the source virtual machine to obtain the incremental data, copying the incremental data to the target virtual machine, and returning to the step S4;
S7, turning off the source virtual machine;
s8, copying the incremental data to the target virtual machine, for example, performing incremental snapshot processing on the source virtual machine to obtain the incremental data, and copying the incremental data to the target virtual machine;
And S9, starting the target virtual machine to finish service migration.
As shown in fig. 5A, for example, a full amount of data is stored in a storage space of a source virtual machine, when a server triggers to execute the data migration method, a first snapshot process (such as a full amount snapshot process) is performed on the source virtual machine to obtain the full amount of data, the full amount of data is copied to a storage space of a target virtual machine, when the copying of the full amount of data is completed, first incremental data is newly added in the storage space of the source virtual machine, the size of the first incremental data is obtained, and it is determined that a switching condition is not satisfied based on the size of the first incremental data, so that the source virtual machine continues to operate services. Then, as shown in fig. 5B, a second snapshot process (such as incremental snapshot process) is performed on the source virtual machine, so as to obtain first incremental data, the first incremental data is copied to the target virtual machine storage space, when the first incremental data is copied, the second incremental data is newly added in the source virtual machine storage space, the size of the second incremental data is obtained, and if the switching condition is met based on the size of the second incremental data, the source virtual machine is powered off. Then, as shown in fig. 5C, a third snapshot process (such as incremental snapshot process) is performed on the source virtual machine, so as to obtain second incremental data, the second incremental data is copied to the storage space of the target virtual machine, and then the target virtual machine is started up, so as to complete service migration.
For example, in a laboratory, in service migration test on a virtual machine (a disk full of data of 500G is mounted), the service interruption time can be reduced to about 2 minutes and 30 seconds or lower by adopting the scheme of the application.
In summary, the data migration method provided by the embodiment of the application can reduce the duration of service interruption in the data migration process, reduce the influence on the service, and meet the requirements of the service on continuity and high availability.
In another aspect, an embodiment of the present application further provides a data migration system, where the data migration system may include:
The data copying module is used for copying the data of the first virtual machine to the second virtual machine;
The data acquisition module is used for acquiring the size of first incremental data, wherein the first incremental data is data generated by the first virtual machine in the process of data copying;
the determining module is used for determining a first disk increment condition and/or a first disk copy condition of the first virtual machine based on the size of the first increment data and the disk information of the first virtual machine;
The switching module is used for executing virtual machine switching operation under the condition that the first disk increment condition and/or the first disk copy condition meet the switching condition, and the virtual machine switching operation is used for indicating that the service operated by the first virtual machine is switched to the second virtual machine.
According to the data migration system provided by the embodiment of the application, the influence of the incremental data and the disk information on the service interruption time is considered, before the first virtual machine stops running, whether the switching condition is met or not is judged according to the first disk incremental condition and/or the first disk copying condition of the first virtual machine, if the switching condition is met, the service interruption time is short, the influence on the service is low, the virtual machine switching operation can be executed so as to meet the requirements of the service on continuity and high availability, if the switching condition is not met, the service interruption time is long, and the virtual machine switching operation is not executed so as to reduce the influence on the service.
In one possible implementation manner, the disk information includes a disk capacity of the first virtual machine, the first disk increment condition includes a first disk increment ratio, and the determining module is further configured to:
The first disk delta ratio is determined based on the size of the first delta data and the disk capacity.
In the embodiment of the application, the disk increment ratio is used for representing the disk increment condition of the first virtual machine, so that the influence degree of the increment data size generated by the service on the service can be more accurately represented.
In one possible implementation manner, the disk information includes a total disk copy duration of the first virtual machine, a data size of a last data copy, and a duration of the last data copy, the first disk copy condition includes a first copy duration ratio, and the determining module is further configured to:
determining a first copy duration based on the size of the first incremental data and the data size of the last data copy and the duration of the last data copy;
and determining the first copy time length ratio based on the first copy time length and the total disk copy time length.
In the embodiment of the application, the disk copy condition of the first virtual machine is represented by adopting the copy time length ratio, so that the influence degree of the copy time length of the incremental data generated by the service on the service can be more accurately represented.
In one possible implementation manner, the system further includes a judging module, configured to:
if the first disk increment ratio is smaller than the first threshold value and the first copy time length ratio is smaller than the second threshold value, the switching condition is met;
if the first disk increment ratio is greater than or equal to a first threshold, or the first copy length ratio is greater than or equal to a second threshold, the switching condition is not satisfied.
In the embodiment of the application, in order to further reduce the duration of service interruption in the data migration process and reduce the influence on the service, the virtual machine switching operation is executed under the condition that the disk increment ratio is smaller than the first threshold value and the copy duration ratio is smaller than the second threshold value, otherwise, the virtual machine switching operation is not executed.
In one possible implementation manner, the first threshold value and/or the second threshold value are set values, or the first threshold value and/or the second threshold value are adjusted according to the service importance.
In the embodiment of the application, considering that the importance degrees of different services may be different, to adapt to the different services, the first threshold and/or the second threshold may be adjusted according to the importance degrees of the services.
In one possible implementation manner, the data copying module is further configured to:
Performing full snapshot processing on the first virtual machine to obtain full data of the first virtual machine;
copying the full amount of data to the second virtual machine.
In the embodiment of the application, in order to improve the efficiency of data copying, the data copying is performed in a snapshot mode.
In one possible implementation manner, the switching module is further configured to:
Stopping running the first virtual machine;
Performing incremental snapshot processing on the first virtual machine to obtain incremental data;
copying the incremental data to the second virtual machine;
And running the second virtual machine.
In the embodiment of the application, in order to avoid data loss and reduce the service interruption time, the data is copied in an incremental snapshot mode in the switching process of the virtual machine.
In one possible implementation manner, the system is further configured to:
Copying the first increment data to the second virtual machine under the condition that the first disk increment condition and/or the first disk copy condition do not meet the switching condition;
Acquiring the size of second incremental data, wherein the second incremental data is data generated by the first virtual machine in the process of copying the first incremental data to the second virtual machine;
determining a second disk increment condition and/or a second disk copy condition of the first virtual machine based on the size of the second increment data and the disk information;
And executing virtual machine switching operation under the condition that the second disk increment condition and/or the second disk copy condition meet the switching condition.
In the embodiment of the application, if the switching condition is not met, the first incremental data is copied to the second virtual machine, after the copying is completed, whether the switching condition is met is judged again according to the size of the second incremental data and the disk information, if the switching condition is met, the virtual machine switching operation is executed, otherwise, the cycle is executed until the service operated by the first virtual machine is switched to the second virtual machine or the execution of the data migration method is finished.
In one possible implementation manner, the first virtual machine and the second virtual machine are in heterogeneous clusters.
In the embodiment of the application, the data migration method is suitable for virtual machine temperature migration in the heterogeneous cluster, reduces the influence of the virtual machine temperature migration in the heterogeneous cluster on the service, and meets the requirements of the service on continuity and high availability.
The principle or content of the data migration system provided in the embodiment of the present application may refer to the data migration method in the method embodiment shown in fig. 1, and will not be described herein.
As shown in fig. 6, an embodiment of the present application further provides a server 100, including: the data migration system comprises a processor 110 and a memory 120, wherein the processor 110 is connected with the memory 120, the memory 120 stores a computer program, and the data migration method shown in fig. 1 is realized when the processor 110 executes the computer program.
Specifically, the processor 110 of the server 100 may perform the following steps:
copying the data of the first virtual machine to the second virtual machine;
acquiring the size of first incremental data, wherein the first incremental data is data generated by the first virtual machine in the process of data copying;
Determining a first disk increment condition and/or a first disk copy condition of the first virtual machine based on the size of the first increment data and the disk information of the first virtual machine;
And executing virtual machine switching operation under the condition that the first disk increment condition and/or the first disk copy condition meet the switching condition, wherein the virtual machine switching operation is used for indicating switching the service operated by the first virtual machine to the second virtual machine.
In one possible implementation manner, the disk information includes a disk capacity of the first virtual machine, the first disk increment situation includes a first disk increment ratio, and determining, by the processor 110 of the server 100, the first disk increment situation of the first virtual machine based on the size of the first increment data and the disk information includes:
The first disk delta ratio is determined based on the size of the first delta data and the disk capacity.
In one possible implementation manner, the disk information includes a total disk copy duration of the first virtual machine, a data size of a last data copy, and a time duration of the last data copy, the first disk copy condition includes a first copy duration ratio, and determining, by the processor 110 of the server 100, the first disk copy condition of the first virtual machine based on the first incremental data and the disk capacity includes:
determining a first copy duration based on the size of the first incremental data and the data size of the last data copy and the duration of the last data copy;
and determining the first copy time length ratio based on the first copy time length and the total disk copy time length.
In one possible implementation, the processor 110 of the server 100 further performs:
if the first disk increment ratio is smaller than the first threshold value and the first copy time length ratio is smaller than the second threshold value, the switching condition is met;
if the first disk increment ratio is greater than or equal to a first threshold, or the first copy length ratio is greater than or equal to a second threshold, the switching condition is not satisfied.
In one possible implementation manner, the first threshold value and/or the second threshold value are set values, or the first threshold value and/or the second threshold value are adjusted according to the service importance.
In one possible implementation, the processor 110 of the server 100 performs copying the data of the first virtual machine to the second virtual machine, including:
Performing full snapshot processing on the first virtual machine to obtain full data of the first virtual machine;
copying the full amount of data to the second virtual machine.
In one possible implementation manner, the processor 110 of the server 100 performs a virtual machine switching operation, including:
Stopping running the first virtual machine;
Performing incremental snapshot processing on the first virtual machine to obtain incremental data;
copying the incremental data to the second virtual machine;
And running the second virtual machine.
In one possible implementation, the processor 110 of the server 100 further performs:
Copying the first increment data to the second virtual machine under the condition that the first disk increment condition and/or the first disk copy condition do not meet the switching condition;
Acquiring the size of second incremental data, wherein the second incremental data is data generated by the first virtual machine in the process of copying the first incremental data to the second virtual machine;
determining a second disk increment condition and/or a second disk copy condition of the first virtual machine based on the size of the second increment data and the disk information;
And executing virtual machine switching operation under the condition that the second disk increment condition and/or the second disk copy condition meet the switching condition.
In one possible implementation manner, the first virtual machine and the second virtual machine are in heterogeneous clusters.
The server in the embodiment of the present application, such as a rack server, a blade server, a tower server, or a cabinet server or an equipment cabinet that includes a plurality of server nodes, may execute the scheme shown in the embodiment of the present application, and its implementation principle and beneficial effects are similar, and will not be described herein.
The present application provides a readable storage medium having a computer program stored thereon; the computer program is configured to implement the data migration method according to any of the embodiments described above.
Embodiments of the present application provide a computer program product comprising instructions that, when executed, cause a computer to perform the above-described data migration method.
All or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a readable memory. The program, when executed, performs steps including the method embodiments described above; and the aforementioned memory (storage medium) includes: read-only memory (abbreviated as ROM), RAM, flash memory, hard disk, solid state disk, magnetic tape (English: MAGNETIC TAPE), floppy disk (English: floppy disk), optical disk (English: optical disk), and any combination thereof.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processing unit of a general purpose computer, special purpose computer, embedded processor, or other programmable terminal device to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable terminal device to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable terminal device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer implemented process such that the instructions which execute on the computer or other programmable device provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made to the embodiments of the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the embodiments of the present application fall within the scope of the claims and the equivalents thereof, the present application is also intended to include such modifications and variations.
In the present disclosure, the term "include" and variations thereof may refer to non-limiting inclusion; the term "or" and variations thereof may refer to "and/or". The terms "first," "second," and the like, herein, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. In the present application, "a plurality of" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.

Claims (10)

1. A method of data migration, the method comprising:
copying the data of the first virtual machine to the second virtual machine;
acquiring the size of first incremental data, wherein the first incremental data is data generated by the first virtual machine in the process of data copying;
and executing a virtual machine switching operation under the condition that the switching condition is met based on the size of the first incremental data and the disk information of the first virtual machine, wherein the virtual machine switching operation is used for indicating that the service operated by the first virtual machine is switched to the second virtual machine.
2. The method according to claim 1, wherein the performing a virtual machine switching operation for indicating switching traffic running by the first virtual machine to the second virtual machine in a case where it is determined that a switching condition is satisfied based on the size of the first delta data and disk information of the first virtual machine includes:
Determining a first disk increment condition and/or a first disk copy condition of the first virtual machine based on the size of the first increment data and the disk information of the first virtual machine;
And executing virtual machine switching operation under the condition that the first disk increment condition and/or the first disk copy condition of the first virtual machine meet the switching condition, wherein the virtual machine switching operation is used for indicating that the service operated by the first virtual machine is switched to the second virtual machine.
3. The method of claim 1, wherein the disk information comprises a disk capacity of the first virtual machine, the first disk delta case comprises a first disk delta ratio, and wherein determining the first disk delta case for the first virtual machine based on the size of the first delta data and the disk information comprises:
The first disk delta ratio is determined based on the size of the first delta data and the disk capacity.
4. A method according to claim 2 or 3, wherein the disk information includes a total disk copy length of the first virtual machine, a data size of a last data copy, and a time length of a last data copy, the first disk copy condition includes a first copy length ratio, and the determining the first disk copy condition of the first virtual machine based on the first incremental data and the disk capacity includes:
determining a first copy duration based on the size of the first incremental data and the data size of the last data copy and the duration of the last data copy;
and determining the first copy time length ratio based on the first copy time length and the total disk copy time length.
5. The method according to claim 4, wherein the method further comprises:
if the first disk increment ratio is smaller than the first threshold value and the first copy time length ratio is smaller than the second threshold value, the switching condition is met;
if the first disk increment ratio is greater than or equal to a first threshold, or the first copy length ratio is greater than or equal to a second threshold, the switching condition is not satisfied.
6. The method of claim 5, wherein the first threshold and/or the second threshold are set values, or wherein the first threshold and/or the second threshold are adjusted according to traffic importance.
7. The method of any of claims 1 to 6, wherein copying the data of the first virtual machine to the second virtual machine comprises:
Performing full snapshot processing on the first virtual machine to obtain full data of the first virtual machine;
copying the full amount of data to the second virtual machine.
8. The method of any of claims 1 to 7, wherein the virtual machine switching operation comprises:
Stopping running the first virtual machine;
Performing incremental snapshot processing on the first virtual machine to obtain incremental data;
copying the incremental data to the second virtual machine;
And running the second virtual machine.
9. The method according to any one of claims 2 to 8, further comprising:
Copying the first increment data to the second virtual machine under the condition that the first disk increment condition and/or the first disk copy condition do not meet the switching condition;
Acquiring the size of second incremental data, wherein the second incremental data is data generated by the first virtual machine in the process of copying the first incremental data to the second virtual machine;
determining a second disk increment condition and/or a second disk copy condition of the first virtual machine based on the size of the second increment data and the disk information;
And executing virtual machine switching operation under the condition that the second disk increment condition and/or the second disk copy condition meet the switching condition.
10. A server, comprising: a processor and a memory, the processor being connected to the memory, the memory storing a computer program, the processor implementing the method according to any one of claims 1 to 9 when executing the computer program.
CN202311818170.6A 2023-12-27 2023-12-27 Data migration method and server Pending CN117950796A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311818170.6A CN117950796A (en) 2023-12-27 2023-12-27 Data migration method and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311818170.6A CN117950796A (en) 2023-12-27 2023-12-27 Data migration method and server

Publications (1)

Publication Number Publication Date
CN117950796A true CN117950796A (en) 2024-04-30

Family

ID=90795187

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311818170.6A Pending CN117950796A (en) 2023-12-27 2023-12-27 Data migration method and server

Country Status (1)

Country Link
CN (1) CN117950796A (en)

Similar Documents

Publication Publication Date Title
EP3036625B1 (en) Virtual hadoop manager
KR102031471B1 (en) Opportunity resource migration for resource placement optimization
US9935865B2 (en) System and method for detecting and preventing service level agreement violation in a virtualized environment
US9436516B2 (en) Virtual machines management apparatus, virtual machines management method, and computer readable storage medium
EP2480972A1 (en) System and method for synchronizing transient resource usage between virtual machines in a hypervisor environment
JP6123626B2 (en) Process resumption method, process resumption program, and information processing system
US10846079B2 (en) System and method for the dynamic expansion of a cluster with co nodes before upgrade
CN110750336B (en) OpenStack virtual machine memory hot-expanding method
JP7035858B2 (en) Migration management program, migration method and migration system
TW201347459A (en) Management method and system using the same
CN115988218A (en) Virtualized video coding and decoding system, electronic equipment and storage medium
JP2009146161A (en) Virtual machine movement control method
CN112948169A (en) Data backup method, device, equipment and storage medium
US10095533B1 (en) Method and apparatus for monitoring and automatically reserving computer resources for operating an application within a computer environment
EP4006725A1 (en) Virtual machine migration processing and strategy generation method, apparatus and device, and storage medium
CN106325972B (en) Virtual machine management method and network equipment
CN111506388A (en) Container performance detection method, container management platform and computer storage medium
CN117950796A (en) Data migration method and server
JP2010026828A (en) Method for controlling virtual computer
JP5905412B2 (en) Virtual computer system and processor performance measurement method
US10606681B2 (en) Incremental dump with fast reboot
WO2020163117A1 (en) Hosting virtual machines on a secondary storage system
Zhao et al. Software maintenance optimization based on Stackelberg game methods
CN118210441A (en) Disk capacity expansion method, computing device and computing device cluster
CN117873580A (en) Operating system switching method, chip and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination