A method and system for mutual migration between virtual machine and bare metal instance

Through the coordinated work between the control node and the computing node, the nova-api, nova-conductor and nova-scheduler modules are used to realize cross-type migration of virtual machines and bare metal instances, solving the complex migration operations and business interruptions in the existing technology. The problem is that a fast and simple migration process is realized, and the instances are operated stably.

CN118277035BActive Publication Date: 2024-12-13HARBIN INST OF TECH +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410588590.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-13
Publication Date
2024-12-13
Estimated Expiration
2044-05-13

AI Technical Summary

Technical Problem

The existing virtual machines and bare metal instance migration methods are complex in operation, and require installation of agents in guest os, resulting in business interruption and waste of resources. The existing methods have many restrictions, making it difficult to achieve batch operations and resource sharing.

Method used

Receive migration requests through the nova-api module on the control node, use the nova-conductor module to notify the nova-scheduler to select the destination node, and clean up resources on the source node through the nova-compute module to realize cross-type migration of virtual machines and bare metal instances. Avoid installing agents in guest os and use DPU to manage bare metal servers.

Benefits of technology

It realizes fast and simple migration between virtual machines and bare metal instances, reduces business interruption time, keeps the instance's UUID and network configuration unchanged, and improves the ease of use and efficiency of migration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118277035B_ABST
    Figure CN118277035B_ABST
Patent Text Reader

Abstract

A method and system for mutual migration of virtual machines and bare metal instances, which belongs to the technical field of cross-computing instance type migration in a cloud computing platform. The present invention solves the problems of complex operation of existing migration methods, inability to continue to run the services on the original instance, and the need to install an agent in the guest os when the bare metal node triggers the instance migration action. The method of the present invention can provide different types of nodes by switching the node between the virtual machine node and the bare metal node type without reinstalling the node, so that the instance can be migrated between the virtual machine and bare metal types. Moreover, after the migration, the instance still uses the original UUID, network, and storage data, and the services on the original instance can continue to run, so the migration action does not affect the continued operation of the existing services. At the same time, the method of the present invention does not need to install an agent in the guest os, and the mutual migration of virtual machines and bare metal instances can be achieved through the DPU. The method of the present invention can be applied to the mutual migration of virtual machines and bare metal instances.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of cross-computing instance type migration in a cloud computing platform, and specifically relates to a method and system for mutual migration between a virtual machine and a bare metal instance. Background Art

[0002] A virtual machine instance is an independent execution environment virtualized on a physical host by virtualization management software. It has an independent operating system and is isolated from each other. It has the advantages of being lightweight, sharing resources, and improving resource utilization, but it also brings some performance loss due to the addition of a virtualization layer. A bare metal instance is an entire physical host released to tenants for use. Tenants can apply for a set of bare metal instances just like applying for a virtual machine. It is mainly used in some scenarios with high performance requirements, such as databases. Since the whole machine is provided directly, there is no performance loss, but with the significant improvement in the performance of general servers, this usage may lead to resource waste.

[0003] As the business changes, users have the need to migrate virtual machines to bare metal instances, and also have the need to migrate bare metal instances to virtual machines. The existing method generally uses P2V (Physical to Virtual) or V2P (Virtual to Physical) tool software to recreate it, converting the system disk content of the original instance to the target instance type, and recreating a new instance with the converted image.

[0004] P2V is a technology that converts a physical server or computer into a virtual machine. V2P is the opposite of P2V, and is a technology that converts a virtual machine into a physical server. Currently, both technologies require preparation work in advance, including opening the network and installing necessary tools. They have the disadvantages of being complex to operate, not conducive to batch operations, and having many restrictions, such as requirements for the operating system version of the physical machine or virtual machine. In addition, the existing methods will cause the unique identifier (UUID) and network configuration of the instance to change, and the business on the original instance cannot continue to run.

[0005] The physical host where the virtual machine is located has a virtualization management module that can control the migration between virtual machines. However, the guest OS (child operating system) of the traditional bare metal instance occupies all the resources of the physical host, and there is no resident management system service on it, so the migration action cannot be triggered. If you need to implement P2V or V2P conversion, you need to install an agent in the guest OS. Summary of the invention

