Data migration method and device, equipment and storage medium

Through parallel migration method and control node management, the problem of low disk migration efficiency of virtual machine in private cloud scenarios is solved, efficient and accurate data migration is achieved, manual intervention is reduced, and migration efficiency is improved.

CN119311202AActive Publication Date: 2025-01-14INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202311365096.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-20
Publication Date
2025-01-14
Estimated Expiration
2043-10-20

AI Technical Summary

Technical Problem

The disk migration efficiency of massive virtual machines in private cloud scenarios is low and the accuracy rate is low. The lack of batch processing methods leads to a large number of manual operations that require a lot of manual operations, which is time-consuming and labor-intensive and prone to causing operational errors.

Method used

By adopting parallel migration method, by obtaining the migration information of the virtual machine, extracting the cloud hard disk information, and migrating the data from the original environment cloud hard disk to the target environment cloud hard disk, using the control node to independently manage the migration process, and supporting concurrent migration of multiple virtual machines , reduce manual intervention.

Benefits of technology

It significantly improves data migration efficiency, reduces manual operations, and improves migration accuracy, especially in the migration of large-capacity virtual machines, which significantly improves the migration efficiency of massive environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311202A_ABST
    Figure CN119311202A_ABST
Patent Text Reader

Abstract

The invention provides a data migration method which can be applied to the technical field of cloud computing. The data migration method comprises the steps of obtaining migration information of a to-be-migrated virtual machine; based on the migration information of the virtual machine, information of at least one cloud hard disk corresponding to the virtual machine is extracted, the information of any cloud hard disk comprises an original environment cloud hard disk and a target environment cloud hard disk which have a mapping relation, the original environment cloud hard disk is located in a first storage cluster, and the target environment cloud hard disk is located in a second storage cluster; the target environment cloud hard disk is in a second storage cluster; data in the original environment cloud hard disk is migrated to the target environment cloud hard disk according to a virtual machine parallel migration mode, and the virtual machine parallel migration mode is a parallel migration mode adopted for different virtual machines. The invention further provides a data migration device and equipment and a storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of cloud computing, and in particular to a data migration method, apparatus, device and storage medium. Background Art

[0002] In the early days of cloud computing environment construction and use, the backend storage corresponding to virtual machines (also called elastic cloud servers) generally used distributed block storage technology, and the hardware often used HDD mechanical hard drives, which are durable, low-cost, and large-capacity. With the continuous development of the times and technology, SSD solid-state drives have gradually occupied the mainstream of the market. They have high performance, compact size, and their prices are gradually becoming the same as mechanical hard drives. Using solid-state drives in new scenarios has become a mainstream choice.

[0003] There are still many storage clusters based on mechanical hard disks in the existing cloud environment. Using solid-state drive storage clusters to replace them can significantly improve the user experience and performance. However, most existing platforms provide cloud hard disk migration functions for single virtual machines, which requires several clicks. For private cloud scenarios in massive environments, there is often no batch processing method, which causes data migration to require a lot of manual operations, which is time-consuming and labor-intensive, prone to operational errors, and low migration efficiency. Summary of the invention

[0004] In view of the above problems, the present disclosure provides a data migration method, apparatus, device, medium and program product for improving data migration efficiency and data migration correctness.

[0005] According to a first aspect of the present disclosure, a data migration method is provided, including: obtaining migration information of a virtual machine to be migrated; based on the migration information of the virtual machine, extracting information of at least one cloud hard disk corresponding to the virtual machine, wherein the information of any of the cloud hard disks includes an original environment cloud hard disk and a target environment cloud hard disk that have a mapping relationship, the original environment cloud hard disk is in a first storage cluster, and the target environment cloud hard disk is in a second storage cluster; and migrating data in the original environment cloud hard disk to the target environment cloud hard disk in a manner of parallel migration of virtual machines, wherein the manner of parallel migration of virtual machines is to adopt a parallel migration manner for different virtual machines.

[0006] According to an embodiment of the present disclosure, the virtual machine includes a first virtual machine, the migration information of the virtual machine includes a first list, a second list and a third list, the first list includes N virtual machine addresses, the second list includes M first mapping relationships, the first mapping relationship includes a mapping relationship between the virtual machine address and the virtual machine identifier, the third list includes L second mapping relationships, the second mapping relationship includes a mapping relationship between the virtual machine identifier and the cloud hard disk data identifier, N, M and L are positive integers, and extracting information of at least one cloud hard disk corresponding to the virtual machine based on the migration information of the virtual machine includes: extracting a preset number of virtual machine addresses in the first list, the virtual machine addresses at least including the first virtual machine address; for the first virtual machine, querying the first virtual machine identifier in the first mapping relationship through the first virtual machine address; and querying the cloud hard disk data identifier through the second mapping relationship based on the first virtual machine identifier.

