A method for migrating virtual machines between virtual private clouds

Automatically match and directly copy virtual machine images through cloud platform and storage network, solving the problems of permission sharing and public storage use in virtual machine migration, improving security and performance, and realizing an easy-to-use virtual machine migration process.

CN112486628BActive Publication Date: 2024-12-20HUNAN KYLIN XINAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011311714.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-20
Publication Date
2024-12-20
Estimated Expiration
2040-11-20

AI Technical Summary

Technical Problem

The prior art requires users to share permissions and use public storage during virtual machine migration, which has high security and cost problems. Especially when migrating virtual machines between different departments, it may violate password management regulations and increase copy costs.

Method used

The cloud platform handles migration between virtual machine users, and adopts methods such as cloud platform user application, virtual machine user application, and automatic matching of cloud platform, and copy or move virtual machine image files between cloud platform storage networks to avoid using public Storage, ensuring security and performance.

Benefits of technology

It realizes virtual machine migration between different virtual private clouds in the same cloud platform environment, improves security and performance, avoids the exposure and copying costs of virtual machines in public areas, and makes the operation process easy to understand.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112486628B_ABST
    Figure CN112486628B_ABST
Patent Text Reader

Abstract

The present invention proposes a virtual machine migration method and system between virtual private clouds. The cloud platform processes the virtual machine migration between virtual machine users, including: obtaining the information of the migration application and the user A of the migration-out virtual private cloud, and saving the information of user A and the information of the migration application to the migration-out table; obtaining the information of the migration application and the user B of the migration-in virtual private cloud, matching the information of user B and the information of the migration application to the migration-out table, and if there is a matching result, entering the next step, otherwise sending a matching failure message to user B and ending; saving the image file IMG and specification information S of the virtual machine to be migrated from the migration-out virtual private cloud to the corresponding directory of the migration-in virtual private cloud through the cloud platform storage network, deleting the matched entries in the migration-out table, and sending a migration success message to user A and user B. The present invention does not require user sharing authority and does not use public storage inside and outside the cloud platform, and has security, high performance and ease of use.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a virtual machine and image migration method in a cloud computing environment, and in particular to a virtual machine migration method between virtual private clouds. Background Art

[0002] Virtual machine migration is a basic function of the cloud platform. It refers to moving a virtual machine or host from a source storage location or computing environment to a destination storage location or computing environment, and allowing it to run normally in the destination computing environment. According to different application scenarios, virtual machine migration is divided into many types. For example, according to the type of virtual machine and physical machine, it can be divided into virtual machine to physical machine migration, physical machine to virtual machine migration, and virtual machine to virtual machine migration; according to whether the virtual machine is migrated while it is running, it can be divided into hot migration and cold migration; according to the source and destination of the migration, it can be divided into migration between hosts on the same cloud platform, migration between different virtual private clouds on the same cloud platform, migration between different regions on the same cloud platform, and migration between different cloud platforms. It can also be further divided into migration between the same user account and migration between different user accounts according to whether the user accounts used before and after the migration are the same; from the perspective of system availability, it can be divided into maintenance migration, fault migration, etc.

[0003] In cloud platforms such as public clouds and large private clouds, virtual private clouds (VPC) can be used to isolate user resources. Cloud platforms provide users with a secure and independent virtual private network by creating VPC. Users can configure private network functions such as IP address ranges, subnets, and security groups by themselves. Cloud platform users are also called tenants in some occasions. Cloud platform users can log in to the web console to create multiple virtual machines in VPC. The user or owner of each virtual machine is called a virtual machine user. For ease of use, cloud platforms can also provide web console self-service for virtual machine users, forming a three-level management form: virtual machine user self-service, cloud platform user management and allocation of VPC network, storage and computing resources within the tenant, and cloud platform administrator allocation and coordination management of global resources. Cloud platform products provide virtual machine migration function modules or migration tools. Virtual machine migration can be performed between VPCs of different user accounts on the same cloud platform. Different cloud platforms can also use tools provided by manufacturers to migrate virtual machines between VPCs of their respective cloud platform users. These functional modules or tools generally require the user to have access rights of the two cloud platform users before and after the migration, such as user name and password; or first use the cloud platform user account of the VPC where the source virtual machine is located to copy the virtual machine image file to public storage, and then use the destination VPC user account to copy the virtual machine image file from public storage to the destination VPC, and the cloud platform user of the destination VPC will rebuild the virtual machine.

