A control method, device and equipment for virtual machine live migration and a storage medium

By sending table entries to the host virtual switch in advance during the virtual machine hot migration process to ensure that traffic is forwarded to the target switch, the problem of service interruption at the network layer is solved, and zero packet loss and uninterrupted conversion at the network layer are achieved.

CN118175192BActive Publication Date: 2025-12-16RUIJIE NETWORKS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211543202.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-02
Publication Date
2025-12-16
Estimated Expiration
2042-12-02

AI Technical Summary

Technical Problem

During virtual machine hot migration, network services are interrupted due to the poor performance of the forwarding table update of the SDN controller. Existing technologies cannot achieve zero packet loss and uninterrupted service transition at the network layer.

Method used

After receiving the virtual machine migration notification, the SDN controller sends the first entry to the host virtual switch to which the second virtual machine is connected, ensuring that traffic is forwarded to the target virtual switch, updating the forwarding table entries in a timely manner to avoid interruption, and canceling the traffic forwarding of the original virtual switch after the migration is completed.

Benefits of technology

It achieves zero packet loss in network layer services during virtual machine hot migration, ensuring uninterrupted network layer services and improving network forwarding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118175192B_ABST
    Figure CN118175192B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of cloud computing, in particular to a virtual machine live migration control method and device, equipment and a storage medium, and is used for solving the problem of service interruption at the network level when a virtual machine is live migrated under related technologies. The method is as follows: after an SDN controller receives a notification message of a first virtual machine needing to be migrated, at least one second virtual machine is determined based on the notification message, the second virtual machine is a virtual machine needing to forward received traffic to the first virtual machine; a first table item is sent to a host virtual switch accessed by the second virtual machine, which is used for notifying the host virtual switch to forward the traffic to a target virtual switch accessed by the first virtual machine after migration; after receiving a first virtual machine migration completion message, indication information used for notifying the host virtual switch to cancel sending the traffic to an original virtual switch accessed by the first virtual machine before migration is sent to the host virtual switch, so that the service at the network level is not interrupted during the virtual machine live migration process.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of cloud computing, and particularly relates to a virtual machine live migration control method and device, equipment and a storage medium. BACKGROUND

[0002] Live Migration, also called dynamic migration or real-time migration, is virtual machine save / resume, which usually saves the running state of the entire virtual machine completely and quickly restores it to the original hardware platform or even a different hardware platform. After the virtual machine is restored, it still runs smoothly and users cannot perceive any difference.

[0003] In the related art, in the virtual machine live migration process, after the software defined network (English: Software Defined Network, abbreviated: SDN) controller in the network component receives the virtual machine migration completion notification sent by the computing component, it updates the forwarding table entries of the virtual switch managed by it, so that the virtual switch receives the traffic related to the virtual machine in the virtual machine migration completion notification and forwards it to the target virtual switch accessed by the virtual machine, so that the target virtual switch forwards the traffic to the virtual machine. Then, before the SDN controller updates the forwarding table entries of the virtual switch managed by it, the forwarding table entries of the virtual switch that needs to forward the traffic to the virtual machine at the network level are not changed, so there is still traffic forwarding to the original virtual switch accessed by the virtual machine. However, at this time, the virtual machine may have migrated from the original virtual switch, which causes network level service interruption.

[0004] Further, the above problem of network level service interruption can be solved by strengthening the close cooperation between the computing component and the network component to shorten the interruption time, but the network service impact time of virtual machine live migration is also affected by the update performance of the forwarding table entries of the SDN controller. If the update table entry performance of the SDN controller is poor and cannot update the forwarding table entries of the virtual switch managed by it in time, since the SDN controller updates the table entries only after receiving the virtual machine migration completion message in the related art, at this time, due to the large time consumption of the SDN controller in issuing the update table entries, network level service interruption will also occur. SUMMARY

[0005] The purpose of the present application is to provide a virtual machine live migration control method, device, equipment and storage medium, which can realize network level service zero packet loss in virtual machine live migration and ensure network level service uninterrupted.

[0006] The specific technical solutions provided by the embodiments of the present application are as follows:

[0007] In a first aspect, a control method for virtual machine live migration is applied to a software defined network (SDN) controller, and includes the following steps:

[0008] After receiving a notification message indicating that a first virtual machine needs to be migrated, at least one second virtual machine is determined based on the notification message, wherein the second virtual machine is a virtual machine that needs to forward traffic to the first virtual machine;

[0009] A first table item is sent to a host virtual switch accessed by the second virtual machine, for notifying the host virtual switch to forward the traffic to a target virtual switch accessed by the first virtual machine after migration.

[0010] According to the control method for virtual machine live migration provided in the embodiments, after receiving the notification message indicating that the first virtual machine needs to be migrated sent by the computing component, the SDN controller sends the first table item to the target virtual switch accessed by the first virtual machine after migration to the host virtual switch accessed by the second virtual machine. In this way, no matter whether the first virtual machine is migrated from the original virtual switch, is in the process of migration, or has been migrated to the target virtual switch, the network layer can forward the traffic that needs to be forwarded to the first virtual machine, and the zero-packet-loss of network layer service in the process of virtual machine live migration is achieved, and the network layer service is ensured not to be interrupted.

[0011] In some possible embodiments, after the first table item is sent to the host virtual switch accessed by the second virtual machine, the method further includes the following steps:

[0012] After receiving a migration completion message of the first virtual machine, indication information is sent to the host virtual switch, for notifying the host virtual switch to cancel sending the traffic to the original virtual switch accessed by the first virtual machine before migration.