[0007] According to an embodiment of the present disclosure, the first list, the second list and the third list are stored in the form of static files.

[0008] According to an embodiment of the present disclosure, the cloud hard disk data includes first cloud hard disk data, and migrating the data in the original environment cloud hard disk to the target environment cloud hard disk in a manner of parallel migration of virtual machines includes: for the first virtual machine, verifying the migration status of the first cloud hard disk data; when the migration status of the first cloud hard disk data is migratable, migrating the first cloud hard disk data from the original environment cloud hard disk to the target environment cloud hard disk; and marking the migration status of the first cloud hard disk data as migrating.

[0009] According to an embodiment of the present disclosure, after marking the migration status of the first cloud hard disk data as being in migration, it also includes: cyclically checking the migration result of the first cloud hard disk data according to a preset period; and when the migration result of the first cloud hard disk data is that the migration is completed, marking the migration status of the first cloud hard disk data as migrated.

[0010] According to an embodiment of the present disclosure, the migration of the first cloud hard disk data from the original environment cloud hard disk to the target environment cloud hard disk includes: verifying the cloud hard disk category involved in the first cloud hard disk data; in the case that the first cloud hard disk data involves a system disk, pausing the first virtual machine during the migration process; and when the migration of the first cloud hard disk data is completed, closing the pause of the first virtual machine.

[0011] According to an embodiment of the present disclosure, wherein the cloud hard disk data also includes second cloud hard disk data, migrating the data in the original environment cloud hard disk to the target environment cloud hard disk in accordance with the parallel migration of virtual machines includes: migrating the first cloud hard disk data and the second cloud hard disk data in a serial migration manner.

[0012] According to an embodiment of the present disclosure, the data migration method is applied to a control node, and the control node is independent of the first storage cluster and the second storage cluster.

[0013] A second aspect of the present disclosure provides a data migration device, including: an acquisition module, used to obtain migration information of a virtual machine to be migrated; an extraction module, used to extract information of at least one cloud hard disk corresponding to the virtual machine based on the migration information of the virtual machine, the information of any of the cloud hard disks including an original environment cloud hard disk and a target environment cloud hard disk with a mapping relationship, the original environment cloud hard disk is in a first storage cluster, and the target environment cloud hard disk is in a second storage cluster; and a virtual machine migration module, used to migrate data in the original environment cloud hard disk to the target environment cloud hard disk in a virtual machine parallel migration manner, wherein the virtual machine parallel migration manner is to adopt a parallel migration manner for different virtual machines.

[0014] According to an embodiment of the present disclosure, the virtual machine includes a first virtual machine, the migration information of the virtual machine includes a first list, a second list and a third list, the first list includes N virtual machine addresses, the second list includes M first mapping relationships, the first mapping relationship includes a mapping relationship between the virtual machine address and the virtual machine identifier, the third list includes L second mapping relationships, the second mapping relationship includes a mapping relationship between the virtual machine identifier and the cloud hard disk data identifier, N, M and L are positive integers, the extraction module includes a virtual machine address extraction unit, a virtual machine identifier extraction unit and a cloud hard disk data extraction unit, the virtual machine address extraction unit is used to extract a preset number of virtual machine addresses in the first list, the virtual machine address includes at least the first virtual machine address; the virtual machine identifier extraction unit is used to query the first virtual machine identifier in the first mapping relationship through the first virtual machine address for the first virtual machine; and the cloud hard disk data extraction unit is used to query the cloud hard disk data identifier through the second mapping relationship based on the first virtual machine identifier.

[0015] According to an embodiment of the present disclosure, the first list, the second list and the third list are stored in the form of static files.

[0016] According to an embodiment of the present disclosure, the cloud hard disk data includes first cloud hard disk data, and the virtual machine migration module includes: a migration status verification unit, a migration execution unit and a migration marking unit, the migration status verification unit is used to verify the migration status of the first cloud hard disk data for the first virtual machine; the migration execution unit is used to migrate the first cloud hard disk data from the original environment cloud hard disk to the target environment cloud hard disk when the migration status of the first cloud hard disk data is migratable; and the migration marking unit is used to mark the migration status of the first cloud hard disk data as migrating.

[0017] According to an embodiment of the present disclosure, the virtual machine migration module further includes: a migration result viewing unit, which is used to cyclically view the migration result of the first cloud hard disk data according to a preset period; and a migration marking unit, which is used to mark the migration status of the first cloud hard disk data as migrated when the migration result of the first cloud hard disk data is migration completed.

[0018] According to an embodiment of the present disclosure, the migration execution unit includes a classification subunit, a pause subunit and an enable subunit, the classification subunit is used to verify the cloud hard disk category involved in the first cloud hard disk data; the pause subunit is used to pause the first virtual machine during the migration process when the first cloud hard disk data involves a system disk; and the enable subunit is used to close the pause of the first virtual machine when the migration of the first cloud hard disk data is completed.