[0004] When a company uses a cloud platform, the cloud platform creates cloud platform users and corresponding VPCs for each department or subsidiary of the company. Department personnel are assigned to use virtual machines in the department VPC as virtual machine users. When a person is transferred between different departments and the virtual machine used by the person has application software specific to the user installed, and the user himself or the management system requires the virtual machine to migrate with the person, if the cloud platform users corresponding to the two departments exchange usernames and passwords, it may violate the password management regulations. If the virtual machine image is copied to public storage first and then copied into the destination VPC, the virtual machine will be exposed to the public area and the copying cost will increase. Summary of the invention

[0005] The technical problem to be solved by the present invention is: in response to the technical problems existing in the prior art, the present invention provides a method for migrating virtual machines between virtual private clouds, which does not require user sharing permissions and does not use public storage within or outside the cloud platform. The operation process is safe, high-performance and easy to use.

[0006] In order to solve the above technical problems, the technical solution proposed by the present invention is:

[0007] A method for virtual machine migration between virtual private clouds, wherein a cloud platform processes virtual machine migration between virtual machine users, comprising the following steps:

[0008] S1) obtaining the information of the migration application and the migration-end virtual private cloud user A, and saving the information of user A and the migration application to the to-be-migrated table, wherein the migration application information includes the migration destination user information set by user A and the to-be-migrated virtual machine;

[0009] S2) Obtain the migration application and the information of the migration-end virtual private cloud user B, match the information of user B and the migration application information with the table to be migrated out, wherein the migration application information includes the migration source user information set by user B and the virtual machine to be migrated, and if there is a match result, proceed to the next step, otherwise, send a match failure message to user B and end;

[0010] S3) The image file IMG and specification information S of the virtual machine to be migrated are saved from the virtual private cloud at the migration end to the corresponding directory of the virtual private cloud at the migration end through the cloud platform storage network, the matched entries in the table to be migrated are deleted, and a message of successful migration is sent to user A and user B.

[0011] Furthermore, before step S1), the step of generating outgoing application information and incoming application information is also included, which specifically includes:

[0012] A1) User A logs in to the web console of the virtual private cloud at the migration end, selects the virtual machine to be migrated and the migration destination user, and the cloud platform determines whether the virtual machine is running. If so, it shuts down the virtual machine and proceeds to the next step, otherwise it directly proceeds to the next step;

[0013] A2) The cloud platform searches the database to obtain the image file IMG and specification information S of the virtual machine to be migrated, generates a migration application based on the virtual machine to be migrated, the migration destination user, the image file IMG and the specification information S, and releases the resources occupied by the virtual machine to be migrated in the virtual private cloud at the migration end;

[0014] A3) User B logs in to the web console of the virtual private cloud at the migration end, selects the virtual machine to be migrated and the source user, and the cloud platform generates a migration application based on the virtual machine to be migrated and the source user.

[0015] Furthermore, before step A1), the step of the virtual machine user of the virtual private cloud submitting an application to the corresponding virtual private cloud user is also included, specifically including: the virtual machine user U1 of the virtual private cloud at the migrating end submits a migration application to the virtual private cloud user A at the migrating end through the self-service portal of the virtual machine, and the migration application includes the virtual machine to be migrated and the migration destination user information; the virtual machine user U2 of the virtual private cloud at the migrating end submits a migration application to the virtual private cloud user B at the migrating end through the self-service portal of the virtual machine, and the migration application includes the virtual machine to be migrated and the migration source user information.