[0013] In the above method, after receiving the migration completion message of the first virtual machine, the SDN controller sends the indication information to the host virtual switch, for indicating to cancel sending the traffic to the original virtual switch accessed by the first virtual machine before migration, so as to release the useless bandwidth occupation of the original virtual switch and improve the forwarding efficiency of the original virtual switch.

[0014] In some possible embodiments, the indication information sent to the host virtual switch includes the following steps:

[0015] A second table item is sent to the host virtual switch, for notifying the host virtual switch to update a locally saved forwarding table item, so as to cancel sending the traffic to the original virtual switch; or

[0016] sending a deletion instruction to the host virtual switch, so as to inform the host virtual switch to delete a target entry, the target entry being a forwarding entry for sending the flow to the original virtual switch.

[0017] The method can inform the host virtual switch to cancel sending the flow to the original virtual switch accessed before the migration of the first virtual machine after enabling the target virtual switch and disabling the original virtual switch by sending a second entry or a deletion instruction to the host virtual switch of the second virtual machine, so as to release the useless bandwidth occupation of the original virtual switch and improve the forwarding efficiency of the original virtual switch.

[0018] In some possible embodiments, the determining at least one second virtual machine based on the notification message comprises:

[0019] obtaining identification information of the first virtual machine from the notification message;

[0020] querying each candidate identification information having a flow forwarding relationship with the identification information of the first virtual machine from a forwarding flow table based on the identification information;

[0021] selecting a virtual machine from the virtual machines corresponding to the candidate identification information, which needs to forward the received flow to the first virtual machine, and determining each selected virtual machine as the second virtual machine.

[0022] In a second aspect, a control method of virtual machine live migration is applied to a virtual switch in a network device, and the method comprises:

[0023] receiving a first entry sent by a software defined network (SDN) controller, wherein the first entry is sent by the SDN controller after determining that a second virtual machine connected to the virtual switch needs to forward a received flow to a first virtual machine based on a received notification message that the first virtual machine needs to be migrated;

[0024] after receiving the flow, copying the flow based on the first entry, and forwarding the copied flow to a target virtual switch accessed after the migration of the first virtual machine.

[0025] In some possible embodiments, the method further comprises:

[0026] receiving indication information sent by the SDN controller, so as to inform the virtual switch to cancel sending the flow to an original virtual switch accessed before the migration of the first virtual machine.

[0027] In some possible embodiments, the receiving the indication information sent by the SDN controller comprises:

[0028] receive the second table item sent by the SDN controller, and update the locally saved forwarding table item based on the second table item to cancel sending the traffic to the original virtual switch; or

[0029] receive the deletion instruction sent by the SDN controller, and delete a target table item based on the deletion instruction, the target table item being a forwarding table item for sending the traffic to the original virtual switch.

[0030] In a third aspect, a control system for virtual machine live migration includes an SDN controller and a virtual switch in a network device, wherein

[0031] The SDN controller is configured to determine at least one second virtual machine based on a notification message for migrating a first virtual machine after receiving the notification message, the second virtual machine being a virtual machine that needs to forward received traffic to the first virtual machine, and send a first table item to a host virtual switch accessed by the second virtual machine to notify the host virtual switch to forward the traffic to a target virtual switch accessed by the first virtual machine after migration.

[0032] If the virtual switch is the host virtual switch, the virtual switch is configured to receive the first table item sent by the SDN controller, and copy the traffic based on the first table item after receiving the traffic, and forward the copied traffic to the target virtual switch accessed by the first virtual machine after migration.

[0033] In a fourth aspect, a control device for virtual machine live migration is applied to an SDN controller, and the device includes

[0034] A determination module is configured to determine at least one second virtual machine based on a notification message for migrating a first virtual machine after receiving the notification message, the second virtual machine being a virtual machine that needs to forward received traffic to the first virtual machine.

[0035] A sending module is configured to send a first table item to a host virtual switch accessed by the second virtual machine to notify the host virtual switch to forward the traffic to a target virtual switch accessed by the first virtual machine after migration.

[0036] In some possible embodiments, the sending module is further configured to

[0037] after sending the first table item to the second virtual machine access host virtual switch, after receiving the first virtual machine migration completion message, send an indication message to the host virtual switch, to inform the host virtual switch to cancel sending the traffic to the original virtual switch accessed by the first virtual machine before migration.

[0038] In some possible embodiments, the sending module is specifically configured to:

[0039] send a second table item to the host virtual switch, to inform the host virtual switch to update the locally saved forwarding table item, to cancel sending the traffic to the original virtual switch; or,

[0040] send a deletion instruction to the host virtual switch, to inform the host virtual switch to delete a target table item, which is a forwarding table item for sending the traffic to the original virtual switch.

[0041] In some possible embodiments, the determining module is specifically configured to:

[0042] obtain the identification information of the first virtual machine from the notification message;

[0043] based on the identification information, query each candidate identification information having a traffic forwarding relationship with the identification information of the first virtual machine from a forwarding flow table;

[0044] from the virtual machines corresponding to the each candidate identification information, select a virtual machine that needs to forward the received traffic to the first virtual machine, and determine each selected virtual machine as the second virtual machine.

[0045] In a fifth aspect, a virtual machine hot migration control device is applied to a virtual switch located in a network device, and the device comprises:

[0046] a receiving module configured to receive a first table item sent by a software defined network (SDN) controller, wherein the first table item is sent by the SDN controller based on a received notification message that a first virtual machine needs to be migrated, and the second virtual machine connected to the virtual switch needs to forward received traffic to the first virtual machine;

[0047] a forwarding module configured to, after receiving the traffic, copy the traffic based on the first table item, and forward the copied traffic to a target virtual switch accessed by the first virtual machine after migration.

[0048] In some possible embodiments, the receiving module is further configured to:

[0049] receive the indication information sent by the SDN controller, the indication information being used to inform the virtual switch to cancel sending the traffic to the original virtual switch accessed by the first virtual machine before migration.

[0050] In some possible embodiments, the receiving module is specifically configured to:

[0051] receive the second table item sent by the SDN controller, and update the locally saved forwarding table item based on the second table item, so as to cancel sending the traffic to the original virtual switch.

[0052] receive the deletion instruction sent by the SDN controller, and delete the target table item based on the deletion instruction, the target table item being the forwarding table item used to send the traffic to the original virtual switch.

[0053] In a sixth aspect, an embodiment of the present application provides a network device, the network device comprising a memory and a processor,

[0054] The memory is configured to store computer programs or instructions.

[0055] The processor is configured to execute the computer programs or instructions in the memory, so that the method in any one of the above first aspect and second aspect is executed.

[0056] In a seventh aspect, an embodiment of the present application provides a computer readable storage medium, which stores computer program instructions, and the computer program instructions are executed by a processor to implement the steps of the method in any one of the above first aspect and second aspect.

[0057] In addition, the technical effects brought by any one of the implementation manners of the second aspect to the seventh aspect can refer to the technical effects brought by the different implementation manners of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0058] Figure 1 FIG. 1 is a schematic diagram of a network architecture of an SDN according to an embodiment of the present application;

[0059] Figure 2 FIG. 3 is a schematic diagram of a complete interaction flow of virtual machine live migration according to the related art;

[0060] Figure 3 FIG. 5 is a schematic diagram of an architecture of a control system of virtual machine live migration according to an embodiment of the present application;

[0061] Figure 4 FIG. 7 is a schematic diagram of a flow of a control method of virtual machine live migration according to an embodiment of the present application;

[0062] Figure 5 FIG. 9 is a schematic diagram of a flow of a determination method of a second virtual machine according to an embodiment of the present application;

[0063] Figure 6 a flowchart of another control method of virtual machine live migration in the embodiments of the present application;

[0064] Figure 7 a complete interaction flowchart of a kind of virtual machine live migration in the embodiments of the present application;

[0065] Figure 8 a flow path schematic view corresponding to the control method of a kind of virtual machine live migration in the embodiments of the present application;

[0066] Figure 9 a logic architecture schematic view of the control device of a kind of virtual machine live migration in the embodiments of the present application;

[0067] Figure 10 a logic architecture schematic view of another control device of virtual machine live migration in the embodiments of the present application;

[0068] Figure 11 a physical architecture schematic view of network equipment in the embodiments of the present application. DETAILED DESCRIPTION

[0069] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of the present application.

[0070] It should be noted that the terms "first", "second", "third" and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0071] In the following, some terms in the embodiments of the present application are explained and described, so as to facilitate the understanding of those skilled in the art.

[0072] (1) In the embodiments of the present application, the term "and / or" describes the association relationship of the associated objects, which means that there can be three kinds of relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. The character " / " generally represents that the associated objects before and after it are in an "or" relationship.

[0073] (2) The term "computing component (Nova)" in the embodiments of the present application is an OpenStack component, which provides a cloud computing network controller and supports a large number of virtual machine technologies, including system virtualization modules (English: Kernel-based Virtual Machine, abbreviated as KVM), virtual machine monitors (Xen), kernel virtualization technologies (English: Linux Container, abbreviated as LXC), VMware, and the like.

[0074] (3) The term "network connection component (Neutron)" in the embodiments of the present application provides network virtualization technology for the Openstack cloud computing management platform, and provides network connection services for other services of OpenStack. An interface is provided for users, and Network, Subnet, Router can be defined, dynamic host configuration protocol (English: Dynamic Host Configuration Protocol, abbreviated as DHCP), domain name system (English: Domain Name System, abbreviated as DNS), load balancing, L3 services, network support virtual extended local area network (English: Virtual Extensible Local Area Network, abbreviated as VxLAN), virtual local area network (English: Virtual Local Area Network, abbreviated as VLAN), and the like. The plug-in architecture thereof supports many mainstream network manufacturers and technologies, such as OpenvSwitch.

[0075] (4) The term "OpenvSwitch" in the embodiments of the present application is an open source virtual switch software, which is usually software for forwarding traffic, and is specially used for managing multi-tenancy public cloud computing environments to provide network administrators with traffic visibility and control between and within virtual machines.

[0076] (5) The term "virtual machine" in the embodiments of the present application is a complete computer system that is simulated by software and runs in a completely isolated environment and has complete hardware system functions.

[0077] In order to better understand the technical solutions of the present application, the relationship between the virtual switch and the virtual machine in the embodiments of the present application will be briefly introduced. First, the virtual switch is not a kind of virtual machine; second, the virtual switch and the virtual machine both belong to the software category and are two software running in a server, for example, a virtual switch connects multiple virtual machines to realize communication between and within multiple virtual machines, and communication between virtual machines connected with other virtual switches, and the like.

[0078] The network architecture in the embodiments of the present application will be briefly introduced as follows.

[0079] Figure 1 A network architecture diagram of an SDN in an embodiment of the present application is shown. In the SDN, the control plane and the data plane of the traditional network device are separated, so as to realize flexible control of network traffic.

[0080] Referring to Figure 1 As shown, the SDN includes Nova, Neutron, SDN controller and computing node, and the computing node includes virtual switch (such as OpenvSwitch) and virtual machine (English: Virtual Machine, abbreviation: VM), wherein,

[0081] The SDN controller is a core component in the SDN network structure, and serves as the control plane of the entire network, and undertakes the control behavior of the entire network.

