A method and device for determining virtual machine migration

By synchronizing ARP Cache table information and host routing between VTEP devices, using ARP unicast request messages and response messages to determine the virtual machine migration situation, the problem of perceived delay after virtual machine migration is solved, and network routing convergence speed and virtualization are improved Machine configuration compatibility.

CN112486626BActive Publication Date: 2024-11-19HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202011270957.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2016-08-30
Publication Date
2024-11-19
Estimated Expiration
2036-08-30

AI Technical Summary

Technical Problem

In a multi-tenant environment of cloud computing, the existing technology cannot quickly and accurately perceive the migration situation after virtual machine migration, resulting in network routing convergence delay.

Method used

By synchronizing ARP Cache table information and host routing between VTEP devices, using ARP unicast request messages and response messages to determine the virtual machine migration situation, avoiding relying on virtual machines to send free ARP messages, and achieving rapid awareness of migration in migrated devices.

Benefits of technology

Improves the compatibility of virtual machine configuration and network routing convergence speed, ensuring that the migration device after virtual machine migration can be sensed in time and avoid network delays.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112486626B_ABST
    Figure CN112486626B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a method and apparatus for determining the migration of a virtual machine VM. The method includes: after the VM is migrated, the migrating device obtains the MAC address of the VM through the local interface, and the migrating device determines that the VM has been migrated if it has previously learned the MAC address from the migrating device. The method further includes: the migrating device sends an ARP request to the VM, and in response to receiving a response from the VM, further confirms that the VM has migrated. According to the method provided by the embodiments of the present application, when the VM is migrated, the migrating device of the VM only needs to obtain the MAC address of the VM to determine that the VM has migrated. The migrating device does not have to be limited to the virtual machine sending a free ARP message to perceive the VM migration, which effectively improves the compatibility with the virtual machine configuration.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the Chinese patent application with application number 201610777000.1 and application date of August 30, 2016 submitted to the State Intellectual Property Office of China. Technical Field

[0002] The present application relates to the field of communication technology, and in particular to a method and device for determining virtual machine (English: Virtual Machine, VM) migration. Background Art

[0003] In a multi-tenant environment of cloud computing, each tenant needs to be assigned a logical network that can be well isolated from other logical networks. The isolation of logical networks can be achieved through Virtual Extensible Local Area Network (VXLAN) technology. VXLAN networks are identified by 24-bit VXLAN network identifiers (VNI).

[0004] Generally, VXLAN is deployed in a data center (DC) network, and the VXLAN tunnel endpoint (VTEP) is responsible for encapsulating and decapsulating VXLAN messages. VTEPs communicate with each other through VXLAN tunnels.

[0005] With the extensive use of server virtualization technology in DC, virtual machine (English: Virtual Machine, VM) migration is often performed in DC. In the prior art, when a virtual machine migrates from a first VTEP to a second VTEP, the VM sends a free Address Resolution Protocol (English: Address Resolution Protocol, ARP) message to the second VTEP. The second VTEP learns the host route of the VM through free ARP, and compares the learned host route of the VM with the Ethernet Virtual Private Network (English: Ethernet Virtual Private Network, EVPN) integrated routing and bridging (English: Integrated Routing and Bridging, IRB) route previously obtained from the first VTEP to determine whether the VM has migrated.

[0006] As can be seen from the above, in the prior art, the VM is relied on to send a free ARP message to sense the migration of the virtual machine. However, at present, many manufacturers do not send a free ARP message after the VM is migrated, but instead send a Reverse Address Resolution Protocol (RARP) message. The RARP message only carries the Media Access Control (MAC) address of the virtual machine. In the prior art, the migrated VTEP cannot confirm the migration of the virtual machine based on the RARP message.

[0007] Furthermore, in the prior art, the VTEP from which the virtual machine is migrated cannot quickly sense the migration of the connected virtual machine, thereby causing the network to be unable to perform routing convergence in a timely manner. Summary of the invention

[0008] The embodiments of the present application provide a method, apparatus and system for determining virtual machine migration, so that after the VM migration, the migrating device does not need to be limited to the virtual machine sending a free ARP message to sense the VM migration, which effectively improves the compatibility of the virtual machine configuration. Furthermore, the migrating device can quickly and accurately sense the virtual machine migration.

[0009] In the first aspect, an embodiment of the present application provides a method for determining the migration of a virtual machine VM. First, a first VTEP device obtains a MAC address of the VM from a first interface. The first interface is connected to an access circuit AC, and the first interface may be, for example, an eth1 interface of a VTEP. The first VTEP device uses the MAC address as a keyword to search the ARP cache table stored by the first VTEP device. According to the result of the table lookup, it is determined that the ARP Cache table records that the VM is connected to a second VTEP device. The first VTEP device obtains the Internet Protocol (English: Internet Protocol, IP) address of the VM according to the ARP Cache table, and constructs an ARP unicast request message with the IP address as the destination IP address. The ARP unicast request message is sent to the above-mentioned first interface. If the first VTEP device receives an ARP response message sent by the VM for the ARP unicast request message from the first interface, it is determined that the VM has migrated. That is, the VM is migrated from other VTEP devices to the first VTEP device.

[0010] It can be seen that according to the method provided in the embodiment of the present application, when a VM is migrated, the VM's migration device only needs to obtain the VM's MAC address, and can obtain the VM's IP address by searching the ARP Cache table, and further determine whether the VM has migrated through ARP learning. After the VM is migrated, the migration device does not need to be limited to the VM sending a free ARP message to sense the VM migration, which effectively improves the compatibility of the virtual machine configuration.

[0011] In combination with the first aspect, in a first possible implementation of the first aspect, the method also includes: the first VTEP device generates a host route of the VM according to the ARP unicast request message or the ARP response message, and synchronizes the host route of the VM to other VTEP devices.