[0019] According to an embodiment of the present disclosure, the cloud hard disk data also includes second cloud hard disk data, and the virtual machine migration module is further used to migrate the first cloud hard disk data and the second cloud hard disk data in a serial migration manner.

[0020] According to an embodiment of the present disclosure, the data migration method is applied to a control node, and the control node is independent of the first storage cluster and the second storage cluster.

[0021] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned data migration method.

[0022] The fourth aspect of the present disclosure further provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the above-mentioned data migration method.

[0023] In the embodiments of the present disclosure, in order to solve the technical problems of low efficiency and low accuracy of disk migration of massive virtual machines in private cloud scenarios, multiple virtual machines can be migrated concurrently by migrating data in their own cloud hard disks in parallel, which is significantly improved compared to manual operations. In particular, the migration of large-capacity virtual machines is time-consuming and does not require human supervision, which can improve migration efficiency and significantly improve migration efficiency in massive environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0025] Figure 1A The application scenario diagram of the data migration method according to the embodiment of the present disclosure is schematically shown;

[0026] Figure 1B The schematic diagram schematically shows the architecture of the data migration method according to the embodiment of the present disclosure;

[0027] Figure 2 A flowchart of a data migration method according to an embodiment of the present disclosure is schematically shown;

[0028] Figure 3 A flowchart of a method for extracting a virtual machine cloud hard disk according to an embodiment of the present disclosure is schematically shown;

[0029] Figure 4 A flowchart of a cloud hard disk data migration method according to an embodiment of the present disclosure is schematically shown;

[0030] Figure 5 A full flow chart of a data migration method according to an embodiment of the present disclosure is schematically shown;

[0031] Figure 6 A structural block diagram of a data migration device according to an embodiment of the present disclosure is schematically shown; and

[0032] Figure 7 A block diagram of an electronic device suitable for implementing a data migration method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0033] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0034] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0035] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.

[0036] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0037] In the private cloud scenario, the upgrade of hardware supporting facilities will bring about the migration of the underlying cloud hard disk for the virtual machine. The existing technology only involves the cloud hard disk migration technology of a single virtual machine, which is specifically: the operator manually enters the cloud disk ID to be migrated and the target cloud disk ID for the same virtual machine through query on the cloud platform, and then enters the cloud disk ID to be migrated and the target cloud disk ID on the cloud platform and executes the migration command to ensure the migration of the virtual machine.

[0038] If a large number of virtual machines or the entire cluster needs to be migrated, the amount of operations is huge, and frequent query and copy command results are prone to misoperation. Disks belong to the lower-level virtual hardware, and failures can easily cause the entire business to be unavailable, which is a high risk. The migration process will affect the IO performance of the virtual machine. If a single virtual machine has multiple cloud hard disks, simultaneous migration can easily cause business unavailability. Generally, serial operations are performed to reduce business impact.

[0039] In order to solve the technical problems existing in the prior art, an embodiment of the present disclosure provides a data migration method, including: obtaining migration information of a virtual machine to be migrated; based on the migration information of the virtual machine, extracting information of at least one cloud hard disk corresponding to the virtual machine, wherein the information of any of the cloud hard disks includes an original environment cloud hard disk and a target environment cloud hard disk that have a mapping relationship, the original environment cloud hard disk is in a first storage cluster, and the target environment cloud hard disk is in a second storage cluster; and migrating data in the original environment cloud hard disk to the target environment cloud hard disk in a parallel migration manner of the virtual machines, wherein the parallel migration manner of the virtual machines is to adopt a parallel migration manner for different virtual machines.

[0040] In the embodiments of the present disclosure, in order to solve the technical problems of low efficiency and low accuracy of disk migration of massive virtual machines in private cloud scenarios, multiple virtual machines can be migrated concurrently by migrating data in their own cloud hard disks in parallel, which is significantly improved compared to manual operations. In particular, the migration of large-capacity virtual machines is time-consuming and does not require human supervision, which can improve migration efficiency and significantly improve migration efficiency in massive environments.

[0041] Figure 1A The application scenario diagram of the data migration method according to the embodiment of the present disclosure is schematically shown.

[0042] like Figure 1A As shown, the application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0043] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).

[0044] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0045] The server 105 may be a server that provides various services, such as a background management server (only an example) that provides support for websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0046] It should be noted that the data migration method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the data migration device provided in the embodiment of the present disclosure can generally be set in the server 105. The data migration method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the data migration device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.

[0047] It should be understood that Figure 1A The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0048] Figure 1B The schematic diagram schematically shows an architecture of data migration according to an embodiment of the present disclosure.