[0082] In a specific implementation, the SDN controller generates a flow table according to the configuration of a user or a dynamically running protocol and sends the flow table to the virtual switch managed by the SDN controller, and the virtual switch processes traffic according to the flow table sent by the SDN controller.

[0083] In some possible embodiments, the SDN controller can control the corresponding network device through the NETCONF, OpenFlow and the like, so as to realize the specified function.

[0084] Figure 2 A complete interaction flow diagram of virtual machine live migration in the related art is shown. Referring to Figure 2 As shown, the user triggers a first virtual machine live migration task through a client to Nova, and creates the first virtual machine live migration task.

[0085] Step 200: Nova sends a port creation request to Neutron, for notifying the target virtual switch accessed by the first virtual machine after migration to create an OpenvSwitch (ovs) port of the first virtual machine accessing the target virtual switch.

[0086] Step 201: Neutron forwards the port creation request to the SDN controller.

[0087] Step 202: The SDN controller forwards the port creation request to the target virtual switch accessed by the first virtual machine after migration.

[0088] Step 203: Nova sends a notification message of needing to migrate the first virtual machine to Neutron.

[0089] Step 204: Neutron forwards the notification message of needing to migrate the first virtual machine to the SDN controller.

[0090] Step 205: The SDN controller sends the update completion acknowledgement information to the Neutron.

[0091] Step 206: The Neutron forwards the update completion acknowledgement information to the Nova.

[0092] Step 207: The Nova accesses the first virtual machine to the ovs port of the target virtual switch and enables the ovs port.

[0093] Step 208: The Nova sends the first virtual machine migration completion message to the Neutron.

[0094] Step 209: The Neutron forwards the first virtual machine migration completion message to the SDN controller.

[0095] Step 210: The SDN controller determines at least one second virtual machine based on the first virtual machine migration completion message, the second virtual machine being a virtual machine that needs to forward the received traffic to the first virtual machine.

[0096] Step 211: The SDN controller sends the update forwarding table item to the host virtual switch accessed by the second virtual machine.

[0097] Step 212: The SDN controller sends the update completion acknowledgement information to the Neutron.

[0098] Step 213: The Neutron forwards the update completion acknowledgement information to the Nova.

[0099] It should be noted that, Figure 2 The feedback information content after the network level operation is omitted, and the Nova performs the first virtual machine live migration operation (including hard disk copying, memory copying, etc.) between steps 206 and 207.

[0100] Apparently, in the virtual machine live migration interaction process under the related art, after receiving the first virtual machine migration completion message sent by the Nova, the SDN controller sends an update forwarding table item to the host virtual switch accessed by the second virtual machine managed by the SDN controller, so that after the host virtual switch receives the traffic related to the first virtual machine, the traffic is no longer forwarded to the original virtual switch accessed before the migration of the first virtual machine, but is forwarded to the target virtual switch accessed after the migration of the first virtual machine. Before the SDN controller sends the update forwarding table item to the host virtual switch, since the forwarding table item at the network level is not changed, the host virtual switch accessed by the second virtual machine still forwards the traffic that needs to be forwarded to the first virtual machine to the original virtual switch accessed before the migration of the first virtual machine. However, at this time, the first virtual machine may have been migrated away from the original virtual switch, so that the network service is interrupted.

[0101] Further, if the above problem of network level service interruption can be shortened by strengthening the close cooperation between the computing components (such as Nova, etc.) and the network components (such as Neutron, SDN controller, etc.), but the network service impact time of virtual machine live migration is still affected by the update performance of the forwarding table entries of the SDN controller. If the update table entry performance of the SDN controller is poor, it cannot update the forwarding table entries of the virtual switch it manages in time. Since the SDN controller updates the table entries after receiving the virtual machine migration completion message, the time-consuming of the SDN controller to issue the updated table entries is large, which also causes network level service interruption.

[0102] A solution to reduce network level service interruption has emerged. Specifically, after the first virtual machine (denoted as VM1) is migrated from the original virtual switch (denoted as A) to the target virtual switch (denoted as X), A modifies the forwarding rule associated with VM1 to the forwarding rule corresponding to X {VM1, X}. In this way, if VMn behind the notification is not changed to {VM1, X} by the corresponding Virtual Switch after VM1 is migrated from A to X, VMn will still send the traffic to A that needs to be forwarded to VM1, and A can forward the traffic from VMn to X because A has the forwarding rule {VM1, X}.

[0103] In this way, A after modifying the forwarding rule plays the role of a forwarding gateway, and even if the forwarding rule of other VMn communicating with VM1 has not been modified, the traffic sent to A can still be successfully forwarded to X, avoiding the problem of access delay and data packet loss caused by virtual machine live migration in a large-scale cloud platform.

[0104] However, using the above solution, the network service interruption time of virtual machine live migration affected by the update performance of the forwarding table entries of the SDN controller can be eliminated, but for the network level, the forwarding table entries of the original virtual switch accessed by the first virtual machine before migration have not been changed, and there is still traffic forwarded to the original virtual switch, at this time the first virtual machine may have been migrated away from the original virtual switch, so there is still a problem of network service interruption.

[0105] To address the issue of network service interruption caused by the time lag between processing changes to computing resources and processing changes to network resources (mainly forwarding table entries) during virtual machine hot migration under the aforementioned related technologies, this application provides a control method for virtual machine hot migration. In this embodiment, after receiving a notification message indicating that a first virtual machine needs to be migrated, the SDN controller determines at least one second virtual machine based on the notification message. The second virtual machine is the virtual machine that needs to forward the received traffic to the first virtual machine. Then, a first table entry is sent to the host virtual switch connected to the second virtual machine to notify the host virtual switch to forward the traffic to the target virtual switch connected to after the first virtual machine is migrated. In this way, regardless of whether the first virtual machine has migrated from the original virtual switch, is in the process of migration, or has already migrated to the target virtual switch, the network layer can forward the traffic that needs to be forwarded to the first virtual machine, achieving zero packet loss in network layer services during virtual machine hot migration and ensuring uninterrupted network layer services.