[0012] By synchronizing the host routes of the virtual machines connected to each other between VTEP devices, each VTEP device obtains the host routes of all the virtual machines connected to the opposite VTEP devices, which can speed up the convergence of network routes.

[0013] In combination with the first aspect and the above-mentioned possible implementation methods, in a second possible implementation method of the first aspect, after the first VTEP device determines that the VM has migrated, the first VTEP device updates the ARP Cache table entry information corresponding to the VM according to the IP address of the VTEP accessed after the VM migrates, and synchronizes the ARP Cache table entry information to other VTEP devices.

[0014] By synchronizing ARP Cache table information between VTEP devices, each VTEP device obtains the ARP Cache table information saved by all peer VTEP devices, and then obtains the routing information of the access virtual machines saved by all peer VTEP devices. When the virtual machine migrates, the migration of the virtual machine can be quickly and accurately perceived by searching the ARP Cache table.

[0015] In combination with the first aspect and the above-mentioned possible implementation methods, in a third possible implementation method of the first aspect, the first VTEP device obtains the MAC address of the VM based on the Reverse Address Resolution Protocol RARP message or the Free ARP message sent by the VM and received by the first interface.

[0016] In the second aspect, an embodiment of the present application provides a method for determining the migration of a virtual machine VM. First, the second VTEP device receives the ARP Cache table entry information corresponding to the VM sent by the first VTEP device. According to the received ARP Cache table entry information, the second VTEP device determines that the ARP Cache table entry information records that the VM is connected to the first VTEP device. The second VTEP device determines that the ARP Cache table stored by the second VTEP device records that the VM is a local host connected to the second VTEP device. That is, the second VTEP device receives the ARP Cache table entry information sent by the first VTEP device, which records that the VM is connected to the first VTEP device, but the record in the table stored by the second VTEP device itself is: the VM is a local device connected to itself. As a result, the second device obtains the IP address of the VM, and can obtain the IP address through the ARP Cache table stored by itself, or obtain the IP address through the ARP Cache table entry information sent by the first VTEP device. After the second device obtains the IP address of the VM, it constructs and sends an ARP unicast request message with the IP address as the destination IP address. If the second VTEP device does not receive the ARP response message sent by the VM for the ARP unicast request message within a predetermined time, the VM of the second VTEP device is migrated, that is, the VM is migrated out by the second VTEP device.

[0017] Through the method provided in this embodiment, after receiving the ARP Cache entry information sent by all peer devices, the VTEP device triggers the VTEIP device to determine whether the virtual machine has migrated, thereby being able to quickly and accurately perceive the virtual machine migration.

[0018] In combination with the second aspect, in a first possible implementation of the second aspect, after the second VTEP device determines that the VM has migrated, the second VTEP device deletes the ARP table entry corresponding to the VM in the ARP table stored in the second VTEP device itself.

[0019] When the second VTEP device does not receive the second ARP response message within a predetermined time, the ARP entry corresponding to the first VM is deleted from the ARP table stored in the second VTEP device itself, without having to wait until the ARP entry aging time is reached, thereby saving the ARP table resources occupied by the ARP entry information.

[0020] In combination with the second aspect and the above possible implementations, in a second possible implementation of the second aspect, after the second VTEP device determines that the VM has migrated, the second VTEP device cancels the host route of the VM pointing to the second VTEP device and sends control information to other VTEP devices. The control information is used to instruct the other VTEP devices to cancel the host route of the VM pointing to the second VTEP device.

[0021] Therefore, when the VTEP device confirms that the host device connected to itself has migrated, the host route of the migrated virtual machine is revoked, and the host route of the migrated virtual machine is revoked to other VTEP devices, thereby accelerating the speed of route convergence.

[0022] In combination with the second aspect and the above-mentioned possible implementation methods, in a third possible implementation method of the second aspect, after the second VTEP device determines that the VM has migrated, the second VTEP device uses the ARP Cache table entry information sent by the first VTEP device to update the ARP Cache table corresponding to the VM in the ARP Cache table saved by the second VTEP device.

[0023] After obtaining the synchronized ARP Cache table information sent by the peer VTEP device, the VTEP device updates its own ARP Cache table information and updates the host routes of all access virtual machines saved by the peer VTEP devices in real time. When the virtual machine migrates, it can quickly and accurately perceive the migration of the virtual machine by searching the ARP Cache table, thereby accelerating the convergence of routes.

[0024] In a third aspect, an embodiment of the present application provides a device for determining virtual machine migration, which is used to execute the method in the first aspect or any possible implementation of the first aspect. Specifically, the device includes a module for executing the method in the first aspect or any possible implementation of the first aspect.

[0025] In a fourth aspect, an embodiment of the present application provides a device for determining virtual machine migration, which is used to execute the method in the second aspect or any possible implementation of the second aspect. Specifically, the device includes a module for executing the method in the second aspect or any possible implementation of the second aspect.

[0026] In a fifth aspect, an embodiment of the present application provides a communication system, comprising the device provided in the third aspect and the device provided in the fourth aspect.

[0027] In a sixth aspect, an embodiment of the present application provides a device for determining virtual machine migration, the device comprising: an input interface, an output interface, a processor, and a memory. The input interface, the output interface, the processor, and the memory may be connected via a bus system. The memory is used to store programs, instructions, or codes, and the processor is used to execute the programs, instructions, or codes in the memory to complete the method in the first aspect or any possible implementation of the first aspect.

[0028] In a seventh aspect, an embodiment of the present application provides a device for determining virtual machine migration, the device comprising: an input interface, an output interface, a processor, and a memory. The input interface, the output interface, the processor, and the memory may be connected via a bus system. The memory is used to store programs, instructions, or codes, and the processor is used to execute the programs, instructions, or codes in the memory to complete the method in the second aspect or any possible implementation of the second aspect.