[0049] like Figure 1B As shown, the data migration architecture diagram includes a master control node 110, an old storage cluster 120, a new storage cluster 130 and a configuration management system 140, wherein:

[0050] The master control node (CtlSrv) 110 is used for the deployment and execution scheduling of the tool of this method; the old storage cluster (HDD-Ceph) 120 stores the cloud virtual machine data of the environment before migration; the new storage cluster (SSD-Ceph) 130 stores the cloud virtual machine data of the environment after migration; the configuration management system (CMDB) 140 is used to store the configuration data of virtual machines and cloud hard disks.

[0051] According to an embodiment of the present disclosure, the data migration method is applied to a control node (ie, a master control node), and the control node is independent of the first storage cluster and the second storage cluster.

[0052] The following will be based on Figure 1A and Figure 1B The scene described by Figure 2 to Figure 6 The data migration method of the disclosed embodiment is described in detail.

[0053] Figure 2 The flowchart of the data migration method according to the embodiment of the present disclosure is schematically shown.

[0054] like Figure 2 As shown, the data migration method of this embodiment includes operations S210 to S230 . The method can be executed by the server 105 , or the method can be executed by the master control node 110 .

[0055] In operation S210, migration information of the virtual machine to be migrated is obtained.

[0056] It should be noted that in the embodiments of the present disclosure, each virtual machine to be migrated corresponds to one or more cloud hard disks for its underlying support. The cloud hard disks can be divided into system disks (i.e., cloud hard disks involving system data) and non-system disks (i.e., cloud hard disks not involving system data) according to the stored data.

[0057] In a typical scenario, combined with Figure 1B As shown, a plurality of cloud hard disks are configured in the old storage cluster 120. Before the migration, each virtual machine and these cloud hard disks in the old storage cluster 120 have a one-to-one or one-to-many correspondence. Due to the need for business upgrade, it is necessary to migrate the data of the cloud hard disks in the old storage cluster 120 to the new storage cluster 130. Similarly, a plurality of cloud hard disks are also configured in the new storage cluster 130. After the migration is completed, each virtual machine and these cloud hard disks in the new storage cluster 130 have a one-to-one or one-to-many correspondence.

[0058] The migration information of the virtual machine is information used to locate the data in the cloud hard disk involved in the virtual machine, and enables the data in the cloud hard disk to be migrated between different cloud hard disks. In the embodiment of the present disclosure, what needs to be done is to migrate the data in the virtual machine cloud hard disk from the cloud hard disk in the old storage cluster 120 to the cloud hard disk in the new storage cluster 130. In this process, the data in the cloud hard disk can be located through various types of information. Then, from the perspective of the object of maintaining the query entry, the query entry can be various. For example, the virtual machine identifier is used as the query entry to query the data in the corresponding cloud hard disk and the path of the data from one place to another. For another example, the virtual machine address is used as the query entry to query the data in the corresponding cloud hard disk and the path of the data from one place to another.

[0059] In operation S220, based on the migration information of the virtual machine, information of at least one cloud hard disk corresponding to the virtual machine is extracted, wherein the information of any of the cloud hard disks includes an original environment cloud hard disk and a target environment cloud hard disk that have a mapping relationship, the original environment cloud hard disk is in a first storage cluster, and the target environment cloud hard disk is in a second storage cluster.

[0060] Specifically, according to the granularity of each virtual machine, the information of the cloud hard disk corresponding to the virtual machine is extracted. The information of the cloud hard disk at least includes the data of the cloud hard disk and the migration path of the cloud hard disk. The migration path limits the migration of data from a cloud hard disk in a certain original environment to a cloud hard disk in a certain target environment.

[0061] In operation S230, the data in the original environment cloud hard disk is migrated to the target environment cloud hard disk in a virtual machine parallel migration manner, wherein the virtual machine parallel migration manner is to adopt a parallel migration manner for different virtual machines.

[0062] Specifically, the above-mentioned parallel migration refers to the parallel migration between virtual machines, that is, multiple virtual machines can be supported to migrate at the same time, and the migration process of the cloud hard disk data in each virtual machine (the case discussed here is the case where there are multiple cloud hard disks corresponding to the virtual machine) is not limited here and can be parallel or serial.

[0063] In the embodiments of the present disclosure, in order to solve the technical problems of low efficiency and low accuracy of disk migration of massive virtual machines in private cloud scenarios, multiple virtual machines can be migrated concurrently by migrating data in their own cloud hard disks in parallel, which is significantly improved compared to manual operations. In particular, the migration of large-capacity virtual machines is time-consuming and does not require human supervision, which can improve migration efficiency and significantly improve migration efficiency in massive environments.

[0064] It should be noted that the migration information can be varied based on different query entries. The following will use the virtual machine address (or virtual machine IP) as the query entry to explain the cloud disk extraction method in detail, as shown below:

[0065] Figure 3 The flowchart of the method for extracting a virtual machine cloud hard disk according to an embodiment of the present disclosure is schematically shown.

[0066] like Figure 3 As shown, the virtual machine cloud hard disk extraction method of this embodiment includes operations S310 to S330, and operations S310 to S330 can at least partially execute the above-mentioned operation S220.

[0067] According to an embodiment of the present disclosure, the virtual machine includes a first virtual machine, the migration information of the virtual machine includes a first list, a second list and a third list, the first list includes N virtual machine addresses, the second list includes M first mapping relationships, the first mapping relationship includes a mapping relationship between the virtual machine address and the virtual machine identifier, the third list includes L second mapping relationships, the second mapping relationship includes a mapping relationship between the virtual machine identifier and the cloud hard disk data identifier, and N, M and L are positive integers.

[0068] Among them, the first list stores the addresses of virtual machines to be migrated, the second list stores the first mapping relationship between the virtual machine addresses and the virtual machine identifiers, and the third list stores the mapping relationship between the virtual machine identifiers and the cloud hard disk data identifiers. Among them, the first mapping relationship can be a one-to-one correspondence between the virtual machine address and the virtual machine identifier, the first mapping relationship can also be a non-one-to-one correspondence between the virtual machine address and the virtual machine identifier, the second mapping relationship can be a one-to-one relationship between the virtual machine identifier and the cloud hard disk data identifier, and the second mapping relationship can also be a one-to-many relationship between the virtual machine identifier and the cloud hard disk data identifier.

[0069] In operation S310, a preset number of virtual machine addresses are extracted from the first list, where the virtual machine addresses at least include a first virtual machine address.

[0070] Specifically, extracting a preset number of virtual machine addresses in a batch can ensure that virtual machines corresponding to the preset number of virtual machine addresses can perform concurrent migration work.

[0071] In operation S320, for the first virtual machine, a first virtual machine identifier in the first mapping relationship is queried through the first virtual machine address.

[0072] In operation S330, based on the first virtual machine identifier, the cloud hard disk data identifier is queried through the second mapping relationship.

[0073] The first mapping relationship comes from the second list, and the second mapping relationship comes from the third list.

[0074] Specifically, for a certain virtual machine, the identifier is queried through the address of the virtual machine, and then the cloud hard disk data identifier is queried through the identifier to locate the data related to the virtual machine, and then the migration is implemented.

[0075] In the embodiments of the present disclosure, only the list of migrated IP addresses needs to be maintained and managed. There is no need to pay attention to the underlying virtual machine ID and hard disk information. No professional skills background is required. The parameters of the migration process can be automatically acquired and transmitted without human intervention, which improves the convenience of tool execution.

[0076] According to an embodiment of the present disclosure, the first list, the second list and the third list are stored in the form of static files.

[0077] In the embodiment of the present disclosure, in order to improve query efficiency, this information is output as a static file before initial execution to improve retrieval efficiency.

[0078] Figure 4 The flowchart of the cloud hard disk data migration method according to an embodiment of the present disclosure is schematically shown.

[0079] like Figure 4 As shown, the cloud hard disk data migration method of this embodiment includes operations S410 to S450, and operations S410 to S450 can at least partially perform the above-mentioned operation S220.

[0080] According to an embodiment of the present disclosure, the cloud hard disk data includes first cloud hard disk data.

[0081] In operation S410, for the first virtual machine, the migration status of the first cloud hard disk data is checked.

[0082] In operation S420, when the migration status of the first cloud hard disk data is migratable, the first cloud hard disk data is migrated from the original environment cloud hard disk to the target environment cloud hard disk.

[0083] Specifically, checking the migration status of the first cloud hard disk data is achieved through the above-mentioned third list. In the third list, the migration status bit is reserved for the cloud hard disk data identifier. Whenever the corresponding cloud hard disk data is migrating or has completed migration, the migration status bit is modified in a targeted manner to facilitate the control node to manage each migration.

[0084] According to an embodiment of the present disclosure, the migration of the first cloud hard disk data from the original environment cloud hard disk to the target environment cloud hard disk includes: verifying the cloud hard disk category involved in the first cloud hard disk data; in the case that the first cloud hard disk data involves a system disk, pausing the first virtual machine during the migration process; and when the migration of the first cloud hard disk data is completed, closing the pause of the first virtual machine.

[0085] Specifically, during the migration process, it is necessary to verify the categories involved in the cloud hard disk. If a system disk is involved, the current virtual machine needs to be paused, and the pause needs to be closed after the migration of the corresponding cloud hard disk is completed.

[0086] In operation S430, the migration status of the first cloud hard disk data is marked as being migrated.

[0087] In operation S440, the migration result of the first cloud hard disk data is checked cyclically according to a preset period.