[0106] The preferred embodiments of this application will be further described in detail below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only for illustration and explanation of this application and are not intended to limit this application. Furthermore, the embodiments of this application and the features in the embodiments can be combined with each other without conflict.

[0107] Figure 3 A schematic diagram of the architecture of a virtual machine hot migration control system according to an embodiment of this application is shown. (See also...) Figure 3 As shown, the control system includes an SDN controller and a virtual switch located in the network device.

[0108] The following is a brief introduction to the functions of the SDN controller and virtual switch included in the control system. The specific execution of the SDN controller and virtual switch will be detailed in the subsequent process and will not be repeated here.

[0109] In the embodiments of this application, see the following: Figure 3 As shown, the SDN controller, upon receiving a notification message indicating that a first virtual machine needs to be migrated, determines at least one second virtual machine based on the notification message. The second virtual machine is the one that needs to forward the received traffic to the first virtual machine. The controller also sends a first entry to the host virtual switch connected to the second virtual machine, instructing the host virtual switch to forward the traffic to the target virtual switch connected to after the first virtual machine's migration. If the virtual switch is the host virtual switch, the virtual switch receives the first entry from the SDN controller and, upon receiving the traffic, replicates the traffic based on the first entry and forwards the replicated traffic to the target virtual switch connected to after the first virtual machine's migration.

[0110] After introducing the architecture of the control system of the virtual machine live migration in the embodiments of the present application, a control method of the virtual machine live migration suitable for the architecture is introduced in detail.

[0111] Referring to Figure 4 As shown in the figure, the control method of the virtual machine live migration provided in the embodiments of the present application is applied to the SDN controller, and the specific process of the method is as follows:

[0112] Step 300: After receiving the notification message of the first virtual machine that needs to be migrated, at least one second virtual machine is determined based on the notification message; wherein the second virtual machine is a virtual machine that needs to forward the received traffic to the first virtual machine.

[0113] In the embodiments of the present application, step 300 is added in the existing interactive process of the virtual machine live migration, after receiving the notification message of the first virtual machine that needs to be migrated forwarded by the network connection component, at least one second virtual machine is determined based on the notification message, so as to execute step 310 subsequently.

[0114] The notification message is sent by Nova to Neutron after receiving the live migration task of the first virtual machine, and forwarded to the SDN controller by Neutron.

[0115] Referring to Figure 5 As shown in the figure, when step 300 is executed, at least one second virtual machine is determined based on the notification message, which specifically includes:

[0116] Step 3001: The identification information of the first virtual machine is obtained from the notification message.

[0117] In the embodiments of the present application, the above notification message contains the identification information of the virtual machine that needs to be migrated, such as the ID of the virtual machine, and the ID of the virtual machine is unique before and after migration, therefore, when step 3001 is executed, the identification information of the first virtual machine can be obtained from the notification message, so as to subsequently query the second virtual machine from the locally saved forwarding flow table.

[0118] Step 3002: Based on the identification information, each candidate identification information that has a traffic forwarding relationship with the identification information of the first virtual machine is queried from the forwarding flow table.

[0119] Under the related art, each virtual machine can receive the traffic of other virtual machines, and can also forward the received traffic to other virtual machines, so that each candidate identification information that has a bidirectional traffic forwarding relationship with the first virtual machine is contained in the locally saved forwarding flow table. Therefore, in the embodiments of the present application, when step 3002 is executed, each candidate identification information is queried from the forwarding flow table.

[0120] Step 3003: From the virtual machines corresponding to the respective candidate identification information, a virtual machine that needs to forward the received traffic to the first virtual machine is selected, and each selected virtual machine is determined as a second virtual machine.

[0121] In the embodiments of the present application, when step 3003 is performed, the virtual machine that needs to forward the received traffic to the first virtual machine is selected from the virtual machines corresponding to the respective candidate identification information that is queried, and the virtual machine is determined as the second virtual machine.

[0122] Step 310: The first entry is sent to the host virtual switch accessed by the second virtual machine, for notifying the host virtual switch to forward the traffic to the target virtual switch accessed by the first virtual machine after migration.

[0123] In the embodiments of the present application, since multiple second virtual machines may be selected when step 3003 is performed, the first entry needs to be sent to the host virtual switch accessed by each second virtual machine when step 310 is performed, so as to ensure that the network layer service is not interrupted.

[0124] In this way, after step 310 is performed, each second virtual machine that needs to forward the received traffic to the first virtual machine forwards the traffic to the original virtual switch accessed by the first virtual machine before migration and the target virtual switch accessed by the first virtual machine after migration based on the original network layer forwarding entry and the first entry when the traffic is received, thereby avoiding network layer service interruption.

[0125] It should be noted that in some possible embodiments, the first virtual machine may be in the process of migration, and the first virtual machine may not be in the original virtual switch and / or the target virtual switch, at this time, the received traffic may also be discarded, but the packet loss at this time belongs to the computing layer packet loss, not the network layer service interruption category, and generally the migration process of the virtual machine takes a short time and does not cause great loss to the service.

[0126] Step 320: After receiving the first virtual machine migration completion message, the indication information is sent to the host virtual switch, for notifying the host virtual switch to cancel sending the traffic to the original virtual switch accessed by the first virtual machine before migration.

[0127] In the embodiments of the present application, when step 320 is performed, after receiving the first virtual machine migration completion message, the host virtual switch is notified to cancel sending the traffic to the original virtual switch accessed by the first virtual machine before migration, which specifically includes but is not limited to the following two ways:

[0128] In the first way, the second entry is sent to the host virtual switch, for notifying the host virtual switch to update the locally saved forwarding entry to cancel sending the traffic to the original virtual switch.

[0129] In a second mode, a deletion instruction is sent to the host virtual switch, used to inform the host virtual switch to delete the target entry, wherein the target entry is the forwarding entry sent to the original virtual switch for the flow.

[0130] After the processing flow of the SDN controller is introduced, the processing flow of the host virtual switch (hereinafter referred to as "virtual switch in network device") accessed by the second virtual machine corresponding to the SDN controller is introduced.

[0131] In the embodiment of the present application, referring to Figure 6 As shown in the figure, a control method for virtual machine live migration is provided, applied to a virtual switch in a network device, and the specific flow of the method is as follows:

[0132] Step 500: receiving the first entry sent by the SDN controller, wherein the first entry is sent by the SDN controller based on the received notification message that the first virtual machine needs to be migrated, and the determination that the second virtual machine connected to the virtual switch needs to forward the received flow to the first virtual machine.

[0133] Step 510: after receiving the flow, copying the flow based on the first entry, and forwarding the copied flow to the target virtual switch accessed by the first virtual machine after migration.

[0134] Currently, since the forwarding entry saved locally by the virtual switch accessed by the second virtual machine contains the forwarding entry of the original virtual switch accessed by the first virtual machine before migration, the virtual switch will still forward the received flow to be forwarded to the first virtual machine to the original virtual switch accessed by the first virtual machine before migration.

[0135] But in the embodiment of the present application, since the SDN controller receives the notification message that the first virtual machine needs to be migrated, determines that the second virtual machine connected to the virtual switch needs to forward the received flow to the first virtual machine, and then sends the first entry to the virtual switch, the virtual switch accessed by the second virtual machine receives the flow, and according to the forwarding entry saved locally, knows that the flow needs to be forwarded to the original virtual switch accessed by the first virtual machine before migration and the target virtual switch accessed by the first virtual machine after migration, so the virtual switch accessed by the second virtual machine will copy the flow, forward the flow to the original virtual switch accessed by the first virtual machine before migration, and forward the copied flow (i.e. the flow copy) to the target virtual switch accessed by the first virtual machine after migration; or forward the flow copy to the original virtual switch accessed by the first virtual machine before migration, and forward the flow to the target virtual switch accessed by the first virtual machine after migration.

[0136] Step 520: receiving the indication information sent by the SDN controller, which is used to inform the virtual switch to cancel sending the traffic to the original virtual switch accessed by the first virtual machine before migration.

[0137] In the embodiment of the present application, when step 520 is executed, the above-mentioned function is specifically implemented in the following two ways, but is not limited to the following two ways:

[0138] Way 1: receiving the second table item sent by the SDN controller, and updating the locally saved forwarding table item based on the second table item, so as to cancel sending the traffic to the original virtual switch.

[0139] Way 2: receiving the deletion instruction sent by the SDN controller, and deleting the target table item based on the deletion instruction, wherein the target table item is the forwarding table item for sending the traffic to the original virtual switch.

[0140] After introducing the specific execution process of each single side, referring to FIG. 6, Figure 7 As shown in FIG. 6, in the embodiment of the present application, the complete interaction process of virtual machine live migration is as follows:

[0141] Firstly, the user triggers a first virtual machine live migration task through a client to Nova, and creates the first virtual machine live migration task.

[0142] Step 600: Nova sends a port creation request to Neutron, which is used to inform the target virtual switch accessed after the first virtual machine migration to create an OpenvSwitch (ovs) port of the first virtual machine accessing the target virtual switch.

[0143] Step 601: Neutron forwards the port creation request to the SDN controller.

[0144] Step 602: the SDN controller forwards the port creation request to the target virtual switch accessed after the first virtual machine migration.

[0145] Step 603: Nova sends a notification message of needing to migrate the first virtual machine to Neutron.

[0146] Step 604: Neutron forwards the notification message of needing to migrate the first virtual machine to the SDN controller.

[0147] Step 605: the SDN controller determines at least one second virtual machine based on the notification message, wherein the second virtual machine is a virtual machine that needs to forward the received traffic to the first virtual machine.

[0148] Step 606: The SDN controller sends a first table item to the host virtual switch to which the second virtual machine is accessed, for informing the host virtual switch to send traffic to a target virtual switch to which the first virtual machine is accessed after migration.

[0149] Step 607: The SDN controller sends update completion acknowledgement information to the Neutron.

[0150] Step 608: The Neutron forwards the update completion acknowledgement information to the Nova.

[0151] Step 609: The Nova connects the first virtual machine to an ovs port of the target virtual switch and enables the ovs port.

[0152] Step 610: The Nova sends a first virtual machine migration completion message to the Neutron.

[0153] Step 611: The Neutron forwards the first virtual machine migration completion message to the SDN controller.

[0154] Step 612: The SDN controller sends indication information to the host virtual switch, for informing the host virtual switch to cancel sending traffic to an original virtual switch to which the first virtual machine is accessed before migration.

[0155] Step 613: The SDN controller sends update completion acknowledgement information to the Neutron.

[0156] Step 614: The Neutron forwards the update completion acknowledgement information to the Nova.

[0157] It should be noted that, Figure 7 The network layer also omits feedback of the acknowledgement information after performing the operation, and omits the operation of the Nova for the first virtual machine hot migration (including hard disk copying, memory copying, etc.) between step 608 and step 609. The above part can be performed by using related technologies, and will not be described here.