[0029] In an eighth aspect, an embodiment of the present application provides a communication system, comprising the device provided in the sixth aspect and the device provided in the seventh aspect.

[0030] In a ninth aspect, the present application provides an embodiment of a computer-readable storage medium for storing a computer program for executing instructions of the method in the first aspect, the second aspect, any possible implementation of the first aspect, or any possible implementation of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0032] Figure 1 This is a schematic diagram of an application scenario related to an embodiment of the present application;

[0033] Figure 2 A flow chart of a method for determining virtual machine migration involved in an embodiment of the present application;

[0034] Figure 3 Another method flow chart for determining virtual machine migration according to an embodiment of the present invention

[0035] Figure 4 A schematic diagram of the structure of a device for determining virtual machine migration provided in an embodiment of the present application;

[0036] Figure 5A schematic diagram of the structure of another device for determining virtual machine migration provided in an embodiment of the present application;

[0037] Figure 6 A schematic diagram of the hardware structure of a device for determining virtual machine migration provided in an embodiment of the present application;

[0038] Figure 7 A schematic diagram of the hardware structure of another device for determining virtual machine migration provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] The following will describe the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.

[0040] The application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. A person skilled in the art will appreciate that, with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0041] Unless otherwise specified, ordinal numbers such as "first" and "second" mentioned in the embodiments of the present application are used to distinguish multiple objects, and are not used to limit the order of multiple objects. Figure 1 The application scenarios of the embodiments of the present application are described exemplarily.

[0042] Figure 1 The VXLAN network 100 used in the embodiment of the present application is shown as an example. The network 100 includes core layer devices spine1 and spine2, and access layer devices leaf1, leaf2, and leaf3; wherein the core layer devices spine1 and spine2 are not aware of the VXLAN network service and are only used to forward Internet Protocol IP packets. The access layer devices leaf1, leaf2, and leaf3 are edge nodes of the VXLAN network 100, which are used to access the user's virtual machine. Figure 1It can be seen that VM1 and VM2 access the VXLAN network 100 through leaf1, and VM3 accesses the VXLAN network 100 through leaf3. Leaf1, leaf2, and leaf3 serve as VTEPs of the VXLAN network. VXLAN Layer 3 gateways are deployed on leaf1, leaf2, and leaf3, respectively. VXLAN tunnels are established between the three VXLAN Layer 3 gateways, and the host routes of the VMs that access the VXLAN network 100 through themselves are published to other BGP neighbors through the Border Gateway Protocol (BGP), thereby realizing mutual communication between VMs across leaf nodes. Optionally, the three VXLAN Layer 3 gateways all deploy the Intermediate System to Intermediate System (ISIS) protocol, and carry the host routes of the VMs that access the VXLAN network 100 through themselves through the link state protocol data unit (LSP) message to other VXLAN Layer 3 gateway devices, thereby realizing mutual communication between VMs across leaf nodes.

[0043] Figure 1 In the figure, the IP address of VM1 is IP_1, and the Media Access Control (MAC) address is MAC_1; the IP address of VM2 is IP_2, and the MAC address is MAC_2; the IP address of VM3 is IP_3, and the MAC address is MAC_3. The IP address of the VTEP of leaf1 used to access the host device is VTEP_1. The IP address of the VTEP of leaf2 used to access the host device is VTEP_2. The IP address of the VTEP of leaf3 used to access the host device is VTEP_3. The host device can be a VM, a server, or a personal computer (PC) and other devices with their own IP address and MAC address.

[0044] Figure 2 A method 200 for determining virtual machine VM migration provided by an embodiment of the present application is exemplarily shown. The method 200 can be applied to Figure 1 The VXLAN network 100 is shown, but the embodiments of the present application are not limited thereto.

[0045] S201. A first VTEP device obtains a first MAC address of a first VM from a first interface of the first VTEP device.

[0046] The first VTEP device may be used to connect the first VM to a VXLAN network. Figure 1 The first VM may be Figure 1 VM1 is shown. The first interface is connected to an attachment circuit (AC). For example, the first interface may be the eth1 interface of leaf3. This embodiment of the present application does not specifically limit this.

[0047] In a specific implementation, the first VTEP device receives a gratuitous ARP message sent by the first VM, and the gratuitous ARP message carries the first MAC address of the first VM. The first VTEP device obtains the first MAC address from the gratuitous ARP message. Specifically, when VM1 migrates from leaf1 to leaf3, VM1 sends a gratuitous ARP message, and the gratuitous ARP message includes the MAC address of VM1. Leaf3 receives the gratuitous ARP message sent by VM1 from the eth1 interface and obtains the MAC address of VM1.

[0048] In another specific implementation, the first VTEP device receives a RARP message sent by the first VM, and the RARP message carries the first MAC address of the first VM. The first VTEP device obtains the first MAC address from the RARP message. Specifically, when VM1 migrates from leaf1 to leaf3, VM1 sends a RARP message, and leaf3 receives the RARP message sent by VM1 from the eth1 interface to obtain the MAC address of VM1.

[0049] S202: The first VTEP device determines that the ARP Cache table stored in the first VTEP device records that the VM is connected to the second VTEP device.

[0050] Specifically, the first VTEP device performs an ARP Cache table search in its own stored Address Resolution Protocol Cache ARP Cache table based on the first MAC address and using the first MAC address as a keyword to determine that its own stored ARP Cache table records that the VM accesses the second VTEP device.

[0051] The second VTEP device may specifically be Figure 1 Leaf1 shown.

[0052] The ARP Cache table includes: the IP address of the host device connected to the VTEP device, the MAC address of the host device, the VXLAN network identifier (English: VXLAN Network Identifier, VNI) to which the host device belongs, and the IP address of the VTEP to which the host device is connected. The VTEP device synchronizes the table entry information of the ARP Cache table generated and saved by itself to other VTEP devices through the BGP protocol. On the VTEP device, by querying the ARP Cache table, you can know which VTEP other hosts are distributed on and the IP address, MAC address and other information of the host.