[0016] Furthermore, after step S3), the step of generating a migrated virtual machine is also included, which specifically includes:

[0017] B1) User B logs in to the VPC at the destination and proceeds to the next step after receiving a message indicating successful migration.

[0018] B2) The virtual private cloud at the migration end reads the specification information S to allocate resources to the virtual machine;

[0019] B3) The migration-end virtual private cloud loads the image file IMG and starts the virtual machine with the allocated resources.

[0020] Further, step B2) specifically includes: the virtual private cloud at the migration end reads the specification information S, the user at the migration end modifies the information in the specification information S to obtain the specification information S1, and the virtual private cloud at the migration end allocates resources to the virtual machine according to the specification information S1.

[0021] Furthermore, before step S3) there is also a step of cloud platform administrator approval, specifically including: generating items to be approved and sending them to the cloud platform administrator, waiting for approval, if approval is received, proceeding to the next step, if the waiting timeout or approval is rejected, ending and exiting.

[0022] The present invention also proposes a virtual machine migration system between virtual private clouds, including a cloud platform, wherein the cloud platform includes a cloud platform migration module;

[0023] The cloud platform migration module is used to obtain the migration application and the information of the virtual private cloud user A at the migration end, and save the information of user A and the migration application to the table to be migrated, wherein the information of the migration application includes the migration destination user information set by user A and the virtual machine to be migrated;

[0024] The cloud platform migration module is also used to obtain the migration application and the information of the migration-end virtual private cloud user B, and match the information of user B and the information of the migration application with the table to be migrated out. The information of the migration application includes the migration source user information set by user B and the virtual machine to be migrated. If there is a match result, the next step is entered, otherwise a match failure message is sent to user B and the end is completed;

[0025] The cloud platform migration module is also used to save the image file IMG and specification information S of the virtual machine to be migrated from the migrating end virtual private cloud to the corresponding directory of the migrating end virtual private cloud, delete the matched entries in the to-be-migrated table, and send a message of successful migration to user A and user B.

[0026] Compared with the prior art, the advantages of the present invention are:

[0027] The present invention can migrate virtual machines between different virtual private clouds in the same cloud platform environment. Cloud platform users belonging to different virtual private clouds do not need to know each other's passwords or have each other's access rights, which can improve security. During migration, there is no need to transfer virtual machine image files through public storage, which can improve security. Migration can be directly copied or moved between cloud platform user directories through the cloud platform storage network, which can improve performance. Migration adopts a method in which cloud platform users of both parties apply, virtual machine users apply, and cloud platforms automatically match. The operation process is easy to understand, which can improve usability. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 A schematic diagram showing the overall steps of the method of the present invention.

[0029] Figure 2 It represents the flow chart of virtual machine migration out and migration in application in the present invention.

[0030] Figure 3 A flow chart of processing a move-out application in the present invention is shown.

[0031] Figure 4 A flow chart showing the process of processing a migration application in the present invention.

[0032] Figure 5 It represents the flow chart of rebuilding the migrated virtual machine in the present invention.

[0033] Figure 6 It represents a flow chart of a virtual machine user applying for migration in the present invention.

[0034] Figure 7 It represents a flow chart of cloud platform user processing after a virtual machine user applies for migration in the present invention. DETAILED DESCRIPTION

[0035] The present invention is further described below in conjunction with the accompanying drawings and specific preferred embodiments, but the protection scope of the present invention is not limited thereby.

[0036] A cloud platform has two cloud platform users A and B. User A's virtual private cloud is VPCA, and user B's virtual private cloud is VPCB. User A creates a virtual machine M in VPCA. The virtual machine user of virtual machine M is U1, and the virtual machine image file of virtual machine M is IMG. The specification information of M is S. The specification information S includes virtual machine specification information such as the number of vCPUs allocated to the virtual machine, memory size, network parameters, storage parameters, etc. A migration method is needed to migrate virtual machine M from VPCA to VPCB for operation.

[0037] Embodiment 1