[0006] The purpose of the present invention is to solve the problems that the existing migration method is complicated in operation, the business on the original instance cannot continue to run, and the bare metal node triggers the instance migration action and needs to install an agent in the guest OS. A method and system for mutual migration between a virtual machine and a bare metal instance are proposed to realize the mutual migration of deployed instances between the virtual machine and the bare metal instance.

[0007] The technical solution adopted by the present invention to solve the above technical problems is:

[0008] According to one aspect of the present invention: a method for mutual migration between a virtual machine and a bare metal instance, the method specifically comprises the following steps:

[0009] Step 1: Use the nova-api module on the control node to receive the instance migration request initiated by the user. If the received instance migration request is to migrate from a virtual machine to a bare metal, execute step 2; if the received instance migration request is to migrate from a bare metal to a virtual machine, execute step 6;

[0010] Step 2: Notify the nova-compute module on the source node to shut down the instance and send the new specification parameters, network, and storage requests of the instance to the nova-conductor module;

[0011] Step 3: The nova-scheduler module selects a destination node from the bare metal computing nodes based on the request received by the nova-conductor module.

[0012] Step 4: Use the nova-conductor module to notify the destination node selected in step 3 to perform instance cross-type migration;

[0013] Step 5: Use the nova-compute module on the destination node selected in step 3 to notify the nova-compute module on the source node to clean up resources. After receiving the notification, delete the instance on the source node to complete the instance migration.

[0014] Step 6: Notify the nova-compute module on the source node to shut down the instance and send the new specification parameters, network, and storage requests of the instance to the nova-conductor module;

[0015] Step 7: The nova-scheduler module selects a destination node from the virtual machine computing nodes according to the request received by the nova-conductor module.

[0016] Step 8: Use the nova-conductor module to notify the destination node selected in step 7 to perform instance cross-type migration;

[0017] Step 9: Use the nova-compute module on the destination node selected in step 7 to notify the nova-compute module on the source node to clean up resources. After receiving the notification, delete the instance on the source node to complete the instance migration.

[0018] According to another aspect of the present invention: a system for mutual migration between a virtual machine and a bare metal instance, the system comprising a control node, a computing node where the virtual machine is located, and a computing node where the bare metal is located;

[0019] The control node is deployed with a nova-api module, a nova-scheduler module and a nova-conductor module;

[0020] The computing node where the virtual machine is located includes a server, the server carries a hypervisor front end and a DPU, and the DPU carries a hypervisor back end, and the hypervisor back end is used to interact with the hypervisor front end;

[0021] The computing node where the bare metal is located includes a server, and the server on the computing node where the bare metal is located is bare metal, and the bare metal carries a DPU;

[0022] The nova-compute module is deployed on both the DPU of the compute node where the virtual machine is located and the DPU of the compute node where the bare metal is located.

[0023] The nova-api module provides a REST API interface, which is used to receive instance migration requests from other services and users, and notify the DPU on the source node to shut down the instance;

[0024] The nova-api module is also used to send new instance specification parameters, network, and storage requests to the nova-conductor module based on the received instance migration request;

[0025] The nova-conductor module is used to notify the nova-scheduler module to select the destination node according to the received request, and return the computing node selection result to the nova-conductor module;

[0026] The nova-conductor module is also used to notify the destination node to perform instance cross-type migration based on the compute node selection result;

[0027] The nova-compute module on the destination node is used to notify the nova-compute module on the source node to clean up resources, and the nova-compute module on the source node is used to delete the instance on the source node.

[0028] The beneficial effects of the present invention are:

[0029] The method of the present invention can provide different types of nodes by switching the node types between virtual machine nodes and bare metal nodes without reinstalling the nodes. On this basis, instances can be migrated between virtual machine and bare metal types. The method of the present invention realizes the mutual migration of instances between virtual machine and bare metal types, and the operation is simple and fast, does not require complicated operations, improves user experience, and reduces the time of business interruption.

[0030] Moreover, the instance after migration still uses the original UUID, network, and storage data, and the business on the original instance can continue to run, so the migration action does not affect the continued operation of the existing business. At the same time, the method of the present invention does not require the installation of an agent in the guest os, and the migration between the virtual machine and the bare metal instance can be achieved through the DPU. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a flow chart of a method for mutual migration between a virtual machine and a bare metal machine of the present invention;

[0032] Figure 2 It is a structural block diagram of a system for mutual migration between a virtual machine and a bare metal machine according to the present invention. DETAILED DESCRIPTION