[0158] After introducing the complete interaction flow of the control method for the virtual machine hot migration, Figure 8 Fig. 6 shows a traffic path schematic diagram after the control method for the virtual machine hot migration provided by the embodiment of the present application is used.

[0159] For example, referring to Fig. 6, Figure 8 It is shown that the first virtual machine is a virtual machine which needs to be migrated from the compute node 2 to the compute node 3.

[0160] Assuming that the first virtual machine before migration accesses OpenvSwitch2 in the computing node 2, and the first virtual machine after migration accesses OpenvSwitch3 in the computing node 3; the second virtual machine accesses OpenvSwitch1 in the computing node 1, and the second virtual machine needs to forward the received traffic to the first virtual machine.

[0161] In the embodiment of the application, the second virtual machine sends the traffic to OpenvSwitch1, and OpenvSwitch1 learns from the locally saved forwarding table item that the traffic needs to be forwarded to OpenvSwitch2 and OpenvSwitch3, and therefore, OpenvSwitch1 copies the traffic to obtain a traffic copy, forwards the traffic to OpenvSwitch2, and forwards the traffic copy to OpenvSwitch3.

[0162] Then, OpenvSwitch2 sends the received traffic to the first virtual machine according to the local forwarding table item, and OpenvSwitch3 sends the received traffic copy to the first virtual machine according to the local forwarding table item.

[0163] In this way, the control method for virtual machine live migration provided by the embodiment of the application realizes zero packet loss at the network layer during the virtual machine live migration process, thereby ensuring that the network layer service does not interrupt.

[0164] Based on the same inventive concept, refer to Figure 9 As shown in the figure, the embodiment of the application provides a control device for virtual machine live migration, which is applied to a software-defined network (SDN) controller, and the device comprises:

[0165] A determination module 801 is configured to, after receiving a notification message that a first virtual machine needs to be migrated, determine at least one second virtual machine based on the notification message, wherein the second virtual machine is a virtual machine that needs to forward received traffic to the first virtual machine.

[0166] A sending module 802 is configured to send a first table item to a host virtual switch accessed by the second virtual machine, to notify the host virtual switch to forward the traffic to a target virtual switch accessed by the first virtual machine after migration.

[0167] In some possible embodiments, the sending module 802 is further configured to:

[0168] After sending the first table item to the host virtual switch accessed by the second virtual machine, the sending module 802 is further configured to, after receiving a first virtual machine migration completion message, send indication information to the host virtual switch, to notify the host virtual switch to cancel sending the traffic to an original virtual switch accessed by the first virtual machine before migration.

[0169] In some possible embodiments, the sending module 802 is specifically configured to:

[0170] send a second table item to the host virtual switch, for notifying the host virtual switch to update a locally saved forwarding table item to cancel sending the traffic to the original virtual switch; or

[0171] send a deletion instruction to the host virtual switch, for notifying the host virtual switch to delete a target table item, the target table item being a forwarding table item for sending the traffic to the original virtual switch.

[0172] In some possible embodiments, the determining module 801 is specifically configured to:

[0173] obtain identification information of the first virtual machine from the notification message;

[0174] based on the identification information, query each candidate identification information having a traffic forwarding relationship with the identification information of the first virtual machine from a forwarding flow table;

[0175] from virtual machines corresponding to the each candidate identification information, select a virtual machine that needs to forward the received traffic to the first virtual machine, and determine each selected virtual machine as the second virtual machine.

[0176] Based on the same inventive concept, refer to Figure 10 The embodiment of the present application provides a virtual machine live migration control device, which is applied to a virtual switch located in a network device, and the device comprises:

[0177] a receiving module 901 configured to receive a first table item sent by a software defined network (SDN) controller, wherein the first table item is sent by the SDN controller after determining that a second virtual machine connected to the virtual switch needs to forward received traffic to a first virtual machine based on a received notification message that the first virtual machine needs to be migrated;

[0178] a forwarding module 902 configured to, after receiving the traffic, copy the traffic based on the first table item, and forward the copied traffic to a target virtual switch to which the first virtual machine is connected after migration.

[0179] In some possible embodiments, the receiving module 901 is further configured to:

[0180] receive indication information sent by the SDN controller, for notifying the virtual switch to cancel sending the traffic to an original virtual switch to which the first virtual machine is connected before migration.

[0181] In some possible embodiments, the receiving module 901 is specifically configured to:

[0182] receive the second table item sent by the SDN controller, and update the locally saved forwarding table item based on the second table item, so as to cancel sending the traffic to the original virtual switch; or

[0183] receive a deletion instruction sent by the SDN controller, and delete a target table item based on the deletion instruction, the target table item being a forwarding table item for sending the traffic to the original virtual switch.

[0184] Referring to Figure 11 , the embodiment of the present application provides a network device, which comprises a memory 1001 and a processor 1002, and specifically:

[0185] The memory 1001 is configured to store computer programs or instructions.

[0186] The processor 1002 is configured to execute the computer programs or instructions in the memory, so as to implement any one of the methods in the above embodiments.

[0187] The embodiment of the present application does not limit the specific connection medium between the memory 1001 and the processor 1002. In the embodiment of the present application, the memory 1001 and the processor 1002 are connected through a bus 1000, and the bus 1000 is represented by a thick line in Figure 11 , and the connection mode between other components is only schematically illustrated and is not limited. The bus 1000 can be divided into an address bus, a data bus, a control bus and the like. For convenience of representation, Figure 11 , only one thick line is used to represent, but it does not mean that there is only one bus or only one type of bus. Figure 11