[0088] In operation S450, when the migration result of the first cloud hard disk data is migration completed, the migration status of the first cloud hard disk data is marked as migrated.

[0089] Specifically, the logic of checking the migration status in the third list periodically is set, and when the migration status is in migration, the migration status is continuously checked, and after the migration is completed, the migration status in the third list is set to migrated.

[0090] According to an embodiment of the present disclosure, wherein the cloud hard disk data also includes second cloud hard disk data, migrating the data in the original environment cloud hard disk to the target environment cloud hard disk in accordance with the parallel migration of virtual machines includes: migrating the first cloud hard disk data and the second cloud hard disk data in a serial migration manner.

[0091] Specifically, for different cloud hard disks under the same virtual machine, the migration process can be set to be executed serially to ensure that only one cloud hard disk is in the migration state at the same time. It is understandable that the migration process will affect the input and output performance of the virtual machine. If a single virtual machine has multiple cloud hard disks, then performing parallel migration on these multiple cloud hard disks will easily cause the business running in the virtual machine to be unavailable. Therefore, serial operation will be used to reduce the impact on existing business.

[0092] Figure 5 The full flow chart of a data migration method according to an embodiment of the present disclosure is schematically shown.

[0093] like Figure 5 As shown, the data migration method of this embodiment includes operations S501 to S512.

[0094] In operation S501, a virtual machine IP list file to be migrated is constructed, the file name is ip.list, and each line stores an IP address to be migrated.

[0095] In operation S502, information of a list of all virtual machines in the cloud environment is generated, nova list --all_te>nova.list, and a nova.list file is generated as a basis for obtaining the virtual machine ID through the IP.

[0096] In operation S503, information of a cloud hard disk list of the cloud environment is generated, cinder list --all_te>cinder.list, and a cinder.list file is generated as a basis for obtaining a cloud hard disk id through a virtual machine id.

[0097] In operation S504, the ip.list file is read line by line using a for or while loop method, and an IP address is obtained each time and passed to the parameter $ip.

[0098] In operation S505, according to $ip, cat nova.list|grep -w Sip|awk'{print$2}' is used to query the virtual machine id and pass it to the parameter $vmid.

[0099] In operation S506, nova show$vmid is used to query the cloud hard disk corresponding to the virtual machine according to $vmid. There may be one or more cloud hard disks. As parameter $vmDiskStr, the string consists of multiple $vmDisk parameters separated by commas. $vmDisk can be obtained one by one through parsing as the input parameter of subsequent commands.

[0100] In operation S507, the first cloud hard disk $vmDisk is selected to determine whether it is a system disk. If it is a system disk, nova pause$vmid is executed to pause the virtual machine. If it is a data disk, this command does not need to be executed.

[0101] In operation S508 , the first cloud hard disk is migrated, and cinder retype$vmDisk$new cluster ID--migration-policy on-demand.

[0102] In operation S509, the nova.list list is modified to mark the migration status of the virtual machine $ip as being in migration.

[0103] In operation S510, the status of the disk $vmDisk is checked cyclically. If it is in migration, it is checked again after five minutes. If it is in a normal state after the migration is completed, the row corresponding to $ip in the nova.list list is marked as migratable.

[0104] In operation S511, the cinder.list list is modified to mark the migration status of the cloud hard disk $vmDisk as migrated.

[0105] In operation S512, if the migration hard disk is a system disk, nova unpause$vmid is executed to unpause the virtual machine.

[0106] Repeat the above operations S508 to S512 until all cloud hard disks of the virtual machine are migrated. It is understandable that different virtual machines can perform the above operations at the same time. According to the overall performance of the storage cluster, the number of virtual machines that perform migration operations at the same time can be controlled by limiting the concurrency parameters, thereby realizing the concurrent migration of multiple virtual machines.

[0107] Based on the above method, the present disclosure also provides a data migration device. Figure 6 The device is described in detail.

[0108] Figure 6 The structural block diagram of the data migration device according to the embodiment of the present disclosure is schematically shown.

[0109] like Figure 6As shown, the data migration device 600 of this embodiment includes an acquisition module 610 , an extraction module 620 and a virtual machine migration module 630 .

[0110] The acquisition module 610 is used to acquire the migration information of the virtual machine to be migrated. In one embodiment, the acquisition module 610 can be used to perform the operation S210 described above, which will not be described in detail here.

[0111] The extraction module 620 is used to extract information of at least one cloud hard disk corresponding to the virtual machine based on the migration information of the virtual machine, wherein the information of any of the cloud hard disks includes an original environment cloud hard disk and a target environment cloud hard disk that have a mapping relationship, the original environment cloud hard disk is in a first storage cluster, and the target environment cloud hard disk is in a second storage cluster. In one embodiment, the extraction module 620 can be used to perform the operation S220 described above, which will not be repeated here.