[0033] Specific implementation method 1: Combination Figure 1 The present embodiment describes a method for mutual migration between a virtual machine and a bare metal instance, and the method specifically comprises the following steps:

[0034] Step 1: Use the nova-api module on the control node to receive the instance migration request initiated by the user. If the received instance migration request is to migrate from a virtual machine to a bare metal, execute step 2; if the received instance migration request is to migrate from a bare metal to a virtual machine, execute step 6;

[0035] Step 2: Notify the nova-compute module on the source node to shut down the instance and send the new specification parameters, network, and storage requests of the instance to the nova-conductor module;

[0036] Step 3: The nova-scheduler module selects a destination node from the bare metal computing nodes based on the request received by the nova-conductor module.

[0037] Step 4: Use the nova-conductor module to notify the destination node selected in step 3 to perform instance cross-type migration;

[0038] Step 5: Use the nova-compute module on the destination node selected in step 3 to notify the nova-compute module on the source node to clean up resources. After receiving the notification, delete the instance on the source node to complete the instance migration.

[0039] Step 6: Notify the nova-compute module on the source node to shut down the instance and send the new specification parameters, network, and storage requests of the instance to the nova-conductor module;

[0040] Step 7: The nova-scheduler module selects a destination node from the virtual machine computing nodes according to the request received by the nova-conductor module.

[0041] Step 8: Use the nova-conductor module to notify the destination node selected in step 7 to perform instance cross-type migration;

[0042] Step 9: Use the nova-compute module on the destination node selected in step 7 to notify the nova-compute module on the source node to clean up resources. After receiving the notification, delete the instance on the source node to complete the instance migration.

[0043] At this point, the instance cross-type migration operation is completed, and the instance is placed on a node that meets the new resource request. Regardless of whether the computing node is a bare metal type or a virtual machine type, the DPU on it will run the management service nova-compute to receive messages from the control node and send messages between the migrating nodes to coordinate the entire migration process.

[0044] Specific implementation method 2: This implementation method is different from specific implementation method 1 in that the instance migration request is initiated after the user or other service specifies new specification parameters.

[0045] The other steps and parameters are the same as those in the first embodiment.

[0046] Specific implementation method three: This implementation method is different from specific implementation methods one or two in that the specific process of the destination node performing instance cross-type migration is as follows:

[0047] The DPU on the destination node disassociates the instance from the source node, and then uses the CPU, memory, and original network and storage resources on the destination node to land the instance to be migrated on the destination node.

[0048] The other steps and parameters are the same as those in the first or second embodiment.

[0049] Specific implementation method 4: This implementation method is different from any one of the specific implementation methods 1 to 3 in that the source node and the destination node are:

[0050] When an instance is migrated from a virtual machine to a bare metal machine: the compute node where the virtual machine is located is used as the source node, and the compute node where the bare metal machine is located is used as the destination node;

[0051] When an instance is migrated from a bare metal machine to a virtual machine: the compute node where the bare metal machine is located is used as the source node, and the compute node where the virtual machine is located is used as the destination node.

[0052] The other steps and parameters are the same as those in Specific Embodiments 1 to 3.

[0053] Specific implementation method five: Combination Figure 2 The present embodiment is described as follows. A system for mutual migration between a virtual machine and a bare metal instance is described in the present embodiment, and the system includes a control node, a computing node where the virtual machine is located, and a computing node where the bare metal is located;

[0054] The control node is deployed with a nova-api module, a nova-scheduler module and a nova-conductor module;

[0055] The computing node where the virtual machine is located includes a server, the server carries a hypervisor front end and a DPU, and the DPU carries a hypervisor back end, and the hypervisor back end is used to interact with the hypervisor front end;

[0056] The computing node where the bare metal is located includes a server, and the server on the computing node where the bare metal is located is bare metal, and the bare metal carries a DPU;

[0057] Bare metal servers with DPUs do not need to install agents in the servers. Virtual machines and bare metal servers can be migrated through DPUs.

[0058] The nova-compute module (responsible for managing the lifecycle of virtual machines and bare metals) is deployed on both the DPU of the computing node where the virtual machine is located and the DPU of the computing node where the bare metal is located.

[0059] The nova-api module provides a REST API (Application Programming Interface) interface, which is used to receive instance migration requests from other services and users, and notify the DPU on the source node to shut down the instance;