[0053] The basic format of the ARP Cache table may be shown in Table 1:

[0054] IP MAC VNI VTEP IP_1 MAC_1 1000 VTEP_1 IP_2 MAC_2 1000 VTEP_1 IP_3 MAC_3 1000 VTEP_3

[0055] Table 1

[0056] Among them, the "IP" field indicates the IP address of the host device connected to the VTEP; the "MAC" field indicates the MAC address of the host device; the "VNI" field indicates the VXLAN network identifier to which the host device belongs;

[0057] The "VTEP" field indicates the IP address of the VTEP to which the host device accesses.

[0058] Combine the following Figure 1 Table 1 is further explained as follows: Table 1 is specifically the ARP Cache table stored on leaf3. Table 1 contains the IP addresses, MAC addresses, VNIs and IP addresses of the connected VTEPs of VM1-VM3. Leaf3 can determine that VM3 is a local host connected to itself, while VM1 and VM2 are remote hosts connected to other VTEP devices, based on the IP addresses of the VTEPs connected to VM1, VM2 and VM3.

[0059] The basic format of the ARP Cache table can also be shown in Table 2:

[0060] IP MAC VNI VTEP FLAG IP_1 MAC_1 1000 VTEP_1 remote IP_2 MAC_2 1000 VTEP_1 remote IP_3 MAC_3 1000 VTEP_3 local

[0061] Table 2

[0062] For the common field descriptions of Table 2 and Table 1, please refer to the description of Table 1 and will not be repeated here. The difference between Table 2 and Table 1 is that the ARP Cache table also includes a "FLAG" field. In Table 2, the "FLAG" represents identification information, which is used to identify whether the host device is a local host or a remote host relative to the local VTEP device, where "remote" is used to identify that the host device is a remote host relative to the local VTEP device, and "local" is used to identify that the host device is a local host relative to the local VTEP device.

[0063] Combination Figure 1 Table 2 is specifically the ARP Cache table stored on leaf3. Leaf3 node searches the ARP Cache table to determine that in the ARP Cache table entry corresponding to VM3, "FLAG" is displayed as "local", while in the ARP Cache table entries corresponding to VM1 and VM2, "FLAG" is displayed as "remote", thereby determining that VM3 is the local host connected to leaf3 itself, while VM1 and VM2 are remote hosts.

[0064] After VM1 migrates from leaf1 to leaf3, leaf3 receives the free ARP message or RARP message sent by VM1 from the eth1 interface and obtains the MAC address of VM1. Leaf3 uses the MAC address of VM1 as a keyword to search in the ARP Cache table saved by leaf3. According to the "VTEP" or "FLAG" of VM1 access recorded in the ARP Cache table, it can be determined that the ARP Cache table records VM1 access to other VTEP devices, that is, non-local host devices.

[0065] Those skilled in the art will appreciate that Table 1 and Table 2 are only used to exemplify the form of the ARP Cache table, and the embodiments of the present application do not specifically limit this.

[0066] In the following, the ARP Cache table stored in each VTEP device in the embodiment of the present application is described in the form of Table 2 as an example.

[0067] S203. The first VTEP device obtains a first IP address of the first VM.

[0068] Specifically, after S202, leaf3 uses the first MAC address as a keyword to search the ARPCache table stored locally in leaf3, hits the ARP Cache table entry storing the first MAC address, and then obtains the first IP address from the hit ARP Cache table entry.

[0069] S204. The first VTEP device generates and sends a first ARP unicast request message using the first IP address as the destination IP address.

[0070] When the first VTEP device receives the free ARP message or RARP message sent by the first VM from the first interface, it obtains the first MAC address. However, by searching the ARP Cache table saved by the first VTEP device, it is found that the first VM is recorded in the ARP Cache table as a remote host connected to other VTEP devices. Therefore, the first device obtains the first IP address by looking up the table, generates and sends the first ARP unicast request message. The first ARP unicast request message is sent to the first interface to detect whether the ARP response message sent by the first VM can be received, so as to determine whether the first VM has been migrated.

[0071] Specifically, in S201, leaf3 determines that the VM1 is accessed from the eth1 interface, but by searching the ARP Cache table, it is found that the VM1 is recorded in the ARP Cache table as a remote host accessing VTEP_1. Therefore, after obtaining the IP address of the VM1, leaf3 generates an ARP unicast request message with the IP address of the VM1 as the destination IP address, and sends the ARP unicast request message to the eth1 interface to detect whether the ARP response message from VM1 can be received. In this way, it is confirmed whether the VM1 has migrated, that is, whether it is a local device accessing itself.

[0072] S205. The first VTEP device receives a first ARP response message sent by the first VM.

[0073] Specifically, leaf3 sends the ARP unicast request message, and receives the first ARP response message sent by VM1 for the first ARP unicast request message within a specified time, which indicates that VM1 has migrated.

[0074] S206. The first VTEP device determines that the first VM has migrated.

[0075] It can be seen that according to the method provided in the embodiment of the present application, when a VM is migrated, the VM's migration device only needs to obtain the VM's MAC address, and can obtain the VM's IP address by searching the ARP Cache table, and further determine whether the VM has migrated through ARP learning. After the VM is migrated, the migration device does not need to be limited to the VM sending a free ARP message to sense the VM migration, which effectively improves the compatibility of the virtual machine configuration.

[0076] Optionally, the method 200 may further include S207: the first VTEP device generates a host route of the first VM according to the ARP unicast request message or the ARP response message, and synchronizes the host route to other VTEP devices.

[0077] The first VTEP device generates a host route of the first VM by sending the first ARP unicast request message or by receiving the first ARP response message sent by the VM.