[0188] The memory 1001 can be a volatile memory (volatile memory), such as random access memory (English: random-access memory, abbreviation: RAM); the memory 1001 can also be a non-volatile memory (non-volatile memory), such as read-only memory, flash memory, hard disk (English: hard disk drive, abbreviation: HDD) or solid-state disk (English: solid-state drive, abbreviation: SSD), or the memory 1001 is any other medium capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by a computer, but is not limited to this. The memory 1001 can be a combination of the above-mentioned memories.

[0189] ​Based on the same inventive concept, the embodiment of the present application provides a computer readable storage medium, which stores computer program instructions, and the computer program instructions are executed by a processor to implement any one of the methods in the above embodiments.

[0190] Those skilled in the art will appreciate that embodiments of the present application can be provided as methods, systems, or computer program products. Accordingly, the present application can be embodied in the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application can be embodied in the form of a computer program product on one or more computer readable storage media (including, but not limited to, disk memory, CD-ROM, optical memory, etc.) having computer usable program code embodied thereon.

[0191] The present application is described with reference to flowcharts and / or block diagrams of the method, device (system), and computer program product according to the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as combinations of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce the functions specified in the flowchart or flows and / or blocks in the block diagram.

[0192] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including instruction devices, which implement the functions specified in the flowchart or flows and / or blocks in the block diagram.

[0193] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are performed on the computer or other programmable device to produce a computer implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in the flowchart or flows and / or blocks in the block diagram.

[0194] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for controlling virtual machine hot migration, characterized in that, Applications in software-defined networking (SDN) controllers include: Upon receiving a notification message indicating that the first virtual machine needs to be migrated, at least one second virtual machine is determined based on the notification message; wherein the second virtual machine is the virtual machine that needs to forward the received traffic to the first virtual machine; Send a first entry to the host virtual switch to which the second virtual machine is connected, to notify the host virtual switch to forward the traffic to the target virtual switch to which the first virtual machine is connected after migration.

2. The method as described in claim 1, characterized in that, After sending the first entry to the host virtual switch accessed by the second virtual machine, the method further includes: After receiving the message indicating that the migration of the first virtual machine is complete, an instruction message is sent to the host virtual switch to notify the host virtual switch to stop sending the traffic to the original virtual switch that the first virtual machine was connected to before the migration.

3. The method as described in claim 2, characterized in that, Sending indication information to the host virtual switch includes: Send a second entry to the host virtual switch to notify it to update its locally stored forwarding table entries, thereby canceling the transmission of the traffic to the original virtual switch; or, A deletion command is sent to the host virtual switch to notify the host virtual switch to delete the target entry, which is the forwarding entry that sends the traffic to the original virtual switch.

4. The method according to any one of claims 1-3, characterized in that, The step of determining at least one second virtual machine based on the notification message includes: Obtain the identification information of the first virtual machine from the notification message; Based on the identification information, query the forwarding flow table for each candidate identification information that has a traffic forwarding relationship with the identification information of the first virtual machine; From the virtual machines corresponding to each candidate identifier information, select the virtual machine that needs to forward the received traffic to the first virtual machine, and determine each selected virtual machine as the second virtual machine.

5. A method for controlling virtual machine hot migration, characterized in that, Virtual switches used in network devices include: The system receives a first entry sent by the Software Defined Network (SDN) controller, wherein the first entry is sent after the SDN controller determines, based on a received notification message indicating that the first virtual machine needs to be migrated, that the second virtual machine connected to the virtual switch needs to forward the received traffic to the first virtual machine. Upon receiving the traffic, the traffic is copied based on the first entry, and the copied traffic is forwarded to the target virtual switch accessed after the first virtual machine migration.

6. The method as described in claim 5, characterized in that, The method further includes: The system receives an instruction from the SDN controller to notify the virtual switch to cancel sending the traffic to the original virtual switch that the first virtual machine was connected to before its migration.

7. The method as described in claim 6, characterized in that, The receipt of the indication information sent by the SDN controller includes: The system receives a second entry from the SDN controller and updates the locally stored forwarding table entry based on the second entry to cancel sending the traffic to the original virtual switch; or, The system receives a deletion command sent by the SDN controller and deletes the target entry based on the deletion command. The target entry is a forwarding table entry that sends the traffic to the original virtual switch.

8. A control device for virtual machine hot migration, characterized in that, The device, applied to a software-defined networking (SDN) controller, includes: The determining module is configured to, upon receiving a notification message indicating that a first virtual machine needs to be migrated, determine at least one second virtual machine based on the notification message; wherein the second virtual machine is the virtual machine that needs to forward the received traffic to the first virtual machine; The sending module is used to send a first entry to the host virtual switch to which the second virtual machine is connected, instructing the host virtual switch to forward the traffic to the target virtual switch to which the first virtual machine is connected after migration.

9. A control device for virtual machine hot migration, characterized in that, The device, used in a virtual switch located in a network device, includes: The receiving module is used to receive a first entry sent by the software-defined networking (SDN) controller, wherein the first entry is sent after the SDN controller determines, based on the received notification message that the first virtual machine needs to be migrated, that the second virtual machine connected to the virtual switch needs to forward the received traffic to the first virtual machine; The forwarding module is used to, upon receiving the traffic, copy the traffic based on the first entry, and forward the copied traffic to the target virtual switch accessed after the first virtual machine migration.

10. A network device, characterized in that, The network device includes a processor and a memory. The memory is used to store computer programs or instructions; The processor is configured to execute a computer program or instructions in memory such that the method described in any one of claims 1-4, 5-7 is performed.

11. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the steps of the method as described in any one of claims 1-4, 5-7.

Citation Information

Patent Citations

  • Method and device for preventing package loss in thermal transferring and forwarding process of virtual machine

    CN104468397A

  • Virtual machine migration method, SDN controller and computer readable storage medium

    CN108964949A