[0038] like Figure 1 , Figure 3 and Figure 4 As shown, the present invention proposes a method for virtual machine migration between virtual private clouds, and the cloud platform processes virtual machine migration between virtual machine users, including the following steps:

[0039] S1) Figure 3 As shown, the migration application and the information of the migration-end virtual private cloud user A are obtained, and the information of user A and the migration application are saved in the to-be-migrated table. The migration application information includes the migration destination user information set by user A and the to-be-migrated virtual machine, which is the virtual machine M mentioned above, and also includes the image file IMG and specification information S;

[0040] S2) Figure 4 As shown, the migration application and the information of user B of the migration-end virtual private cloud are obtained, and the information of user B and the information of the migration application are matched with the table to be migrated out. The information of the migration application includes the migration source user information and the virtual machine to be migrated in set by user B, that is, it is determined whether the information of user A and the information of the migration application are the same as the information of user B and the information of the migration application. Considering the operation error, the migration destination user information and the virtual machine to be migrated out set by user A and the virtual machine to be migrated in set by user B may be different, and the migration source user information set by user B may also be different from that of user A. If there is a matching result, the next step is entered, otherwise a matching failure message is sent to user B and the process ends;

[0041] S3) The image file IMG and specification information S of the virtual machine to be migrated are saved from the virtual private cloud at the migration end to the corresponding directory of the virtual private cloud at the migration end through the cloud platform storage network, the matched entries in the table to be migrated are deleted, and a message of successful migration is sent to user A and user B.

[0042] Through the above steps, in this embodiment, virtual private clouds of different users in the same cloud platform migrate virtual machines by users applying for migration in and out respectively and the cloud platform automatically matching. The virtual private cloud users at the migration-out end or the migration-in end do not need to have each other's permissions and do not need to use intermediate public storage space.

[0043] Corresponding to the above method, this embodiment proposes a virtual machine migration system between virtual private clouds, including a cloud platform, wherein the cloud platform includes a cloud platform migration module, which supports a user's virtual machine migration application, migration application, matching of migration application, migration application and approval of whether to perform migration after successful matching, and copying or moving of virtual machine images between different user directories;

[0044] The cloud platform migration module is used to obtain the migration application and the information of the virtual private cloud user A at the migration end, and save the information of user A and the migration application to the table to be migrated, wherein the information of the migration application includes the migration destination user information set by user A and the virtual machine to be migrated;

[0045] The cloud platform migration module is also used to obtain the migration application and the information of the migration-end virtual private cloud user B, and match the information of user B and the information of the migration application with the table to be migrated out. The information of the migration application includes the migration source user information set by user B and the virtual machine to be migrated. If there is a match result, the next step is entered, otherwise a match failure message is sent to user B and the end is completed;

[0046] The cloud platform migration module is also used to save the image file IMG and specification information S of the virtual machine to be migrated from the migrating end virtual private cloud to the corresponding directory of the migrating end virtual private cloud, delete the matched entries in the to-be-migrated table, and send a message of successful migration to user A and user B.

[0047] like Figure 2 As shown, in this embodiment, the outgoing application is submitted by user A, and the incoming application is submitted by user B. The step before step S1) includes the steps of generating outgoing application information and incoming application information, and the specific steps include:

[0048] A1) User A logs in to the web console of the virtual private cloud at the migration end, selects the virtual machine to be migrated and the migration destination user, and the cloud platform determines whether the virtual machine is running. If so, it shuts down the virtual machine and proceeds to the next step, otherwise it directly proceeds to the next step;

[0049] A2) The cloud platform searches the database to obtain the image file IMG and specification information S of the virtual machine to be migrated, generates a migration application based on the virtual machine to be migrated, the migration destination user, the image file IMG and the specification information S, sends the migration application to the cloud platform migration module via a message channel, and releases the resources occupied by the virtual machine to be migrated in the virtual private cloud at the migration end. The cloud platform migration module receives the migration application, automatically registers the application information, and registers the user of the virtual private cloud at the migration end as user A;