[0060] The nova-api module is also used to send new instance specification parameters, network, and storage requests to the nova-conductor module based on the received instance migration request;

[0061] The nova-conductor module is used to notify the nova-scheduler module to select the destination node according to the received request, and return the computing node selection result to the nova-conductor module;

[0062] The nova-conductor module is also used to notify the destination node to perform instance cross-type migration based on the compute node selection result;

[0063] The nova-compute module on the destination node is used to notify the nova-compute module on the source node to clean up resources, and the nova-compute module on the source node is used to delete the instance on the source node.

[0064] The present invention focuses on the changes in resource requirements of cloud platform instances, migrates instances between virtual machines and bare metal, and improves the ease of use and speed of instance migration, which is mainly reflected in the following aspects:

[0065] (1) Instance UUID, network, and storage data remain unchanged

[0066] The migrated instance still uses the original UUID, network, and storage data, and does not affect the operation of the original instance.

[0067] (2) Simple operation and short service impact

[0068] During migration, you only need to specify the new specification parameters of the instance separately to achieve cross-type migration of instances, complete the operation in a relatively short time, and reduce the impact on instance business.

[0069] (3) Rollback

[0070] When migration fails, there is a rollback mechanism to ensure that the original instance type is restored and the business can run normally. After the instance is successfully restored, you can continue to perform the next migration on it.

[0071] (4) Bare metal server management based on DPU

[0072] Traditional physical servers have all their resources occupied by the guest OS and cannot receive messages sent by other nodes. In the present invention, a DPU is inserted into the bare metal server, which runs computing services and can receive migration messages sent by other nodes, thereby completing the entire migration process.

[0073] Therefore, the instance cross-type migration method of the present invention can quickly and easily migrate the instance to other types of nodes with sufficient resources. When the migration fails, there is a rollback mechanism to ensure the normal operation of the business.

[0074] Specific implementation method six: This implementation method is different from specific implementation method five in that the user specifies new specification parameters and then initiates a request for instance migration across computing node types.

[0075] The other steps and parameters are the same as those in the fifth embodiment.

[0076] Specific implementation method 7: This implementation method is different from specific implementation methods 5 or 6 in that the specific process of the destination node performing instance cross-type migration is as follows:

[0077] The DPU on the destination node disassociates the instance from the source node, and then uses the CPU, memory, and original network and storage resources on the destination node to land the instance to be migrated on the destination node.

[0078] The other steps and parameters are the same as those in the fifth or sixth embodiment.

[0079] Specific implementation eight: This implementation differs from any one of specific implementations five to seven in that the source node and the destination node are:

[0080] When an instance is migrated from a virtual machine to a bare metal machine: the compute node where the virtual machine is located is used as the source node, and the compute node where the bare metal machine is located is used as the destination node;

[0081] When an instance is migrated from a bare metal machine to a virtual machine: the compute node where the bare metal machine is located is used as the source node, and the compute node where the virtual machine is located is used as the destination node.

[0082] The other steps and parameters are the same as those in any one of the fifth to seventh embodiments.

[0083] In order to achieve cross-type instance migration, you need to prepare nodes of different types from the current nodes before migration. That is, if the instance is migrated from a virtual machine to a bare metal, you need to prepare the bare metal node in advance; if the instance is migrated from a bare metal to a virtual machine, you need to prepare the virtual machine node in advance.

[0084] The above calculation examples of the present invention are only used to explain the calculation model and calculation process of the present invention in detail, and are not intended to limit the implementation methods of the present invention. For ordinary technicians in the relevant field, other different forms of changes or modifications can be made based on the above description. It is impossible to list all the implementation methods here. All obvious changes or modifications derived from the technical solution of the present invention are still within the scope of protection of the present invention.

Claims