[0078] In a specific implementation, the first VTEP device sends the first ARP unicast request message from the first interface or receives the ARP response message from the first interface, and the first VTEP device converts the learned ARP table entry into a host route pointing to the first VM, and publishes the host route of the first VM to other VTEP devices through the routing protocol. Specifically, the first VTEP device obtains the IP address and the corresponding physical interface of the first VM through the first ARP unicast request message or the ARP response message, thereby generating a routing table entry containing the physical interface information, that is, the host route of the first VM. When a device in the network wants to access the first VM, it will find the host route of the first VM according to the longest match and send the traffic to the first VTEP device.

[0079] The first VTEP device synchronizes the host route to other VTEP devices. Optionally, the first VTEP device may publish the host route via a BGP message. Optionally, the first VTEP device may also publish the host route via an LSP message. When other VTEP devices receive a BGP message or an LSP message sent by the first VTEP device, they store the host route of the first VM carried in the message locally and mark it as a host route synchronized by the first VTEP device.

[0080] By synchronizing the host routes of the virtual machines connected to each other between VTEP devices, each VTEP device obtains the host routes of all the virtual machines connected to the opposite VTEP devices, which can speed up the convergence of network routes.

[0081] Optionally, after S206, the method 200 may further include S208: the first VTEP device updates the ARP Cache table, obtains updated ARP Cache entry information corresponding to the first VM, and synchronizes the updated ARP Cache entry information corresponding to the first VM to other VTEP devices.

[0082] In a specific embodiment, in combination Figure 1: After leaf3 determines that VM1 is the local host, it updates the ARP Cache table stored locally, updates the ARP Cache entry information corresponding to VM1, obtains the updated ARP Cache entry information corresponding to the VM, and synchronizes the updated ARP Cache entry information corresponding to the VM to other VTEP devices.

[0083] Before VM1 is migrated in, the ARP Cache table locally stored on leaf3 is Table 2. After determining that VM1 has migrated in, leaf3 updates the ARP Cache table, as shown in Table 3:

[0084]

[0085]

[0086] Table 3

[0087] By synchronizing ARP Cache table information between VTEP devices, each VTEP device obtains the ARP Cache table information saved by all peer VTEP devices, and then obtains the routing information of the access virtual machines saved by all peer VTEP devices. When the virtual machine migrates, the migration of the virtual machine can be quickly and accurately perceived by searching the ARP Cache table.

[0088] The embodiment of the present application does not limit the execution order of S206-S208. For example, S206 can be executed before S207 or after S207. Similarly, the order of S207 and S208 is not specifically limited.

[0089] Figure 3 The present invention provides a method 300 for determining the migration of a virtual machine VM. The method 300 can be applied to Figure 1 The VXLAN network 100 is shown, but the embodiments of the present application are not limited thereto.

[0090] S301. The second VTEP device receives ARP Cache entry information corresponding to the first VM sent by the first VTEP device.

[0091] The second VTEP device can be used to access the virtual machine VM. In a specific implementation, the second VTEP device can be Figure 1 The first VM is Figure 1 VM1 shown. The first VTEP device is Figure 1After VM1 migrates from leaf1 to leaf3, leaf3 senses the migration of VM1, updates the locally stored ARP Cache table, obtains the updated ARP Cache table entry information corresponding to the first VM, and synchronizes the updated ARP Cache table entry information corresponding to the first VM to other VTEP devices, for example, Figure 1 leaf1 and leaf2 are shown.

[0092] For the relevant description of the ARP Cache table, please refer to the description in method 200, which will not be repeated here.

[0093] S302: The second VTEP device determines that the ARP Cache entry information records that the first VM accesses the first VTEP device.

[0094] The second VTEP device determines the IP address of the VTEP to which the first VM accesses from the ARP Cache entry information, and further determines that the first VM accesses the first VTEP.

[0095] Specific, combined Figure 1 , leaf1 determines from the ARP Cache entry information that the IP address of the VTEP to which the VM1 accesses is VTEP_3, and further determines that the ARP Cache entry information records the VM1 accessing leaf3.

[0096] S303: The second VTEP device determines that the first VM is recorded as a local host in the ARP Cache table stored in the second VTEP device.

[0097] After the second VTEP device determines from the received ARP Cache table entry information that the first VM is a host connected to the first VTEP device, it obtains the first MAC address or the first IP address of the first VM according to the received ARP Cache table entry information, uses the first MAC address or the first IP address as a keyword, searches the ARP Cache table stored in the second VTEP device, hits the ARP Cache table entry information of the first VM, and from the ARP Cache table entry information, according to the IP address of the VTEP to which the first VM is connected or the "FLAG" identification information, determines that the first VM is recorded in the ARP Cache table stored in the second VTEP device as a local host.

[0098] S304. The second VTEP device obtains the first IP address of the first VM, and generates and sends a second ARP unicast request message using the first IP address as the destination IP address.

[0099] Optionally, the second VTEP device obtains the first IP address from the ARP Cache entry information of the first VM received from the first VTEP device. Optionally, the second VTEP device may also obtain the first IP address from the ARP Cache table stored in the second VTEP device.

[0100] After the second VTEP device obtains the first IP address, it generates a second ARP unicast request message with the first IP address as the destination IP address, and sends the second ARP unicast request message to the corresponding AC side interface to detect whether it can receive the second ARP response message responded by the first VM.

[0101] S305: If the second VTEP device does not receive the second ARP response message sent by the first VM within a predetermined time, it is determined that the first VM has migrated.

[0102] In a specific implementation, since the VM has been migrated from the second VTEP device to the first VTEP device, the second VTEP device cannot receive the second ARP response message from the first VM within a predetermined time, and thus determines that the first VM has been migrated out.

[0103] Through the method provided in this embodiment, after receiving the ARP Cache entry information sent by all peer devices, the VTEP device triggers the VTEIP device to determine whether the virtual machine has migrated, thereby being able to quickly and accurately perceive the virtual machine migration.