[0050] A3) User B logs in to the web console of the virtual private cloud at the migration end, selects the virtual machine to be migrated and the migration source user, and the cloud platform generates a migration application based on the virtual machine to be migrated and the migration source user, and sends the migration application to the cloud platform migration module via the message channel. The cloud platform migration module receives the migration application, automatically registers the application information, and registers the virtual private cloud user at the migration end as user B.

[0051] like Figure 5 As shown, after step S3) of this embodiment, the step of generating a migrated virtual machine is also included, which specifically includes:

[0052] B1) User B logs in to the VPC at the destination and proceeds to the next step after receiving a message indicating successful migration.

[0053] B2) The virtual private cloud at the migration end reads the specification information S to allocate resources to the virtual machine;

[0054] B3) The migration-end virtual private cloud loads the image file IMG and starts the virtual machine with the allocated resources.

[0055] In this embodiment, user B can modify the specification information according to actual needs when allocating resources to the virtual machine, such as modifying the number of vCPUs, memory size, IP address in VPCB, etc. Step B2) specifically includes: the virtual private cloud at the migrating end reads the specification information S, the user at the migrating end modifies the information in the specification information S to obtain specification information S1, and the virtual private cloud at the migrating end allocates resources to the virtual machine according to the specification information S1.

[0056] Embodiment 2

[0057] This embodiment is basically the same as the first embodiment, except that, before step S3), it also includes the step of cloud platform administrator approval, specifically including: generating items to be approved and sending them to the cloud platform administrator, waiting for approval, if approval is received, proceeding to the next step, if the waiting timeout or approval is rejected, ending and exiting.

[0058] By adding an administrator approval process, certain restrictions are placed on virtual machine migration between users to prevent users from migrating virtual machines at will.

[0059] Embodiment 3

[0060] like Figure 6 and Figure 7 As shown, this embodiment is basically the same as the first embodiment, except that user A and user B obtain application information from the corresponding virtual machine user, such as Figure 6 As shown, before step A1), it also includes the step of the virtual machine user of the virtual private cloud submitting an application to the corresponding virtual private cloud user, specifically including: the virtual machine user U1 of the virtual private cloud at the migrating end submits a migration application to the virtual private cloud user A at the migrating end through the self-service portal of the virtual machine, and the migration application includes the virtual machine to be migrated and the migration destination user information; the virtual machine user U2 of the virtual private cloud at the migrating end submits a migration application to the virtual private cloud user B at the migrating end through the self-service portal of the virtual machine, and the migration application includes the virtual machine to be migrated and the migration source user information.

[0061] To improve efficiency, in this embodiment, the virtual machine users U1 and U2 may be the same user.

[0062] Embodiment 4

[0063] This embodiment is basically the same as the third embodiment, except that in this embodiment, the cloud platform background program is used instead of the cloud platform migration module to implement the virtual machine migration method between virtual private clouds.

[0064] The above is only a preferred embodiment of the present invention, and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment, it is not intended to limit the present invention. Therefore, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the scope of protection of the technical solution of the present invention.

Claims

1. A method for migrating virtual machines between virtual private clouds, characterized in that: The cloud platform handles VM migration between VM users by following these steps: S1) obtaining the information of the migration application and the virtual private cloud user A at the migration end, and saving the information of the user A and the migration application to the to-be-migrated table, wherein the migration application information includes the migration destination user information set by the user A and the virtual machine to be migrated; S2) Obtain the migration application and the information of the migration-end virtual private cloud user B, match the information of user B and the migration application information with the table to be migrated out, wherein the migration application information includes the migration source user information set by user B and the virtual machine to be migrated, and if there is a match result, proceed to the next step, otherwise, send a match failure message to user B and end; S3) The image file IMG and specification information S of the virtual machine to be migrated are saved from the virtual private cloud at the migration end to the corresponding directory of the virtual private cloud at the migration end through the cloud platform storage network, the matched entries in the table to be migrated are deleted, and a message of successful migration is sent to user A and user B; After step S3), the step of generating a migrated virtual machine is also included, which specifically includes: B1) User B logs in to the VPC at the destination and proceeds to the next step after receiving the message that the migration is successful. B2) The migration-end virtual private cloud reads the specification information S to allocate resources to the virtual machine; B3) The migration-end virtual private cloud loads the image file IMG and starts the virtual machine with the allocated resources.