1. A method for migrating a virtual machine to a bare metal instance, characterized in that: The method specifically comprises the following steps: Step 1: Use the nova-api module on the control node to receive the instance migration request initiated by the user. If the received instance migration request is to migrate from a virtual machine to a bare metal, execute step 2; if the received instance migration request is to migrate from a bare metal to a virtual machine, execute step 6; Step 2: Notify the nova-compute module on the source node to shut down the instance and send the new specification parameters, network, and storage requests of the instance to the nova-conductor module; Step 3: The nova-scheduler module selects a destination node from the bare metal computing nodes based on the request received by the nova-conductor module. Step 4: Use the nova-conductor module to notify the destination node selected in step 3 to perform instance cross-type migration; Step 5: Use the nova-compute module on the destination node selected in step 3 to notify the nova-compute module on the source node to clean up resources. After receiving the notification, delete the instance on the source node to complete the instance migration. Step 6: Notify the nova-compute module on the source node to shut down the instance and send the new specification parameters, network, and storage requests of the instance to the nova-conductor module; Step 7: The nova-scheduler module selects a destination node from the virtual machine computing nodes according to the request received by the nova-conductor module. Step 8: Use the nova-conductor module to notify the destination node selected in step 7 to perform instance cross-type migration; Step 9: Use the nova-compute module on the destination node selected in step 7 to notify the nova-compute module on the source node to clean up resources. After receiving the notification, delete the instance on the source node to complete the instance migration. The specific process of the destination node performing instance cross-type migration is as follows: The DPU on the destination node disassociates the instance from the source node, and then uses the CPU, memory, and original network and storage resources on the destination node to land the instance to be migrated on the destination node.

2. The method for migrating a virtual machine and a bare metal instance to each other according to claim 1, characterized in that: The instance migration request is initiated after a user or other service specifies new specification parameters.

3. The method for migrating a virtual machine and a bare metal instance to each other according to claim 2, characterized in that: The source node and the destination node are: When an instance is migrated from a virtual machine to a bare metal machine: the compute node where the virtual machine is located is used as the source node, and the compute node where the bare metal machine is located is used as the destination node; When an instance is migrated from a bare metal machine to a virtual machine: the compute node where the bare metal machine is located is used as the source node, and the compute node where the virtual machine is located is used as the destination node.

4. A system for migrating virtual machines and bare metal instances, characterized in that: The system includes a control node, a computing node where a virtual machine is located, and a computing node where a bare metal is located; The control node is deployed with a nova-api module, a nova-scheduler module and a nova-conductor module; The computing node where the virtual machine is located includes a server, the server carries a hypervisor front end and a DPU, and the DPU carries a hypervisor back end, and the hypervisor back end is used to interact with the hypervisor front end; The computing node where the bare metal is located includes a server, and the server on the computing node where the bare metal is located is bare metal, and the bare metal carries a DPU; The nova-compute module is deployed on both the DPU of the compute node where the virtual machine is located and the DPU of the compute node where the bare metal is located. The nova-api module provides a REST API interface, which is used to receive instance migration requests from other services and users, and notify the DPU on the source node to shut down the instance; The nova-api module is also used to send new instance specification parameters, network, and storage requests to the nova-conductor module based on the received instance migration request; The nova-conductor module is used to notify the nova-scheduler module to select the destination node according to the received request, and return the computing node selection result to the nova-conductor module; The nova-conductor module is also used to notify the destination node to perform instance cross-type migration based on the compute node selection result; The specific process of the destination node performing instance cross-type migration is as follows: The DPU on the destination node disassociates the instance from the source node, and then uses the CPU, memory, and original network and storage resources on the destination node to land the instance to be migrated on the destination node; The nova-compute module on the destination node is used to notify the nova-compute module on the source node to clean up resources, and the nova-compute module on the source node is used to delete the instance on the source node.

5. A system for migrating virtual machines and bare metal instances according to claim 4, characterized in that: After the user specifies new specification parameters, a request for instance migration across computing node types is initiated.

6. A system for migrating a virtual machine and a bare metal instance according to claim 5, characterized in that: The source node and the destination node are: When an instance is migrated from a virtual machine to a bare metal machine: the compute node where the virtual machine is located is used as the source node, and the compute node where the bare metal machine is located is used as the destination node; When an instance is migrated from a bare metal machine to a virtual machine: the compute node where the bare metal machine is located is used as the source node, and the compute node where the virtual machine is located is used as the destination node.

Citation Information

Patent Citations

  • A virtual machine security migration method

    CN109684037A

  • Method for migrating virtual machine across cell by openstack

    CN111880905A

  • Virtual machine migration method, electronic equipment and storage medium

    CN115729667A

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

    CN116166371A

  • Method, device and system for realizing virtual machine migration by specifying NUMA node

    CN117850968A