[0112] The virtual machine migration module 630 is used to migrate the data in the original environment cloud hard disk to the target environment cloud hard disk in a virtual machine parallel migration manner, wherein the virtual machine parallel migration manner is to adopt a parallel migration manner for different virtual machines. In one embodiment, the virtual machine migration module 630 can be used to perform the operation S230 described above, which will not be repeated here.

[0113] In the embodiments of the present disclosure, in order to solve the technical problems of low efficiency and low accuracy of disk migration of massive virtual machines in private cloud scenarios, multiple virtual machines can be migrated concurrently by migrating data in their own cloud hard disks in parallel, which is significantly improved compared to manual operations. In particular, the migration of large-capacity virtual machines is time-consuming and does not require human supervision, which can improve migration efficiency and significantly improve migration efficiency in massive environments.

[0114] According to an embodiment of the present disclosure, the virtual machine includes a first virtual machine, the migration information of the virtual machine includes a first list, a second list and a third list, the first list includes N virtual machine addresses, the second list includes M first mapping relationships, the first mapping relationship includes a mapping relationship between the virtual machine address and the virtual machine identifier, the third list includes L second mapping relationships, the second mapping relationship includes a mapping relationship between the virtual machine identifier and the cloud hard disk data identifier, N, M and L are positive integers, the extraction module includes a virtual machine address extraction unit, a virtual machine identifier extraction unit and a cloud hard disk data extraction unit, the virtual machine address extraction unit is used to extract a preset number of virtual machine addresses in the first list, the virtual machine address includes at least the first virtual machine address; the virtual machine identifier extraction unit is used to query the first virtual machine identifier in the first mapping relationship through the first virtual machine address for the first virtual machine; and the cloud hard disk data extraction unit is used to query the cloud hard disk data identifier through the second mapping relationship based on the first virtual machine identifier.

[0115] According to an embodiment of the present disclosure, the first list, the second list and the third list are stored in the form of static files.

[0116] According to an embodiment of the present disclosure, the cloud hard disk data includes first cloud hard disk data, and the virtual machine migration module includes: a migration status verification unit, a migration execution unit and a migration marking unit, the migration status verification unit is used to verify the migration status of the first cloud hard disk data for the first virtual machine; the migration execution unit is used to migrate the first cloud hard disk data from the original environment cloud hard disk to the target environment cloud hard disk when the migration status of the first cloud hard disk data is migratable; and the migration marking unit is used to mark the migration status of the first cloud hard disk data as migrating.

[0117] According to an embodiment of the present disclosure, the virtual machine migration module further includes: a migration result viewing unit, which is used to cyclically view the migration result of the first cloud hard disk data according to a preset period; and a migration marking unit, which is used to mark the migration status of the first cloud hard disk data as migrated when the migration result of the first cloud hard disk data is migration completed.

[0118] According to an embodiment of the present disclosure, the migration execution unit includes a classification subunit, a pause subunit and an enable subunit, the classification subunit is used to verify the cloud hard disk category involved in the first cloud hard disk data; the pause subunit is used to pause the first virtual machine during the migration process when the first cloud hard disk data involves a system disk; and the enable subunit is used to close the pause of the first virtual machine when the migration of the first cloud hard disk data is completed.

[0119] According to an embodiment of the present disclosure, the cloud hard disk data also includes second cloud hard disk data, and the virtual machine migration module is further used to migrate the first cloud hard disk data and the second cloud hard disk data in a serial migration manner.

[0120] According to an embodiment of the present disclosure, the data migration method is applied to a control node, and the control node is independent of the first storage cluster and the second storage cluster.

[0121] According to an embodiment of the present disclosure, any multiple modules among the acquisition module 610, the extraction module 620 and the virtual machine migration module 630 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the acquisition module 610, the extraction module 620 and the virtual machine migration module 630 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation modes of software, hardware and firmware or in any appropriate combination of any of them. Alternatively, at least one of the acquisition module 610, the extraction module 620 and the virtual machine migration module 630 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be performed.

[0122] Figure 7 A block diagram of an electronic device suitable for implementing a data migration method according to an embodiment of the present disclosure is schematically shown.

[0123] like Figure 7As shown, the electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include an onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0124] In RAM 703, various programs and data required for the operation of electronic device 700 are stored. Processor 701, ROM 702 and RAM 703 are connected to each other via bus 704. Processor 701 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 702 and / or RAM 703. It should be noted that the program can also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.

[0125] According to an embodiment of the present disclosure, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to the bus 704. The electronic device 700 may further include one or more of the following components connected to the I / O interface 705: an input portion 706 including a keyboard, a mouse, etc.; an output portion 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 708 including a hard disk, etc.; and a communication portion 709 including a network interface card such as a LAN card, a modem, etc. The communication portion 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage portion 708 as needed.