2. The method for migrating virtual machines between virtual private clouds according to claim 1, characterized in that: Before step S1), the process also includes the steps of generating outgoing application information and incoming application information, which specifically include: A1) User A logs in to the web console of the virtual private cloud at the migration end, selects the virtual machine to be migrated and the migration destination user, and the cloud platform determines whether the virtual machine is running. If so, it shuts down the virtual machine and proceeds to the next step. Otherwise, it directly proceeds to the next step. A2) The cloud platform searches the database to obtain the image file IMG and specification information S of the virtual machine to be migrated, generates a migration application based on the virtual machine to be migrated, the migration destination user, the image file IMG and specification information S, and releases the resources occupied by the virtual machine to be migrated in the virtual private cloud at the migration end; A3) User B logs in to the web console of the virtual private cloud at the migration end, selects the virtual machine to be migrated and the source user, and the cloud platform generates a migration application based on the virtual machine to be migrated and the source user.

3. The method for migrating virtual machines between virtual private clouds according to claim 2, characterized in that: Before step A1), the step of the virtual machine user of the virtual private cloud submitting an application to the corresponding virtual private cloud user is also included, specifically including: the virtual machine user U1 of the virtual private cloud at the migrating end submits a migration application to the virtual private cloud user A at the migrating end through the self-service portal of the virtual machine, and the migration application includes the virtual machine to be migrated and the migration destination user information; the virtual machine user U2 of the virtual private cloud at the migrating end submits a migration application to the virtual private cloud user B at the migrating end through the self-service portal of the virtual machine, and the migration application includes the virtual machine to be migrated and the migration source user information.

4. The method for migrating virtual machines between virtual private clouds according to claim 1, characterized in that: Step B2) specifically includes: the virtual private cloud at the migration end reads the specification information S, the user at the migration end modifies the information in the specification information S to obtain the specification information S1, and the virtual private cloud at the migration end allocates resources to the virtual machine according to the specification information S1.

5. The method for migrating virtual machines between virtual private clouds according to claim 1, characterized in that: Before step S3), the process also includes the step of cloud platform administrator approval, which specifically includes: generating items to be approved and sending them to the cloud platform administrator, waiting for approval, if approval is received, proceeding to the next step, if the waiting timeout or approval is rejected, ending and exiting.

6. A virtual machine migration system between virtual private clouds, comprising a cloud platform, characterized in that: The cloud platform includes a cloud platform migration module; The cloud platform migration module is used to obtain the migration application and the information of the virtual private cloud user A at the migration end, and save the information of user A and the migration application to the table to be migrated, wherein the information of the migration application includes the migration destination user information set by user A and the virtual machine to be migrated; The cloud platform migration module is also used to obtain the migration application and the information of the migration-end virtual private cloud user B, and match the information of user B and the information of the migration application with the table to be migrated out. The information of the migration application includes the migration source user information set by user B and the virtual machine to be migrated. If there is a match result, the next step is entered, otherwise a match failure message is sent to user B and the end is completed; The cloud platform migration module is also used to save the image file IMG and specification information S of the virtual machine to be migrated from the virtual private cloud at the migration end to the corresponding directory of the virtual private cloud at the migration end, delete the matched entries in the table to be migrated, and send a message of successful migration to user A and user B; User B logs in to the virtual private cloud at the migration end, and after receiving the message of successful migration, the virtual private cloud at the migration end reads the specification information S to allocate resources for the virtual machine; the virtual private cloud at the migration end loads the image file IMG and starts the virtual machine with the allocated resources.