[0104] Optionally, after S305, the method 300 further includes S306: the second VTEP device deletes the ARP table entry corresponding to the first VM in the ARP table stored in the second VTEP device itself.

[0105] When the second VTEP device does not receive the second ARP response message within a predetermined time, the ARP entry corresponding to the first VM is deleted from the ARP table stored in the second VTEP device itself, without having to wait until the ARP entry aging time is reached, thereby saving the ARP table resources occupied by the ARP entry information.

[0106] Optionally, after S305, the method 300 further includes S307:

[0107] The second VTEP device cancels the host route of the first VM pointing to the second VTEP device, and sends control information to other VTEP devices, where the control information is used to instruct the other VTEP devices to cancel the host route of the first VM pointing to the second VTEP device.

[0108] In a specific implementation, the control information is a BGP update message. When the second VTEP device determines that the connected VM1 has been migrated out, it can send the BGP message to other VTEP devices, carrying the host address of the first VM, to cancel the host route of the VM.

[0109] In another specific implementation, the control information may also be a Path Computation Element Protocol (PCEP) message, which is used to revoke the host route of the first VM by defining a new routing object and a new message type in the PCEP message. The new routing object carries the host address of the first VM, and the new message type is used to indicate that the PCEP message is used to revoke the host route of the first VM.

[0110] It should be understood that the types of control information listed above are only exemplary and should not constitute any limitation to the present application. The present application does not limit the specific protocol used to cancel the host route of the first VM.

[0111] Therefore, when the VTEP device confirms that the host device connected to itself has migrated, the host route of the migrated virtual machine is revoked, and the host route of the migrated virtual machine is revoked to other VTEP devices, thereby accelerating the speed of route convergence.

[0112] Optionally, after S305, the method 300 may further include S308: the second VTEP device updates the ARP Cache entry corresponding to the first VM in the ARP Cache table stored by the second VTEP device using the ARP Cache entry information sent by the first VTEP device.

[0113] In a specific embodiment, in combination Figure 1 : After leaf1 determines that VM1 has been migrated out, it updates the ARPCache table saved locally. Before VM1 is migrated out, the ARP Cache table saved locally on leaf1 is as shown in Table 4:

[0114] IP MAC VNI VTEP FLAG IP_1 MAC_1 1000 VTEP_1 local IP_2 MAC_2 1000 VTEP_1 local IP_3 MAC_3 1000 VTEP_3 remote

[0115] Table 4

[0116] After leaf1 determines that VM1 has migrated to leaf3, it updates the locally saved ARP Cache table, as shown in Table 5:

[0117] IP MAC VNI VTEP FLAG IP_1 MAC_1 1000 VTEP_3 remote IP_2 MAC_2 1000 VTEP_1 local IP_3 MAC_3 1000 VTEP_3 remote

[0118] Table 5

[0119] After obtaining the synchronized ARP Cache table information sent by the peer VTEP device, the VTEP device updates its own ARP Cache table information and updates the host routes of all access virtual machines saved by the peer VTEP devices in real time. When the virtual machine migrates, it can quickly and accurately perceive the migration of the virtual machine by searching the ARP Cache table, thereby accelerating the convergence of routes.

[0120] It should be noted that the execution order of S306-S308 is not specific, and the embodiment of the present application does not limit this.

[0121] Above, combined Figures 1 to 3 The method for determining virtual machine migration provided in accordance with the embodiment of the present application is described in detail. Figure 4-Figure 7 A device and system for determining virtual machine migration provided according to an embodiment of the present application are described in detail.

[0122] Figure 4 400 is a schematic diagram of a device 400 for determining virtual machine migration according to an embodiment of the present application. The device 400 may be Figure 1 Any node device from leaf1 to leaf3 in can be used to execute Figure 2 As shown in the method. Figure 4 As shown, the device 400 includes: a processing module 401, a sending module 402 and a receiving module 403.

[0123] The processing module 401 is used to obtain the first media access control MAC address of the first VM from the first interface on the access circuit AC side of the first VTEP device. The processing module 401 is also used to use the first MAC address as a keyword to search the address resolution protocol cache ARP Cache table saved by the first VTEP device, and determine that the ARP Cache table records the first VM accessing the second VTEP device. The processing module is further used to obtain the first IP address of the first VM according to the ARP Cache table, and generate a first ARP unicast request message with the first IP address as the destination IP address. The sending module 402 is used to send the first ARP unicast request message. The receiving module 403 is used to receive the first ARP response message sent by the first VM to the first ARP unicast request message from the first interface. In response to receiving the first ARP response message, the processing module 401 is also used to determine that the first VM has migrated.

[0124] It can be seen that after a VM is migrated, the VM's migration device only needs to obtain the VM's MAC address to determine that the VM has migrated. After the VM is migrated, the migration device does not need to be limited to the VM sending a free ARP message to sense the VM migration, which effectively improves the compatibility of the virtual machine configuration.

[0125] Optionally, the processing module 401 is further configured to generate a host route of the first VM according to the first ARP unicast request message or the first ARP response message, and synchronize the host route of the first VM to other VTEP devices.

[0126] By synchronizing the host routes of the virtual machines connected to each other between VTEP devices, each VTEP device obtains the host routes of all the virtual machines connected to the opposite VTEP devices, which can speed up the convergence of network routes.

[0127] Optionally, the processing module 401 is further used to update the ARP Cache entry information corresponding to the first VM according to the IP address of the VTEP accessed after the first VM migrates after determining that the first VM has migrated, and synchronize the ARP Cache entry information to other VTEP devices.

[0128] By synchronizing ARP Cache table information between VTEP devices, each VTEP device obtains the ARP Cache table information saved by all peer VTEP devices, and then obtains the routing information of the access virtual machines saved by all peer VTEP devices. When the virtual machine migrates, the migration of the virtual machine can be quickly and accurately perceived by searching the ARP Cache table.