[0126] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0127] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 702 and / or RAM 703 described above and / or one or more memories other than ROM 702 and RAM 703.

[0128] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the item recommendation method provided by the embodiment of the present disclosure.

[0129] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 701. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0130] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 709, and / or installed from the removable medium 711. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0131] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.

[0132] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).

[0133] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0134] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0135] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A data migration method, comprising: Obtain migration information of the virtual machine to be migrated; Based on the migration information of the virtual machine, extract information of at least one cloud hard disk corresponding to the virtual machine, wherein the information of any of the cloud hard disks includes an original environment cloud hard disk and a target environment cloud hard disk that have a mapping relationship, the original environment cloud hard disk is in a first storage cluster, and the target environment cloud hard disk is in a second storage cluster; and According to the virtual machine parallel migration method, the data in the original environment cloud hard disk is migrated to the target environment cloud hard disk, wherein the virtual machine parallel migration method is to adopt a parallel migration method for different virtual machines.

2. The method according to claim 1, wherein: The virtual machine includes a first virtual machine, the migration information of the virtual machine includes a first list, a second list and a third list, the first list includes N virtual machine addresses, the second list includes M first mapping relationships, the first mapping relationship includes a mapping relationship between the virtual machine address and a virtual machine identifier, the third list includes L second mapping relationships, the second mapping relationship includes a mapping relationship between the virtual machine identifier and a cloud hard disk data identifier, N, M and L are positive integers, The extracting, based on the migration information of the virtual machine, information of at least one cloud hard disk corresponding to the virtual machine includes: Extracting a preset number of virtual machine addresses from the first list, wherein the virtual machine addresses at least include a first virtual machine address; For the first virtual machine, query the first virtual machine identifier in the first mapping relationship through the first virtual machine address; and Based on the first virtual machine identifier, the cloud hard disk data identifier is queried through the second mapping relationship.

3. The method according to claim 2, wherein: The first list, the second list and the third list are stored in the form of static files.

4. The method according to claim 2, wherein: The cloud hard disk data includes first cloud hard disk data, The migrating the data in the original environment cloud hard disk to the target environment cloud hard disk in a manner of parallel migration of virtual machines includes: For the first virtual machine, verify the migration status of the first cloud hard disk data; When the migration status of the first cloud hard disk data is migratable, migrating the first cloud hard disk data from the original environment cloud hard disk to the target environment cloud hard disk; and The migration status of the first cloud hard disk data is marked as migrating.

5. The method according to claim 4, wherein: After marking the migration status of the first cloud hard disk data as being migrated, the method further includes: cyclically checking the migration result of the first cloud hard disk data according to a preset period; and When the migration result of the first cloud hard disk data is migration completion, the migration status of the first cloud hard disk data is marked as migrated.

6. The method according to claim 4, wherein: The step of migrating the first cloud hard disk data from the original environment cloud hard disk to the target environment cloud hard disk includes: Verifying the cloud hard disk category involved in the first cloud hard disk data; If the first cloud hard disk data involves a system disk, pausing the first virtual machine during the migration process; and When the data migration of the first cloud hard disk is completed, the pause of the first virtual machine is closed.

7. The method according to claim 4, wherein: The cloud hard disk data also includes second cloud hard disk data, The migrating the data in the original environment cloud hard disk to the target environment cloud hard disk in a manner of parallel migration of virtual machines includes: The first cloud hard disk data and the second cloud hard disk data are migrated in a serial migration manner.

8. The method according to any one of claims 1 to 7, wherein: The data migration method is applied to a control node, and the control node is independent of the first storage cluster and the second storage cluster.

9. A data migration device, comprising: An acquisition module, used to acquire migration information of the virtual machine to be migrated; An extraction module, configured to extract information of at least one cloud hard disk corresponding to the virtual machine based on the migration information of the virtual machine, wherein the information of any of the cloud hard disks includes an original environment cloud hard disk and a target environment cloud hard disk that have a mapping relationship, wherein the original environment cloud hard disk is in a first storage cluster, and the target environment cloud hard disk is in a second storage cluster; as well as The virtual machine migration module is used to migrate the data in the original environment cloud hard disk to the target environment cloud hard disk in a virtual machine parallel migration manner, wherein the virtual machine parallel migration manner is to adopt a parallel migration manner for different virtual machines.

10. An electronic device, comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors are enabled to execute the method according to any one of claims 1 to 8.

11. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Virtual machine migration method and device

    CN107870802A

  • Virtual machine migration method and system, storage medium and equipment

    CN113590258A

  • Virtual machine control method and device of cloud operating system and storage medium

    CN113900774A

  • Heterogeneous cluster virtual machine migration method and system and cloud platform

    CN114675938A

  • Cross-cloud platform application migration system and method and disaster recovery method

    CN114691290A