IP Library › Granted Patent US 12,073,243
Granted Patent B2
US 12,073,243 · App. 17/106,179 · Granted Aug 27, 2024

Method and apparatus for determining virtual machine migration

Inventors: Yuan Gao (Nanjing, CN); Xingguo Sun (Nanjing, CN); Wenhui Liang (Nanjing, CN)
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
G06F9/4856G06F9/45558H04L12/4633H04L12/4641H04L45/64H04L61/103H04L61/4552H04L61/58G06F9/4411G06F2009/4557G06F2009/45579G06F2009/45595H04L2101/622
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,073,243
App. No.
17/106,179
Granted
Aug 27, 2024
Kind
B2
Abstract

Embodiments of this application provide a method and an apparatus for determining virtual machine VM migration. The method includes: after a VM is migrated, sending a gratuitous ARP packet or a RARP packet to an in-migration VTEP device; obtaining, by the VTEP device, a MAC address of the VM, searching an ARP cache table based on the MAC address, and obtaining an IP address of the VM; and constructing an ARP unicast request packet by using the IP address as a destination IP address, and if the VTEP device receives an ARP response packet sent by the VM for the ARP unicast request packet, determining that the VM is migrated.

Claims (54)

1. A method comprising:

after a virtual machine (VM) is migrated from a source device to a target device, obtaining, by the target device, a media access control (MAC) address of the VM from a local interface, and

perceiving, by the target device, that the VM is migrated, based on a same MAC address having been received from the source device;

probing by the target device, in response to the perceiving that the VM is migrated, by the target device, the VM by sending an address resolution protocol (ARP) request packet to the VM based on the MAC address of the VM;

receiving, by the target device, an ARP response packet from the VM.

2. The method according to claim 1 , further comprising:

advertising, by the target device, a route to the source device, the route is a route to the VM.

3. The method according to claim 1 , wherein obtaining, by the target device, a media access control (MAC) address of the VM from a local interface comprises:

obtaining, by the target device, the MAC address of the VM according to a packet obtained from the local interface.

4. The method according to claim 3 , wherein

the packet is a reverse address resolution protocol (RARP) packet sent by the VM; or

the packet is a gratuitous ARP packet sent by the VM.

5. The method according to claim 1 , wherein the method further comprises:

storing, by the target device, a correspondence between the MAC address of the VM and the local interface.

6. The method according to claim 1 , wherein the method is applied in an Ethernet virtual private network (EVPN), the EVPN comprises the target device and the source device.

7. The method according to claim 1 , wherein the ARP request packet is an ARP request packet that uses an Internet Protocol (IP) address of the VM as a target IP address.

8. The method according to claim 1 , wherein the route is an Ethernet virtual private network (EVPN) integrated routing and bridging (IRB) route.

9. A method comprising:

after a virtual machine (VM) is migrated from a source device to a target device, receiving, by the source device, a route sent by the target device, wherein the route is a route to the VM, the route comprises a media access control (MAC) address of the VM;

perceiving, by the source device, according to the route to the VM, that the VM is migrated;

probing, by the source device, the VM by sending an address resolution protocol (ARP) request according to the MAC address of the VM; and

in response to the source device not receiving a response to the ARP request sent by the VM, determining, by the source device, that the VM has migrated.

10. The method according to claim 9 , wherein after the determining, by the source device, that the VM has migrated, further comprising:

deleting, by the source device, an ARP entry corresponding to the VM from an ARP table locally stored by the source device.

11. The method according to claim 9 , wherein after the determining that the VM has migrated, the method further comprises:

withdrawing, by the source device, the route.

12. The method according to claim 9 , wherein after the determining, by the source device, that the VM has migrated, further comprising:

updating, by the source device, an ARP entry corresponding to the VM in an ARP table locally stored by the source device.

13. The method according to claim 9 , wherein the method is applied in an Ethernet virtual private network (EVPN), the EVPN comprises the target device and the source device.

14. The method according to claim 9 , wherein the ARP request packet is an ARP request packet that uses an Internet Protocol (IP) address of the VM as a target IP address.

15. The method according to claim 9 , wherein the route is an Ethernet virtual private network (EVPN) integrated routing and bridging (IRB) route.

16. An apparatus, wherein the apparatus is located on a target device side, comprising:

a non-transitory memory storing instructions; and

a processor coupled to the non-transitory memory; wherein the instructions, when executed by the processor, cause the apparatus to:

after a virtual machine (VM) is migrated from a source device to the target device, obtain a media access control (MAC) address of the VM from a local interface, and perceive, according to a same MAC address already learned from the source device, that the VM is migrated;

probe, by the target device, in response to the perceiving that the VM is migrated, the VM by sending an address resolution protocol (ARP) request packet to the VM according to the MAC address of the VM;

receive an ARP response packet from the VM.

17. The apparatus according to claim 16 , wherein the instructions, when executed by the processor, further cause the apparatus to:

advertise a route to the source device, the route is a route to the VM.

18. The apparatus according to claim 16 , wherein the instructions, when executed by the processor, further cause the apparatus to:

obtain the MAC address of the VM according to a packet obtained from the local interface.

19. The apparatus according to claim 16 , wherein the apparatus is applied in an Ethernet virtual private network (EVPN), the EVPN comprises the target device and the source device.

20. An apparatus, wherein the apparatus is located on a source device side, and the apparatus comprises:

a non-transitory memory storing instructions; and

a processor coupled to the non-transitory memory; wherein the instructions, when executed by the processor, cause the apparatus to be configured to:

after a virtual machine (VM) is migrated from the source device to a target device, receive a route sent by a target device, wherein the route is a route to the VM, the route comprises a media access control (MAC) address of the VM;

perceive according to the route to the VM, that the VM is migrated;

probing the VM by the target device by sending an address resolution protocol (ARP) request according to the MAC address of the VM; and;

in response to the source device not receiving a response to the ARP request sent by the VM is received, determine that the VM has migrated.

21. The apparatus according to claim 20 , wherein the instructions, when executed by the processor, further cause the apparatus to be configured to:

after the determining that the VM has migrated, delete an ARP entry corresponding to the VM from an ARP table locally stored by the source device.

22. The apparatus according to claim 20 , wherein the instructions, when executed by the processor, further cause the apparatus to be configured to:

after the determining that the VM has migrated, update an ARP entry corresponding to the VM in an ARP table locally stored by the source device.

23. The apparatus according to claim 20 , wherein the apparatus is applied in an Ethernet virtual private network (EVPN), the EVPN comprises the target device and the source device.

Priority Claims (1)
CN 201610777000.1 · Aug 30, 2016 · national
Continuity (3)
Continuation 16135996 · Sep 19, 2018
Continuation PCTCN2017075619 · Mar 3, 2017
Related Publication 20210200578A1 · Jul 1, 2021