[0129] Optionally, the processing module is used to obtain the first MAC address of the first VM according to a Reverse Address Resolution Protocol RARP message or a Gratuitous ARP message sent by the first VM and received by the first interface.

[0130] The modules and other operations and / or functions in the device 400 according to the embodiment of the present application are respectively for implementing Figure 2 For the sake of brevity, the corresponding process of method 200 is not repeated here.

[0131] Figure 5 is a schematic diagram of an apparatus 500 for determining virtual machine migration according to an embodiment of the present application. The apparatus 500 can be used to perform Figure 2 As shown in the method. Figure 5 As shown, the device 500 includes: a receiving module 501, a processing module 502 and a sending module 503.

[0132] The receiving module 501 is used to receive the address resolution protocol cache ARP Cache table entry information corresponding to the first VM sent by the first VTEP device. The processing module 502 is used to determine that the ARP Cache table entry information records that the first VM is connected to the first VTEP device, and determines that the ARP Cache table saved by the second VTEP device records that the first VM is a local host connected to the second VTEP device. The processing module 502 is also used to obtain the first IP address of the first VM, and generate a second ARP unicast request message with the first IP address as the destination IP address. The sending module 503 is used to send the second ARP unicast request message. The processing module 502 is also used to determine that the first VM has migrated when the receiving module 501 does not receive the second ARP response message sent by the first VM for the second ARP unicast request message within a predetermined time.

[0133] It can be seen that after receiving the ARP Cache entry information sent by all peer devices, the VTEP device triggers the VTEIP device to determine whether the virtual machine has migrated, so that the virtual machine migration can be quickly and accurately perceived.

[0134] Optionally, the processing module 502 is further configured to delete an ARP table entry corresponding to the first VM in the ARP table stored in the second VTEP device after determining that the first VM has migrated.

[0135] It can be seen that when the second VTEP device does not receive the second ARP response message within the predetermined time, the ARP entry corresponding to the first VM is deleted from the ARP table stored in the second VTEP device itself, without having to wait until the ARP entry aging time is reached before aging. This saves the ARP table resources occupied by the ARP entry information.

[0136] Optionally, the processing module 502 is further used to cancel the host route of the first VM pointing to the second VTEP device after determining that the first VM has migrated, and send control information to other VTEP devices, wherein the control information is used to instruct the other VTEP devices to cancel the host route of the first VM pointing to the second VTEP device. The sending module 503 is also used to send the control information to the other VTEP devices.

[0137] Therefore, when the VTEP device confirms that the host device connected to itself has migrated, the host route of the migrated virtual machine is revoked, and the host route of the migrated virtual machine is revoked to other VTEP devices, thereby accelerating the speed of route convergence.

[0138] Optionally, the processing module 502 is further configured to, after determining that the first VM has migrated, update the ARP Cache entry corresponding to the first VM in the ARP Cache table stored by the second VTEP device using the ARP Cache entry information sent by the first VTEP device.

[0139] After obtaining the synchronized ARP Cache table information sent by the peer VTEP device, the VTEP device updates its own ARP Cache table information and updates the host routes of all access virtual machines saved by the peer VTEP devices in real time. When the virtual machine migrates, it can quickly and accurately perceive the migration of the virtual machine by searching the ARP Cache table, thereby accelerating the convergence of routes.

[0140] The modules in the device 500 according to the embodiment of the present application and the above-mentioned other operations and / or functions are respectively for implementing Figure 3 For the sake of brevity, the corresponding process of method 300 is not repeated here.

[0141] The device 400 and the device 500 provided in the above embodiments of the present application are only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0142] Figure 6is another schematic diagram of an apparatus 600 for determining virtual machine migration according to an embodiment of the present application. The apparatus 600 can be used to perform Figure 2 Method 200 in. Figure 6 As shown, the device 600 includes: an input interface 601, an output interface 602, a processor 603 and a memory 604. The input interface 601, the output interface 602, the processor 603 and the memory 604 may be connected via a bus system 605.

[0143] The memory 604 is used to store programs, instructions or codes. The processor 604 is used to execute the programs, instructions or codes in the memory 604 to control the input interface 601 to receive signals, control the output interface 602 to send signals and complete the operations in S201-S208.

[0144] Figure 7 FIG. 7 is another schematic diagram of an apparatus 700 for determining virtual machine migration according to an embodiment of the present application. The network device 700 can be used to perform Figure 3 Method 300 in. Figure 7 As shown, the network device 700 includes: an input interface 701, an output interface 702, a processor 703 and a memory 704. The input interface 701, the output interface 702, the processor 703 and the memory 704 may be connected via a bus system 705.

[0145] The memory 704 is used to store programs, instructions or codes. The processor 704 is used to execute the programs, instructions or codes in the memory 704 to control the input interface 701 to receive signals, control the output interface 702 to send signals and complete the operations in S301-S308.

[0146] It should be understood that in the embodiment of the present application, the processor 603 and the processor 703 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0147] The memory 604 and the memory 704 may include a read-only memory and a random access memory, and provide instructions and data to the processor 603 and the processor 703 respectively. The memory 604 or a part of the memory 704 may also include a non-volatile random access memory. For example, the memory 604 or the memory 704 may also store information of the device type.

[0148] The bus system 605 and the bus system 705 may include, in addition to the data bus, a power bus, a control bus, a status signal bus, etc. However, for the sake of clarity, various buses are labeled as bus systems in the figure.

[0149] In the implementation process, each step of method 200 and method 300 can be completed by the hardware integrated logic circuit or software instructions in processor 603 and processor 703, respectively. The steps of the positioning method disclosed in the embodiment of the present application can be directly embodied as a hardware processor, or a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in memory 604 and memory 704, respectively, and processor 603 reads the information in memory 604, and processor 703 reads the information in memory 704, and the steps of the above-mentioned method 200 and method 300 are respectively completed in combination with its hardware. To avoid repetition, it is not described in detail here.

[0150] It should be noted that Figure 4 and Figure 6 The device provided, Figure 5 and Figure 7 The device provided is used for Figure 1 In the network 100 shown, a method for determining virtual machine migration is implemented. In a specific implementation, Figure 4 The processing module 401 in can be used Figure 6 The sending module 402 may be implemented by the processor 603. Figure 6 The output interface 602 is implemented, and the receiving module 403 can be Figure 6 The input interface 601 is implemented. Similarly, Figure 5 The processing module 502 in Figure 7 The sending module 503 may be implemented by the processor 703 of Figure 7 The output interface 702 is implemented, and the receiving module 501 can be used by Figure 7 The input interface 701 is implemented.

[0151] The present application also provides a communication system, comprising Figure 4 The device provided by the corresponding embodiment and Figure 5 The communication system is used to perform Figure 2 The method 200 and Figure 3 The method 300 of the corresponding embodiment.

[0152] The present application also provides a communication system, comprising Figure 5The device provided by the corresponding embodiment and Figure 7 The communication system is used to perform Figure 2 The method 200 and Figure 3 The method 300 of the corresponding embodiment.

[0153] It should be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0154] Those of ordinary skill in the art will appreciate that the modules and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0155] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0156] Those skilled in the art should be aware that in one or more of the above examples, the functions described in this application can be implemented with hardware, software or any combination thereof. If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention is essentially or part of the prior art that contributes to the part or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

[0157] Each part of this specification is described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment part.

[0158] Finally, it should be noted that the above is only a preferred embodiment of the technical solution of the present application and is not intended to limit the scope of protection of the present application. Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of the present application. If these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, any modifications, equivalent substitutions, improvements, etc. made shall be included in the scope of protection of the present application.

Claims

1. A method for determining virtual machine VM migration, characterized in that: The method comprises: After the VM is migrated from the second device to the first device, the first device obtains the media access control MAC address of the VM through the local interface; The first device sends an address resolution protocol ARP request to the VM according to the MAC address; The first device receives an ARP response sent by the VM; The first device notifies the second device of a route to the VM, wherein the route includes a MAC address of the VM; The second device receives the route; The second device sends an address resolution protocol ARP request to determine whether the VM connected to itself has migrated; In response to not receiving a response to the ARP request sent by the VM, the second device determines that the VM has migrated.

2. The method according to claim 1, characterized in that The first device obtains the MAC address of the VM through the local interface, including: The first device obtains the MAC address of the VM according to the message obtained from the local interface.

3. The method according to claim 2, characterized in that The message is a gratuitous ARP message or a reverse address resolution protocol RARP message sent by the VM.

4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: The first device stores the correspondence between the MAC address and the local interface.

5. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: The first device updates a locally stored APR table to store the correspondence between the MAC address and the local interface.

6. A method for determining virtual machine VM migration, characterized in that: Executed by a second device, the method includes: Receiving a route to the VM sent by the first device, where the route to the VM includes a MAC address of the VM; Sending an Address Resolution Protocol (ARP) request to determine whether the VM accessing itself has migrated; In response to not receiving a response to the ARP request sent by the VM, it is determined that the VM has migrated.

7. The method according to claim 6, characterized in that Before sending the ARP request, the method further includes: Determining, according to the MAC address, that the second device includes a record of the VM accessing the second device.

8. The method according to claim 6 or 7, characterized in that: The method further comprises: The ARP table entry corresponding to the VM is deleted from the ARP table locally stored in the second device.

9. The method according to claim 6 or 7, characterized in that: The method further comprises: Update the ARP table entry corresponding to the VM in the ARP table locally stored in the second device.

10. The method according to claim 6 or 7, characterized in that: The method further comprises: The route of the VM pointing to the second device is revoked.

11. A communication system, characterized in that: include: The first device and the second device, the communication system is used to execute the method according to any one of claims 1-5.

12. A second device, characterized in that: include: A memory storing instructions; The processor executes the instruction so that the second device executes the method according to any one of claims 6 to 10.

13. A computer-readable storage medium, characterized in that: The method comprises computer-readable instructions, which, when executed on a computer, cause the computer to execute the method according to any one of claims 6 to 10.

14. A computer program product, characterized in that The method comprises computer-readable instructions, which, when executed on a second device, cause the second device to execute the method according to any one of claims 6 to 10.

15. A second device, characterized in that: include: A receiving module, configured to receive a route to the VM sent by the first device, wherein the route to the VM includes a MAC address of the VM; A sending module, used for sending an address resolution protocol ARP request to determine whether the VM has been migrated; The processing module determines that the VM has migrated in response to not receiving a response to the ARP request sent by the VM.

16. The second device according to claim 15, characterized in that The processing module is further used to: before sending the ARP request, determine, according to the MAC address, that the second device includes a record of the VM accessing the second device.

17. The second device according to claim 15 or 16, characterized in that The processing module is also used for: The ARP table entry corresponding to the VM is deleted from the ARP table locally stored in the second device.

18. The second device according to claim 15 or 16, characterized in that: The processing module is also used for: Update the ARP table entry corresponding to the VM in the ARP table locally stored in the second device.

19. The second device according to claim 15 or 16, characterized in that: The processing module also includes: The route of the VM pointing to the second device is revoked.

Citation Information

Patent Citations

  • Method for virtual machine migration in network, gateway and system

    CN102801715A

  • Communication system, management device, management method, and management program

    JP2015002438A

  • Host Detection by Top of Rack Switch Devices in Data Center Environments

    US20140064104A1

  • Method and apparatus for implementing communication between virtual machines

    US20150281067A1

  • Virtual machine migration

    US20160028624A1