WO2020001442A1 - 一种数据处理方法及相关设备 - Google Patents
一种数据处理方法及相关设备 Download PDFInfo
- Publication number
- WO2020001442A1 WO2020001442A1 PCT/CN2019/092827 CN2019092827W WO2020001442A1 WO 2020001442 A1 WO2020001442 A1 WO 2020001442A1 CN 2019092827 W CN2019092827 W CN 2019092827W WO 2020001442 A1 WO2020001442 A1 WO 2020001442A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- virtual machine
- physical machine
- machine
- data
- data packet
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/4557—Distribution of virtual machine instances; Migration and load balancing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45595—Network integration; Enabling network access in virtual machine instances
Definitions
- the present invention relates to the technical field of virtual machine migration, and in particular, to a data processing method and related equipment.
- the public cloud provides computing resources, such as virtual machine resources, storage resources, and network resources, to the public as a service.
- Public cloud providers usually lease computing resources to multiple tenants, and each tenant can create virtual switches and virtual subnets that are independent of each other to form network isolation.
- each physical machine In order to ensure normal communication between virtual machines, each physical machine The virtual switch on the machine needs to save the necessary information needed to communicate with other virtual machines of the tenant, such as the IP address of the host where the virtual machine is located, and the network identifier VNI required for the virtual extended LAN VXLAN encapsulation.
- some virtual machines of the same tenant may need to be migrated. For example, when a heavy load on a physical machine is found through monitoring, VM performance decreases, and the VM ’s Central Processing Unit (CPU) ) When the contention is too high, a migration operation needs to be performed to migrate the corresponding VM to the physical machine with the remaining resources.
- the live migration technology of the virtual machine is generally used, that is, the virtual machine save / restore means that the operating state of the entire virtual machine is completely saved and can be quickly restored to the original. There are hardware platforms and even different hardware platforms. After recovery, the virtual machine still runs smoothly, and users will not notice any difference.
- the network interruption time refers to the entire length of time during which a network packet is lost or network services are damaged during the virtual machine hot migration.
- the physical configuration of the destination physical machine and the source physical machine must be delivered to the same network configuration.
- the virtual switch on the third-party physical machine must be notified to update the configuration information for communication with the migrated virtual machine. Only after the virtual machine migration is completed, the network communication with other virtual machines can be restored in time. For example, multiple cloud servers of a tenant are distributed on different physical machines.
- the configuration information of the tenant's other virtual machines that is not updated in time with the migrated virtual machine may cause network packet loss or network service damage.
- a virtual machine network interruption of more than 3 seconds will inevitably lead to damage to network services, affecting customer perception and experience.
- a virtual machine network interruption of more than 1 second will cause a card to appear in the service. suddenly even interrupted.
- the embodiments of the present invention provide a data processing method and related equipment to solve the problem of network interruption during the virtual machine hot migration process.
- an embodiment of the present invention provides a data processing method, which may include:
- a source physical machine receives a first data packet, the first data packet includes first data, and a destination address of the first data is a first virtual machine; the source physical machine generates a second data packet, and the second data
- the package includes the first data and the identifier of the second virtual machine, and the first virtual machine is the second virtual machine after the hot migration from the source physical machine to the destination physical machine, and the identifier of the second virtual machine Configured to identify the second virtual machine on the destination physical machine; the source physical machine sends the second data packet to the destination physical machine.
- a situation in which a virtual machine is not updated in time with a network configuration of a migrated virtual machine in a destination physical machine that may occur during the hot migration process, or when the virtual machine is migrated to other virtual machines of the same tenant, is resolved.
- the virtual machine on the third-party physical machine does not store the address of the destination physical machine where the migrated virtual machine is located, so it is sent to the first virtual machine in the source physical machine.
- the problem of packet loss of uplink first data avoids network interruption and improves user experience.
- the method further includes: the source physical machine receives a third data packet sent by the destination physical machine, the third data packet includes second data and an identifier of the first virtual machine The identifier of the first virtual machine is used to identify the first virtual machine on the source physical machine, and the destination address of the second data is a third virtual machine; the source physical machine is based on the first virtual machine Machine identification, determining the address of the third-party physical machine where the third virtual machine is located; the source physical machine generates a fourth data packet according to the address of the third-party physical machine, and the fourth data packet includes the first Two data
- the source physical machine sends a fourth data packet to the third-party physical machine.
- the destination physical machine does not update the network configuration of the migrated virtual machine in time, but the second virtual machine needs to communicate with a third party
- the third virtual machine on the physical machine communicates, but because there is no address of the third-party physical machine where the third virtual machine is stored, the problem of packet loss of the downstream data is avoided, avoiding network interruption, and improving the user experience.
- the third virtual machine is a virtual machine that has an interaction relationship with the first virtual machine, and the source physical machine determines the third virtual machine according to an identifier of the first virtual machine.
- the address of the third-party physical machine where the virtual machine is located includes: the source physical machine obtains configuration information of the first virtual machine according to the identifier of the first virtual machine, and the configuration information includes the third virtual machine An address of a third-party physical machine where the source virtual machine is located; and the source physical machine finds and determines an address of the third-party physical machine where the third virtual machine is located according to the configuration information.
- the configuration information of the first virtual machine is also saved on the source physical machine, so as to facilitate uplink or downlink for the second virtual machine. Forwarding of data.
- migration information of the first virtual machine is not updated on the third virtual machine, and the migration information includes an address of the destination physical machine where the second virtual machine is located.
- the method further includes: if the source physical machine does not receive the first data packet within a preset time period, deleting the configuration of the first virtual machine information.
- the configuration information of the first virtual machine can be deleted without performing a data forwarding function.
- the network configuration information includes network configurations of Layer 2 communication, Layer 3 communication, and elastic IP communication required when the second virtual machine receives data and sends data. This meets the network configuration requirements for virtual machine hot migration data transmission in a distributed hierarchical network networking scenario.
- the source address of the first data is the third virtual machine; the destination address of the second data is the third virtual machine; wherein the second data is all
- the response data of the first data or the first data is response data of the second data. That is, when a data packet is sent from a third-party physical machine and forwarded to the destination physical machine through the source physical machine, when the third-party physical machine feedbacks data to the third-party physical machine, it also performs data feedback through a symmetrical path or Send to avoid packet loss caused by asymmetric traffic transmission.
- an embodiment of the present invention provides a data processing method, which may include:
- the source physical machine receives a third data packet sent by the destination physical machine.
- the third data packet includes the second data and an identifier of the first virtual machine, and the identifier of the first virtual machine is used to identify the source physical machine.
- the first virtual machine, and the destination address of the second data is a third virtual machine; and the source physical machine determines an address of a third-party physical machine where the third virtual machine is located according to the identifier of the first virtual machine
- the source physical machine generates a fourth data packet according to the address of the third-party physical machine, and the fourth data packet includes the second data; the source physical machine sends the fourth data to the third-party physical machine package.
- the method further includes: the source physical machine receives the first data packet, where the first data packet includes the first data, and a destination address of the first data is the first virtual machine; The source physical machine generates a second data packet, the second data packet includes the first data and an identifier of a second virtual machine, and the first virtual machine is hot-migrated from the source physical machine to a destination physical machine as The second virtual machine, and the identifier of the second virtual machine is used to identify the second virtual machine on the destination physical machine; the source physical machine sends the second data packet to the destination physical machine.
- the third virtual machine is a virtual machine that has an interaction relationship with the first virtual machine, and the source physical machine determines the third virtual machine according to an identifier of the first virtual machine.
- the address of the third-party physical machine where the virtual machine is located includes: the source physical machine obtains configuration information of the first virtual machine according to the identifier of the first virtual machine, and the configuration information includes the third virtual machine An address of a third-party physical machine where the source virtual machine is located; and the source physical machine finds and determines an address of the third-party physical machine where the third virtual machine is located according to the configuration information.
- migration information of the first virtual machine is not updated on the third virtual machine, and the migration information includes an address of the destination physical machine where the second virtual machine is located.
- the method further includes: if the source physical machine does not receive the first data packet within a preset time period, deleting the configuration of the first virtual machine information.
- an embodiment of the present invention provides a data processing method, which may include:
- the destination physical machine receives a second data packet sent by the source physical machine, where the second data packet is generated by the source physical machine according to the received first data packet, where the first data packet includes the first data, the The destination address of the first data is the first virtual machine, the second data packet includes the first data and the identifier of the second virtual machine, and the first virtual machine is hot migrated from the source physical machine to the destination physical machine.
- the second virtual machine and the identifier of the second virtual machine is used to identify the second virtual machine on the destination physical machine; the destination physical machine determines the second virtual machine according to the second virtual machine identifier
- the first data is data sent to the second virtual machine.
- the method further includes: the destination physical machine sends a third data packet to the source physical machine, where the third data packet includes second data and an identifier of the first virtual machine, The destination address of the second data is a third virtual machine, and the identifier of the first virtual machine is used to identify the first virtual machine on the source physical machine.
- network configuration information of the second virtual machine is not currently configured on the destination physical machine, and the network configuration information includes a configuration rule for Layer 2 communication, a configuration rule for Layer 3 communication, and elasticity. At least one of configuration rules for IP communication.
- an embodiment of the present invention provides a data processing method, which may include:
- the destination physical machine sends a third data packet to the source physical machine.
- the third data packet includes the second data and the identifier of the first virtual machine.
- the destination address of the second data is the third virtual machine and the first virtual machine.
- the machine identification is used to identify the first virtual machine on the source physical machine.
- the destination physical machine receives a second data packet sent by a source physical machine, where the second data packet is generated by the source physical machine according to the received first data packet, and the first The data packet includes first data, the destination address of the first data is the first virtual machine, the second data packet includes the first data and the identifier of the second virtual machine, and the first virtual machine receives the data from the first virtual machine.
- the source physical machine is hot-migrated to the destination physical machine, it is the second virtual machine, and the identifier of the second virtual machine is used to identify the second virtual machine on the destination physical machine; the destination physical machine is based on the The second virtual machine identifier determines that the first data is data sent to the second virtual machine.
- network configuration information of the second virtual machine is not currently configured on the destination physical machine, and the network configuration information includes a configuration rule for Layer 2 communication, a configuration rule for Layer 3 communication, and elasticity. At least one of configuration rules for IP communication.
- an embodiment of the present invention provides a physical machine.
- the physical machine is a source physical machine and may include:
- a first receiving unit configured to receive a first data packet, where the first data packet includes first data, and a destination address of the first data is a first virtual machine;
- a first processing unit configured to generate a second data packet, where the second data packet includes the first data and an identifier of a second virtual machine, and the first virtual machine is thermally migrated from the source physical machine to a destination physical machine Behind the machine is the second virtual machine, and the identifier of the second virtual machine is used to identify the second virtual machine on the destination physical machine;
- a first sending unit configured to send the second data packet to the destination physical machine.
- the physical machine further includes:
- a second receiving unit is configured to receive a third data packet sent by the destination physical machine, where the third data packet includes the second data and an identifier of the first virtual machine, and the identifier of the first virtual machine is used for Identifying the first virtual machine on the source physical machine, and the destination address of the second data is a third virtual machine;
- An identifying unit configured to determine an address of a third-party physical machine where the third virtual machine is located according to the identifier of the first virtual machine
- a second processing unit configured to generate a fourth data packet according to an address of the third-party physical machine, where the fourth data packet includes the second data
- the second sending unit is configured to send a fourth data packet to the third-party physical machine.
- the third virtual machine is a virtual machine that has an interaction relationship with the first virtual machine; and the identification unit is specifically configured to:
- configuration information of the first virtual machine according to the identifier of the first virtual machine, where the configuration information includes an address of a third-party physical machine where the third virtual machine is located; and searching for and determining all the information according to the configuration information The address of the third-party physical machine where the third virtual machine is located.
- migration information of the first virtual machine is not updated on the third virtual machine, and the migration information includes an address of the destination physical machine where the second virtual machine is located.
- the physical machine further includes:
- the management unit is configured to delete the configuration information of the first virtual machine if the first data packet is not received within a preset time period.
- an embodiment of the present invention provides a physical machine, where the physical machine is a destination physical machine and includes:
- a receiving unit configured to receive a second data packet sent by a source physical machine, where the second data packet is generated by the source physical machine according to the received first data packet, where the first data packet includes the first data,
- the destination address of the first data is the first virtual machine
- the second data packet includes the identifier of the first data and the second virtual machine
- the first virtual machine is thermally migrated from the source physical machine to the destination
- the physical machine is followed by the second virtual machine, and the identifier of the second virtual machine is used to identify the second virtual machine on the destination physical machine;
- a processing unit configured to determine, according to the second virtual machine identifier, that the first data is data sent to the second virtual machine.
- the physical machine further includes:
- a sending unit configured to send a third data packet to the source physical machine, where the third data packet includes second data and an identifier of the first virtual machine, and a destination address of the second data is the third virtual machine, so The identifier of the first virtual machine is used to identify the first virtual machine on the source physical machine.
- network configuration information of the second virtual machine is not currently configured on the destination physical machine, and the network configuration information includes a configuration rule for Layer 2 communication, a configuration rule for Layer 3 communication, and elasticity. At least one of configuration rules for IP communication.
- an embodiment of the present invention provides a data processing method, which may include:
- the destination physical machine receives a second data packet sent by the source physical machine, where the second data packet is generated by the source physical machine according to the received first data packet, where the first data packet includes the first data, the The destination address of the first data is a first virtual machine, and the first virtual machine is a second virtual machine after hot migration from the source physical machine to the destination physical machine; the second physical machine has been previously configured on the destination physical machine.
- Virtual machine network configuration information the network configuration information includes a first network configuration required for the second virtual machine to receive data; the destination physical machine determines that the first data is sent according to the first network configuration Data for the second virtual machine.
- the network configuration information of the migrated virtual machine is pre-configured on the destination physical machine where the virtual machine needs to be migrated, so the third physical machine on the third-party physical machine forwarded from the source physical machine can be correctly identified according to the first network configuration
- the data packets sent by the virtual machine are sent to the migrating virtual machine, avoiding packet loss of the received data due to the lack of network configuration information on the destination physical machine, and reducing the overall time for the third-party physical machine to complete the second virtual machine migration information update , Which reduces the duration and probability of network outages.
- the method before the destination physical machine receives the second data packet sent by the source physical machine, the method further includes: before the first physical machine migrates to the destination physical machine, Pre-configure network configuration information of the second virtual machine.
- the network configuration information of the migrated virtual machine is pre-configured on the destination physical machine where the virtual machine needs to be migrated, so as to avoid packet loss or network interruption caused by the lack of network configuration information on the destination physical machine, while reducing third parties.
- the overall time for the physical machine to complete the update of the migration information of the second virtual machine that is, reduce the time and probability of the occurrence of network interruption.
- the first network configuration includes a network configuration of Layer 2 communication, Layer 3 communication, and elastic IP communication required by the second virtual machine to receive data. This meets the network configuration requirements for virtual machine hot migration data transmission in a distributed hierarchical network networking scenario.
- the network configuration information further includes a second network configuration required by the second virtual machine to send data
- the second network configuration includes a second network configuration required by the second virtual machine to send data.
- Network configuration for Layer 2 communication, Layer 3 communication, and Elastic IP communication; the method further includes: the destination physical machine sends a third data packet to a third-party physical machine according to the second network configuration, and the third data
- the packet includes second data, a destination address of the second data is a third virtual machine, and the third virtual machine is a virtual machine that has an interaction relationship with the first virtual machine.
- configuration in the network configuration information is performed in advance, so that the destination physical machine can receive data according to the first network configuration and send data according to the second network configuration, so as to reduce the loss caused by the lack of network configuration information.
- Data loss while reducing the overall time for a third-party physical machine to complete the second virtual machine migration information update, that is, reducing the time and probability of network interruption.
- the network configuration information further includes routing information of a gateway node, where the gateway node stores a third-party physical machine address where a third virtual machine is located, and the third virtual machine is connected to the third virtual machine.
- a virtual machine in which a first virtual machine has an interactive relationship; the method further includes: the destination physical machine forwards a third data packet to a third-party physical machine through the gateway node according to the routing information, and the third data
- the packet includes second data, and a destination address of the second data is the third virtual machine.
- the first network configuration is completed first, and then the migration of the virtual machine can be started, and the second network configuration can be performed at the same time as or after the virtual machine starts the migration, and during this period Just forward the data packets that the destination physical machine needs to send through the gateway node.
- Data packet loss due to lack of network configuration information is reduced, and at the same time, the overall time for a third-party physical machine to complete the second virtual machine migration information update is further reduced, that is, the duration and probability of network interruption is further reduced.
- an embodiment of the present invention provides a data processing method, which may include: a source physical machine receives a first data packet, the first data packet includes first data, and a destination address of the first data is the first A virtual machine; the source physical machine generates a second data packet, the second data packet includes the first data, and the first virtual machine is hot-migrated from the source physical machine to the destination physical machine; A second virtual machine; the source physical machine sends the second data packet to the destination physical machine.
- an embodiment of the present invention provides a physical machine, where the physical machine is a destination physical machine and may include:
- a receiving unit configured to receive a second data packet sent by a source physical machine, where the second data packet is generated by the source physical machine according to the received first data packet, where the first data packet includes the first data,
- the destination address of the first data is a first virtual machine, and the first virtual machine is a second virtual machine after hot migration from the source physical machine to the destination physical machine;
- the destination physical machine is pre-configured with the Network configuration information of a second virtual machine, where the network configuration information includes a first network configuration required by the second virtual machine to receive data;
- An identifying unit is configured to determine, according to the first network configuration, that the first data is data sent to the second virtual machine.
- the physical machine further includes:
- a pre-configuration unit is configured to pre-configure network configuration information of the second virtual machine before the first virtual machine is migrated to the destination physical machine.
- the first network configuration includes a network configuration of Layer 2 communication, Layer 3 communication, and elastic IP communication required by the second virtual machine to receive data.
- the network configuration information further includes a second network configuration required by the second virtual machine to send data, and the second network configuration includes a second network configuration required by the second virtual machine to send data.
- Network configuration for Layer 2 communication, Layer 3 communication, and Elastic IP communication; the physical machine further includes:
- a first sending unit configured to send a third data packet to a third-party physical machine according to the second network configuration, where the third data packet includes second data, and a destination address of the second data is a third virtual machine,
- the third virtual machine is a virtual machine that has an interaction relationship with the first virtual machine.
- the network configuration information further includes routing information of a gateway node, where the gateway node stores a third-party physical machine address where a third virtual machine is located, and the third virtual machine is connected to the third virtual machine.
- a virtual machine in which a first virtual machine has an interactive relationship; the physical machine further includes:
- a second sending unit configured to forward a third data packet to a third-party physical machine through the gateway node according to the routing information, where the third data packet includes second data, and a destination address of the second data is The third virtual machine.
- an embodiment of the present invention provides a physical machine.
- the physical machine is a source physical machine and may include:
- a receiving unit configured to receive a first data packet, where the first data packet includes first data, and a destination address of the first data is a first virtual machine;
- a processing unit configured to generate a second data packet, where the second data packet includes the first data, and the first virtual machine is the second virtual machine after the hot migration from the source physical machine to the destination physical machine ;
- a sending unit configured to send the second data packet to the destination physical machine.
- an embodiment of the present invention provides a data processing system, including: a source physical machine and a destination physical machine, wherein the source physical machine is the source physical machine in any one of the foregoing implementation manners of the fifth aspect;
- the destination physical machine is the destination physical machine in any one of the implementation methods of the sixth aspect; or the source physical machine is the source physical machine in any one of the implementation methods of the tenth aspect; the destination physical machine is the foregoing The destination physical machine in any one of the implementation methods of the ninth aspect;
- an embodiment of the present invention provides a physical machine including a processor, and the processor is configured to support the physical machine to implement the first aspect, the second aspect, the third aspect, the fourth aspect, and the first aspect. Corresponding functions in the data processing method provided in the seventh aspect or the eighth aspect.
- the physical machine may further include a memory, which is used for coupling with the processor, and stores program instructions and data necessary for the physical machine.
- the physical machine may further include a communication interface for the physical machine to communicate with other devices or a communication network.
- an embodiment of the present invention provides a computer storage medium for storing computer software instructions used in a processor in a physical machine provided in the fifth aspect, the sixth aspect, the ninth aspect, and the tenth aspect. , which contains programs designed to perform the above.
- an embodiment of the present invention provides a computer program.
- the computer program includes instructions.
- the computer program can execute the processor in the physical machine provided by the thirteenth aspect. Process.
- the present application provides a chip system including a processor, which is configured to support a physical machine to implement the first aspect, the second aspect, the third aspect, the fourth aspect, the seventh aspect, or the eighth aspect.
- the functions involved in the aspect for example, generate or process the information involved in the data processing method described above.
- the chip system further includes a memory, and the memory is configured to store program instructions and data necessary for the data sending device.
- the chip system can be composed of chips, and can also include chips and other discrete devices.
- FIG. 1 is a schematic diagram of a network interruption corresponding to a virtual machine hot migration according to an embodiment of the present invention.
- FIG. 2 is a schematic diagram of a network interruption corresponding to another type of virtual machine hot migration provided by an embodiment of the present invention.
- FIG. 3 is a schematic diagram of a server architecture according to an embodiment of the present invention.
- FIG. 4 is a schematic structural diagram of a control node physical machine and a calculation node physical machine according to an embodiment of the present invention.
- FIG. 5 is a schematic flowchart of a data processing method according to an embodiment of the present invention.
- FIG. 6 is a schematic diagram of a packet encapsulation format of a first data packet and a second data packet according to an embodiment of the present invention.
- FIG. 7 is a schematic diagram of a packet encapsulation format of a third data packet and a fourth data packet according to an embodiment of the present invention.
- FIG. 8 is a schematic diagram of a network preconfiguration process according to an embodiment of the present invention.
- FIG. 9 is a schematic flowchart of enabling a network springboard according to an embodiment of the present invention.
- FIG. 10 is a schematic diagram of a normal working process of a springboard according to an embodiment of the present invention.
- FIG. 11 is a schematic diagram of a springboard removal process according to an embodiment of the present invention.
- FIG. 12 is a schematic diagram of a unidirectional springboard data model according to an embodiment of the present invention.
- FIG. 13 is a schematic diagram of a two-way springboard data model according to an embodiment of the present invention.
- FIG. 14 is a schematic structural diagram of a physical machine according to an embodiment of the present invention.
- 15 is a schematic structural diagram of another physical machine according to an embodiment of the present invention.
- 16 is a schematic structural diagram of still another physical machine according to an embodiment of the present invention.
- FIG. 17 is a schematic diagram of another server architecture provided by an embodiment of the present invention.
- FIG. 18 is a schematic structural diagram of a control node physical machine, a compute node physical machine, and a gateway node physical machine according to an embodiment of the present invention
- FIG. 19 is a schematic flowchart of another data processing method according to an embodiment of the present invention.
- FIG. 20 is a schematic diagram of a packet encapsulation format before and after a third data packet is forwarded by a gateway node according to an embodiment of the present invention
- 21 is a schematic diagram of another network pre-configuration process according to an embodiment of the present invention.
- 22 is a schematic diagram of another normal working process of a springboard according to an embodiment of the present invention.
- FIG. 23 is a schematic diagram of a bidirectional springboard + symmetrical routing data model according to an embodiment of the present invention.
- FIG. 24 is a schematic diagram of a unidirectional springboard + general network pre-configuration data model according to an embodiment of the present invention.
- 25 is a schematic diagram of a unidirectional springboard + enhanced network pre-configuration data model according to an embodiment of the present invention.
- FIG. 26 is a schematic structural diagram of a physical machine according to an embodiment of the present invention.
- an embodiment herein means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application.
- the appearances of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are they independent or alternative embodiments that are mutually exclusive with other embodiments. It is clearly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
- a component may be, but is not limited to, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and / or a computer.
- an application running on a computing device and a computing device can be components.
- One or more components can reside within a process and / or thread of execution, and a component can be localized on one computer and / or distributed between 2 or more computers.
- these components can execute from various computer readable media having various data structures stored thereon.
- a component may, for example, be based on a signal having one or more data packets (e.g., data from two components that interact with another component between a local system, a distributed system, and / or a network, such as the Internet that interacts with other systems through signals) Communicate via local and / or remote processes.
- data packets e.g., data from two components that interact with another component between a local system, a distributed system, and / or a network, such as the Internet that interacts with other systems through signals
- Virtual machine hot migration also called dynamic migration, real-time migration, that is, virtual machine save / restore, usually the complete running status of the entire virtual machine is saved, and it can be quickly restored to the original hardware platform or even different hardware on the platform. After recovery, the virtual machine still runs smoothly and users will not notice any difference.
- a virtual switch is a software program that enables one virtual machine to communicate with another virtual machine. Similar to physical Ethernet switches, vSwitches control the sending and receiving of data packets by inspecting them before passing them on.
- the interruption time refers to the entire length of time during which network packets are lost or network services are damaged during the live migration of virtual machines.
- a layered architecture that separates the components of the solution into different layers.
- the components in each layer should remain cohesive and should be at approximately the same level of abstraction.
- Each layer should be loosely coupled to the layers below it.
- VXLAN Virtual Extensible LAN
- VNI VXLAN Network Identifier
- VNI is similar to VLAN ID and is used to distinguish VXLAN segments. Virtual machines in different VXLAN segments cannot directly communicate with each other at Layer 2.
- a VNI represents a tenant, and even if multiple end users belong to the same VNI, it also represents a tenant.
- the VNI consists of 24 bits and supports up to 16M ((2 ⁇ 24-1) / 1024 ⁇ 2) tenants.
- MAC address is used to define the location of network equipment.
- the third network layer is responsible for the IP address
- the second data link layer is responsible for the MAC address. Therefore, a host will have a MAC address, and each network location will have an IP address unique to it.
- the virtual machine hot migration is divided into two cases. The first is that virtual machine resources are migrated first and configuration information is completed and then the configuration is completed. The second is that the configuration information is first configured and virtual machine resources are migrated and that the migration is completed.
- the virtual machine resources can include resources such as virtual processor (vCPU), virtual memory (vMEM), virtual network adapter (vNIC), and virtual storage (vStorage).
- the configuration information can include the flow rules required for Layer 2 communication and the requirements for Layer 3 communication. Configuration information such as routing, flow rules, network address translation (NAT) rules, security groups, and quality of service (QOS) required for Elastic IP (EIP) communications.
- Configuration information can include. For the possible network outages in the above two cases, the following analysis is performed:
- FIG. 1 is a schematic diagram of a network interruption corresponding to a virtual machine live migration provided by an embodiment of the present invention. As shown in Figure 1, it can be divided into time period 1 and time period 2 according to the time node of the migration. among them
- Time period 1 refers to the time period after (configuration information has been configured + virtual machine resources have not been migrated) and before (configuration information configuration is completed + virtual machine resource migration is completed).
- Time period 2 refers to the time period after (the configuration information is configured + the virtual machine resource migration is completed) and (the configuration information for communicating with the migrated virtual machine is updated on all third-party physical machines).
- the management physical machine (control node) will notify the third-party physical machine (either for the source physical machine or for the purpose) after the virtual machine resource migration of the destination physical machine is completed and the configuration information is configured.
- configuration information for communicating with the migrated virtual machine can also be updated for other physical machines). Therefore, there may be multiple third-party physical machines that need to be updated within time period 2, but the update speed is inconsistent.
- any one of the uncompleted virtual machines needs to send an uplink data packet to the first virtual machine ( Assumed to be the first data packet), because the address of the source physical machine where the first virtual machine is located before migration is still stored, but the address of the destination physical machine where the second virtual machine is located after migration is not stored, so only Send to the first virtual machine first.
- the first virtual machine has been migrated to the destination physical machine, so the data packet cannot be received and processed normally, resulting in packet loss in the uplink network, that is, uplink network interruption.
- the target physical machine Since the target physical machine has completed the resource migration and configuration information configuration of the virtual machine within time period 2, it can work normally, so when the destination physical machine has a downlink data packet (assuming a third data packet) needs to be sent , It is only necessary to communicate directly with a third-party physical machine that needs to communicate, so there is no network packet loss due to hot migration, and there is basically no downlink interruption.
- FIG. 2 is a schematic diagram of network interruption corresponding to another type of virtual machine live migration provided by an embodiment of the present invention. As shown in FIG. 2, it can be divided into time period 1 'and time period 2' according to the time node of migration. among them
- Time period 1 refers to a time period after (virtual machine resources have been migrated + configuration information has not been configured) and before (configuration information configuration is completed + virtual machine resource migration is completed).
- Time period 2 refers to the time period after (the configuration information is configured + the virtual machine resource migration is completed) and (the configuration information for communicating with the migrated virtual machine is updated on all third-party physical machines);
- the network interruption situation corresponding to the time period 2 'in the second case is the same as the network interruption situation corresponding to the time period 2 in the first case, and details are not described herein again.
- the virtual machine resource migration during the hot migration process does not need to consider the time period during the virtual machine resource migration process, because before the virtual machine is migrated from the source physical machine to the destination physical machine, if the complete migration is not completed, the source The virtual machine on the physical machine is still running normally.
- the technical problem to be solved in this application is how to avoid network packet loss caused by hot migration in the above two cases, that is, how to not update the network configuration of the migrated virtual machine on the destination physical machine in time. Or when the configuration information communicated with the migrated virtual machine is not updated in time with other virtual machines of the tenant after the virtual machine migration is completed, the normal data interaction with the virtual machine of the tenant can still be guaranteed, thereby reducing or Avoid network outages.
- Scenario 1 The source physical machine hardware system is maintained, fault repaired, and upgraded, but the virtual machine running on the source physical machine cannot be shut down. Therefore, it is necessary to hot migrate the virtual machine on the source physical machine to the destination physical machine.
- Scenario 2 The source physical machine software system is upgraded and patched. As these need to restart the physical machine to take effect, however, the virtual machine running on the source physical machine cannot be shut down. In order not to affect the virtual machine running above, during the upgrade and Before patching, you need to hot migrate the virtual machines on the source physical machine to the destination physical machine.
- Scenario 3 The load on the source physical machine is too heavy, and the virtual machine running on the source physical machine cannot be shut down. Therefore, you need to hot migrate the virtual machine on the source physical machine to the destination physical machine to reduce the number of virtual machines on the source physical machine to release. Resources.
- Scenario 4 In a cluster, there are more virtual machines on the source physical machine, fewer virtual machines on the destination physical machine, and virtual machines running on the source physical machine cannot be shut down. Therefore, the virtual machines on the source physical machine need to be shut down. Hot migration to the destination physical machine to achieve resource balance.
- FIG. 3 is a schematic diagram of a server architecture according to an embodiment of the present invention.
- the server architecture includes at least one physical machine 10 as a control node and multiple physical machines 20 as computing nodes.
- the physical machine 10 is used to manage the computing resources, network resources, and the like in the connected multiple physical machines 20; multiple physical machines can be deployed on the physical machine 20, and thermal management can be performed under the management of the physical machine 10. migrate.
- any one of the physical machines 20 can be used as the source physical machine in this application to migrate the above virtual machine to other physical machines 20, or it can be used as the destination physical machine to receive the virtual machine migration on the source physical machine.
- the server architecture in FIG. 3 is only an exemplary implementation manner in the embodiment of the present invention, and the network in the embodiment of the present invention includes but is not limited to the above server architecture.
- FIG. 4 is a schematic structural diagram of a control node physical machine and a computing node physical machine according to an embodiment of the present invention.
- the physical machine 10 as the control node may include a virtual computing management scheduling module 101 and a virtual network management control module. 102;
- the physical machine 20 as a computing node may include a computing agent module 201, a virtual network agent module 202, a computing virtualization module 203, and a network virtualization module 204. among them,
- the virtual computing management and scheduling module 101 is used to manage all computing resources, networks, authentication, scheduling, and scalability platforms, and provides a standard computing API interface to the outside, and internally connects to the computing agent module.
- the virtual network management control module 102 is a platform responsible for virtual network allocation and virtual network resource management, and provides a standard network resource API interface to the outside, and internally connects to the virtual network proxy module.
- a "pre-configuration API" is added to the virtual network management control module. This module is used by the computing agent module to call when performing a hot migration operation, and delivers the network configuration on the physical machine that is the destination of the migration.
- the computing agent module 201 is a module responsible for managing the life cycle of a virtual machine on a physical machine (computing node), including creating an instance, terminating an instance, migrating an instance, and a Resize instance.
- a “dual springboard configuration and adaptation module” is added to the computing agent module. This module is used to call when the computing code module performs a hot migration operation, and configures the information required for the springboard on the source and destination physical machines that are migrated.
- the configuration information mainly includes the IP of the packet encapsulated by the source physical machine, the IP of the packet encapsulated by the destination physical machine, and the virtual machine port information (including the virtual machine identifier, such as the virtual switch on the physical machine where the virtual machine resides). NIC port information) and so on.
- the virtual network proxy module 202 is a module responsible for managing all network configurations of a virtual machine on a physical machine (computing node), including Layer 2 switching, Layer 3 routing, load balancing, firewalls, and VPNs.
- a "pre-configured function module” is added to the virtual network proxy module. This module is used to notify the corresponding virtual network proxy module (L2 ⁇ L3 ⁇ DHCP proxy, etc.) for configuration when the pre-configuration API is called. Issued.
- a "one-way springboard function module” is added to the virtual network proxy module. This module is used to call after the virtual machine migration is completed to import the source physical machine traffic to the destination physical machine.
- the computing virtualization module 203 is responsible for the life cycle of the virtual machine at the virtual layer and the management layer of the virtual device, including the creation, startup, and shutdown of virtual machines. It can interface with different hypervisors and upper cloud computing framework platforms.
- the network virtualization module 204 is a platform for providing a virtual machine with basic network communication capabilities and advanced network features, and provides a standard functional interface.
- a "dual springboard function module” is added to the network virtualization module. This module can be invoked by the virtualization module to complete the hot migration of the virtualized module.
- the migration interface can use the two-way springboard for jump communication.
- the springboard mentioned in this application can be understood as having a data forwarding function, and double hop means that the uplink data sent by a third-party physical machine to the source physical machine needs to be jumped, and the destination physical machine needs to be Downlink data sent to a virtual machine on a third-party physical machine also needs to be jumped; single hop means that only uplink data sent by the third-party physical machine to the source physical machine needs to be jumped.
- control node physical machine and the calculation node physical machine in FIG. 2 are only an exemplary implementation in the embodiment of the present invention, and the control node physical machine and the calculation node physical machine in the embodiment of the present invention
- the structure includes but is not limited to the above structure.
- FIG. 5 is a schematic flowchart of a data processing method according to an embodiment of the present invention.
- the method can be applied to the server architecture described in FIG. 3, and the physical machine 20 can be used to support and execute the diagram.
- the method flow shown in step 5501 to step S504.
- the following description will be made from the interaction side of the source physical machine and the destination physical machine with reference to FIG. 3.
- the method may include the following steps S501 to S504, and optionally may further include steps S505 to S508.
- Step S501 The source physical machine receives a first data packet, where the first data packet includes first data, and a destination address of the first data is a first virtual machine.
- Step S502 The source physical machine generates a second data packet, the second data packet includes the first data and an identifier of a second virtual machine, and the first virtual machine is migrated from the source physical machine to the destination physical machine. Next is the second virtual machine, and the identifier of the second virtual machine is used to identify the second virtual machine on the destination physical machine.
- Step S503 the source physical machine sends the second data packet to the destination physical machine; the destination physical machine receives the second data packet sent by the source physical machine.
- Step S504 The destination physical machine determines, according to the second virtual machine identifier, that the first data is data sent to the second virtual machine.
- the source physical machine and the destination physical machine in the embodiments of the present invention are substantially the same, and can be devices such as computers, physical servers, and physical nodes.
- the physical machine where the virtual machine is located before migration is called As the source physical machine
- the physical machine where the virtual machine is migrated is called the destination physical machine.
- the virtual machine before the migration on the source physical machine is referred to as the first virtual machine
- the virtual machine after the migration to the destination physical machine is referred to as the second virtual machine, which will not be described later.
- the first virtual machine on the source physical machine is hot-migrated to the destination physical machine and becomes the second virtual machine.
- the first data packet received by the source physical machine may be sent by a third-party physical machine (which may be the source physical machine or the destination physical machine or other physical machines).
- the destination address of the outer layer packet of the first data packet is the source physical machine, and the destination address of the inner layer packet (the first data) is the first virtual machine. Therefore, after receiving the first data packet, the source physical machine recognizes that the first data packet is sent to the first virtual machine that has been migrated according to the configuration information of the first virtual machine that has not been deleted, and then sends the first data packet.
- Re-encapsulation that is, the outer physical destination address of the first data is updated to the destination physical machine, and the outer physical source address is updated to the source physical machine address, and then forwarded to the destination physical machine where the migrated second virtual machine is located.
- the third-party physical machine is a physical machine where a virtual machine having an interaction relationship with the first virtual machine is located.
- the configuration information of the first virtual machine may include a CPU configuration, a graphics card configuration, a network configuration, a storage configuration, and the like.
- the network configuration information may include flow rules required for Layer 2 communication and routes required for Layer 3 communication Configuration, flow rule configuration, NAT configuration information required for Elastic IP (EIP) communication, etc.
- the network configuration information includes network configurations of Layer 2 communication, Layer 3 communication, and elastic IP communication required by the second virtual machine when receiving and sending data. Therefore, the second virtual machine cannot identify the second data packet received by the destination physical machine. Therefore, in the embodiment of the present invention, an identifier of the second virtual machine is added to the second data packet, so that the destination physical machine can use the identifier according to the identity.
- the receiving object of the second data is the second virtual machine, so the first data can be correctly identified as the data sent to the second virtual machine.
- the identifier of the second virtual machine may be a virtual network card identifier of the second virtual machine, or a name that can uniquely identify the second virtual machine on the destination physical machine. It can be understood that after the first virtual machine is migrated from the source physical machine to the destination physical machine and becomes the second virtual machine, its virtual network card identifier or the name of the virtual machine is usually unchanged, so the source physical machine is in the second data packet. The identifier of the second virtual machine added during the encapsulation process can actually be understood as the identifier of the first virtual machine on the source physical machine.
- the above network configuration information (that is, the general network pre-configuration described later) is used to ensure that the network will not be interrupted due to incomplete network configuration of the destination physical machine after the migration, which can not only reduce network interruption, but also greatly reduce heat.
- the migration duration is independent of the size of the VPC. For example, multiple VMs of a customer can communicate with each other, whether it is Layer 2 communication, Layer 3 communication, or EIP communication.
- the network configuration for receiving data is fixed, because the destination physical machine receives For data, only the relevant fixed network configuration of the destination physical machine is required; however, for the network configuration of the virtual machine to send data, because different network configurations are required to communicate with different virtual machines, the network configuration of sending data may require Join multiple configuration information for multiple VMs. For example, to communicate with 10 VMs may require 100 configurations, then to communicate with 100 VMs requires 1000 configurations. The more virtual machines in a VPC, the more configurations are delivered.
- FIG. 6 is a schematic diagram of a packet encapsulation format of a first data packet and a second data packet according to an embodiment of the present invention.
- Both the first data packet and the second data packet include outer packets. And inner messages. among them
- the third virtual machine in the third-party physical machine interacts with the first virtual machine.
- the message sent by the third virtual machine is an inner layer message, that is, the first data. If it is learned through local flow table rules of the third-party physical machine that communication is required,
- the first virtual machine is the source physical machine, then it needs to be encapsulated into a standard VXLAN packet, that is, the first data packet (as shown in Figure 1), and then sent from the physical network card of the third-party physical machine where it is physically guaranteed.
- the first data packet is sent to the source physical machine.
- the data message may also be encapsulated in a UDP message.
- the third virtual machine and the third virtual machine in the subsequent step S505 may be the same virtual machine or different virtual machines, and the third-party physical machine and the subsequent third-party physical machine may be the same
- the physical machine can also be a different physical machine, that is, the third-party virtual machine on the third-party physical machine can be considered to be a type of virtual machine that interacts with the first virtual machine, rather than a specific virtual machine.
- the application does not specifically limit this.
- the source physical machine After receiving the message, the source physical machine first decapsulates it, and then confirms that this message is the first virtual machine (according to VNI and MAC) that has been migrated. Then the new springboard module of the virtual switch (after the first virtual machine is migrated) After enabling the function for the first virtual machine, the inner layer packet (as shown in FIG. 2) is re-encapsulated, that is, the identity of the second virtual machine is added, and then it is sent to the destination physical machine where the virtual machine is migrated. This prevents data packets sent to the first virtual machine from being discarded during the virtual machine migration process, thereby improving the reliability of data processing.
- the destination physical machine receives the encapsulated packet, and the springboard module will confirm whether it is a packet encapsulated by the springboard. If so, it will decapsulate and obtain the identity of the second virtual machine, such as the virtual network adapter of the second virtual machine. An identifier, and a corresponding virtual network adapter device is found according to the identifier, and then the first layer data, that is, the first data is sent to the second virtual machine through the virtual network adapter device.
- a special VNI identifier such as VNI1 may be carried in the header of the VXLAN of the message, to indicate that the data packet is uplink springboard traffic.
- the timetable 2 in case 1 corresponding to the foregoing FIG. 1 in the present application and the timetable 2 (time period 1 ′ + time period 2 ′) in case 2 that are not timely on the physical machine are resolved.
- the network configuration of the migrated virtual machine is updated, or when the configuration information communicated with the migrated virtual machine is not updated in time with other virtual machines of the tenant after the virtual machine migration is completed, the virtual machine on the third-party physical machine does not store the migrated virtual machine.
- the address of the destination physical machine where the virtual machine is located causes packet loss of the first uplink data sent to the first virtual machine in the source physical machine to avoid network interruption and improve user experience.
- steps S501 to S504 are performed, or after steps S501 to S504 are performed, the following steps S505 to S508 may be further included:
- Step S505 the destination physical machine sends a third data packet to the source physical machine, the third data packet includes the second data and an identifier of the first virtual machine, and the identifier of the first virtual machine is used for The first virtual machine is identified on a physical machine, and the destination address of the second data is a third virtual machine; the source physical machine receives a third data packet sent by the destination physical machine.
- Step S506 The source physical machine determines an address of a third-party physical machine where the third virtual machine is located according to the identifier of the first virtual machine.
- Step S507 The source physical machine generates a fourth data packet according to the address of the third-party physical machine, and the fourth data packet includes the second data.
- Step S508 The source physical machine sends a fourth data packet to the third-party physical machine.
- Step S509 if the source physical machine does not receive the first data packet within a preset time period, delete the configuration information of the first virtual machine.
- the destination physical machine receives the first data sent by the third-party virtual machine through the source physical machine, it needs to feed back the second data, or the destination physical machine needs to take the initiative Send the second data to the third-party virtual machine. At this time, the destination physical machine has learned the address of the third-party virtual machine.
- the destination physical machine is not configured with the network configuration information of the second virtual machine, and the network configuration information includes the physical address information of different virtual machines of the same tenant, the destination physical machine cannot know the third-party virtual machine.
- the physical address of the machine is stored on the source physical machine.
- the destination physical machine sends the third data packet that needs to be sent to the third virtual machine on the third-party physical machine to the source physical machine through the springboard.
- the source physical machine After receiving the data packet, the source physical machine first internally decapsulates the packet to determine the first virtual machine according to the identifier of the first virtual machine, and determines the virtual network adapter device (network port) corresponding to the first virtual machine, and passes the virtual network adapter.
- the device simulates receiving the third data packet, and parses it out according to the destination MAC and IP in the inner packet of the third data packet. This data packet is specifically sent to a third-party virtual machine. Therefore, the configuration information is not deleted.
- the flow table obtains the address of the physical machine corresponding to the MAC of the third-party virtual machine, and then repackages the data packet into a destination address for the third-party virtual machine.
- the address of the physical machine where the machine is located is sent to the third-party physical machine.
- the third data packet may be determined as a springboard message according to the special VNI carried in the VXLAN, and then the corresponding virtual machine network card is further found according to the identifier of the first virtual machine.
- the source address of the first data is the third virtual machine; the destination address of the second data is the third virtual machine; wherein the second data is all The response data of the first data or the first data is response data of the second data. That is, the third-party virtual machine in the third-party physical machine needs to send data to the first virtual machine on the source physical machine, but at this time, the first virtual machine has been migrated to the destination physical machine and has become the second virtual machine after the migration.
- the first data is forwarded to the destination physical machine via the source physical machine, and if the second virtual machine on the destination physical machine needs to respond to the first data, it is the first For the second data, the destination physical machine also forwards the second data to the third-party physical machine through the source physical machine in the form of a third data packet through the source physical machine.
- the destination physical machine also forwards the second data to the third-party physical machine through the source physical machine in the form of a third data packet through the source physical machine.
- the purpose is now The physical machine responds to the second data of the first data, and can be directly sent from the destination physical machine to the third-party physical machine. In this way, the symmetry of the uplink and downlink data between the third-party physical machine and the destination physical machine can be guaranteed. Avoid data loss or packet loss.
- the configuration information of the first virtual machine is deleted.
- the configuration information on the first virtual machine may also be deleted.
- FIG. 7 is a schematic diagram of a packet encapsulation format of a third data packet and a fourth data packet according to an embodiment of the present invention.
- the message sent by the second virtual machine on the destination physical machine is the inner layer message, that is, the second data.
- the virtual switch springboard module on the destination physical machine is enabled, and the inner layer message is directly encapsulated into a springboard message, that is, the third data.
- the packet is then sent to the source physical machine (as shown in Figure 3).
- a special VNI identifier such as VNI2 may be carried in the header of the VXLAN of the message, to indicate that the data packet is downlink springboard traffic.
- the springboard module will confirm whether it is a packet encapsulated by the springboard. If so, it will decapsulate and obtain the identity of the first virtual machine, such as the virtual network adapter of the first virtual machine. Identification, find the corresponding virtual network adapter device based on this identification, simulate the forwarding process after the virtual network adapter device receives the data packet, determine the virtual machine that needs to communicate as the third virtual machine according to the inner layer message, and according to the configuration that has not been deleted The information determines the third-party physical machine address where the third virtual machine is located, and then encapsulates it into a standard VXLAN and sends it to the third-party physical machine.
- the third-party physical machine receives the standard message, then decapsulates it normally, and sends it to the third virtual machine.
- the time period 1 in case 1 and the time period 1 'in case 2 corresponding to the foregoing FIG. 1 in the present application may be resolved.
- the destination physical machine is not timely.
- the second virtual machine needs to communicate with the third virtual machine on the third-party physical machine, but it does not store the address of the third-party physical machine where the third virtual machine is located. Packet loss for downstream data.
- FIG. 8 is a schematic diagram of a network pre-configuration process according to an embodiment of the present invention.
- the computing management scheduling module 101 calls a pre-configured interface before notifying the source physical node of migration.
- the computing management scheduling module 101 then initiates a virtual machine hot migration task. Confirm whether the destination physical machine is specified. If so, directly notify the source physical machine computing agent module 201 to perform the hot migration operation through a Remote Procedure Call (RPC) message; otherwise, the computing management scheduling module 101 selects an available destination physical machine, and then The RPC message notifies the source physical machine computing agent module 201 to perform a hot migration operation;
- RPC Remote Procedure Call
- the source physical machine and the destination physical machine computing agent module 201 perform a host-side check to check the network equipment required by the destination physical machine computing agent module 201 to create a virtual machine after passing the check;
- the computing agent module 201 first calls the pre-configured interface, and when the interface returns successfully, it calls the computing virtualization module 203 to migrate the interface; if a double springboard is used, it needs to be configured on the source physical machine and the destination physical machine. Information required for the springboard, and then the pre-configured interface and the compute virtualization module 203 migrate the interface.
- FIG. 9 is a schematic diagram of a network springboard enabling process according to an embodiment of the present invention. This step is performed after step (1) is completed and after the first virtual machine in the source physical machine in the calculation virtualization module 203 hot migration process is suspended.
- the computing virtualization module 203 performs a live migration. First, a source physical machine and a destination physical machine establish a socket connection.
- the initialization virtual machine on the destination physical machine is in a suspended state, and the source physical machine copies the migrated virtual machine memory to the destination physical machine;
- FIG. 10 is a schematic diagram of a normal working process of a springboard provided by an embodiment of the present invention. This step is performed automatically after steps (1) and (2) are completed.
- uplink traffic (such as the first data packet) that needs to be imported into the source physical machine
- the springboard function module added by the network virtualization module 204 will actively intercept this traffic and use the springboard encapsulation to import the traffic to the second virtual machine of the destination physical machine;
- the traffic will be imported to the source physical machine through the springboard and then forwarded back to the third-party physical machine through the normal path of the source physical machine.
- FIG. 11 is a schematic diagram of a springboard removal process according to an embodiment of the present invention. This step is performed after performing steps (1) and (2).
- the computing virtualization module of the source physical machine periodically detects whether the springboard has timed out and is not used. If the timeout expires, then the source physical machine's hot-migration network springboard is deleted first, and then the deletion of the hot-migration network reverse springboard on the destination physical machine is deleted, otherwise the next cycle is continued. . Perform this step only after confirming that the source physical machine does not have upstream traffic for migrating the virtual machine or the springboard timeout period is reached.
- the following provides a specific implementation of software that applies the data processing method in this application to the Huawei Public Cloud OpenStack cloud platform and places the new functional modules involved in this application on the platform.
- the usage scenario is the upgrade of the Linux kernel version.
- the upgrade of the Linux kernel version cannot be implemented by hot patching. Therefore, the virtual machine on the physical server to be upgraded can only be migrated to another physical server through virtual machine hot migration, and then the version upgrade is performed. Virtual machine migration.
- the specific implementation is as follows:
- the interface of the upgrade tool selects the source host that needs to be upgraded, and then starts the operation of evacuating the host to call the evacuated host interface provided by OpenStack Nova-api.
- the evacuated host interface will first perform a series of verifications for all virtual machine instances on the specified host. , And then update the status to migrating; then pass the live migration task to nova-conductor.
- nova-api is a service that runs on the control node and specializes in computing REST API requests
- nova-conductor is a process introduced to securely access the nova database.
- Nova-conductor constructs a hot migration task according to the incoming information, and then executes the hot migration task.
- the task execution first verifies the state of the migrated virtual machine and the source host state; then calls nova-scheduler to select the available destination host, and then calls through RPC Notify the corresponding source physical machine nova-compute to perform the migration operation.
- nova-scheduler is a process that nova provides specifically for instance lifecycle resource scheduling.
- the source physical machine nova-compute service receives the RPC hot migration request for processing, checks the source host and destination host before hot migration, and then creates virtual ports (network cards), disks, etc. required for the migration of the virtual machine on the destination physical machine. Then call the pre-configured interface provided by neutron-api to deliver L2 communication, L3 communication, EIP communication, network security and other required network configurations for all virtual ports (network cards) of the virtual machine.
- the compute will call the network virtualization layer to provide more than 100,000 dual springboard configuration interfaces.
- the springboard configuration information required to set up a two-way springboard on the virtual port of the source and destination physical machine migration virtual machines includes the springboard package source IP, destination IP, and virtual port Key information such as name, and then call the compute virtualization layer hot migration interface provided by libvirt for hot migration operations;
- the Libvirt process of the source physical machine and the destination physical machine first establishes a socket connection, then transfers the virtual machine xml to the destination physical machine and creates a suspended virtual machine at the destination physical machine, and then the source physical machine iterates the inner layer of the virtual machine. The copy method is sent to the destination physical machine. Before the last round of iteration, the source physical machine virtual machine is suspended (SUSPEND) and the source physical machine is enabled with a springboard.
- FIG. 12 is a schematic diagram of a one-way springboard data model according to an embodiment of the present invention.
- FIG. 13 is a schematic diagram of a bidirectional springboard data model according to an embodiment of the present invention.
- the Libvirt interface returns the migration success to the source physical machine nova-compute, the destination physical machine nova-compute updates the host information of the virtual machine, and the source physical machine nova-compute starts to destroy the virtual machine in the suspended state of the source physical machine. At this point, the migration ends.
- the network virtualization component cyclically detects whether there is traffic on the springboard on the source physical machine. If there is no traffic for more than the specified time, then the network traffic switchover is complete and the springboard can be deleted.
- operations such as network preconfiguration, network springboard configuration, springboard enablement, network springboard function module, and springboard removal are added to the existing hot migration process, so that the data traffic of the migrated virtual machine is expected during the migration process.
- the virtual machines migrated by the destination physical machine after the path is imported can effectively ensure continuous communication of various types of traffic without interruption, thereby ensuring that the interruption time of the hot-migration network is in line with expectations, which is less than 1 second or less overall, and that the stable operation of the business is not affected.
- FIG. 14 is a schematic structural diagram of a physical machine according to an embodiment of the present invention.
- the physical machine is a source physical machine.
- the source physical machine 30 may include a first receiving unit 301, a first processing unit 302, and a first physical unit.
- a sending unit 303 The detailed description of each unit is as follows.
- a first receiving unit 301 configured to receive a first data packet, where the first data packet includes first data, and a destination address of the first data is a first virtual machine;
- a first processing unit 302 configured to generate a second data packet, where the second data packet includes the first data and an identifier of a second virtual machine, and the first virtual machine is thermally migrated from the source physical machine to a destination The physical machine is followed by the second virtual machine, and the identifier of the second virtual machine is used to identify the second virtual machine on the destination physical machine;
- the first sending unit 303 is configured to send the second data packet to the destination physical machine.
- the physical machine further includes:
- the second receiving unit 304 is configured to receive a third data packet sent by the destination physical machine, where the third data packet includes the second data and an identifier of the first virtual machine, and the identifier of the first virtual machine is used for Identifying the first virtual machine on the source physical machine, and the destination address of the second data is a third virtual machine;
- An identifying unit 305 configured to determine an address of a third-party physical machine where the third virtual machine is located according to the identifier of the first virtual machine;
- a second processing unit 306, configured to generate a fourth data packet according to the address of the third-party physical machine, where the fourth data packet includes the second data;
- the second sending unit 307 is configured to send a fourth data packet to the third-party physical machine.
- the third virtual machine is a virtual machine that has an interaction relationship with the first virtual machine; and the identification unit is specifically configured to:
- configuration information of the first virtual machine according to the identifier of the first virtual machine, where the configuration information includes an address of a third-party physical machine where the third virtual machine is located; and searching for and determining all the information according to the configuration information The address of the third-party physical machine where the third virtual machine is located.
- the physical machine further includes:
- the management unit 308 is configured to delete the configuration information of the first virtual machine if the first data packet is not received within a preset period of time.
- migration information of the first virtual machine is not updated on the third virtual machine, and the migration information includes an address of the destination physical machine where the second virtual machine is located.
- FIG. 15 is a schematic structural diagram of another physical machine according to an embodiment of the present invention.
- the physical machine is a destination physical machine.
- the destination physical machine 40 may include a receiving unit 401 and a processing unit 402. A detailed description is as follows.
- the receiving unit 401 is configured to receive a second data packet sent by a source physical machine, where the second data packet is generated by the source physical machine according to the received first data packet, where the first data packet includes the first data
- the destination address of the first data is the first virtual machine
- the second data packet includes the first data and the identifier of the second virtual machine
- the first virtual machine is hot migrated from the source physical machine to
- the destination physical machine is followed by the second virtual machine, and the identifier of the second virtual machine is used to identify the second virtual machine on the destination physical machine;
- the processing unit 402 is configured to determine, according to the second virtual machine identifier, that the first data is data sent to the second virtual machine.
- the physical machine further includes:
- a sending unit 403 is configured to send a third data packet to the source physical machine, where the third data packet includes second data and an identifier of the first virtual machine, and a destination address of the second data is the third virtual machine, The identifier of the first virtual machine is used to identify the first virtual machine on the source physical machine.
- network configuration information of the second virtual machine is not currently configured on the destination physical machine, and the network configuration information includes a configuration rule for Layer 2 communication, a configuration rule for Layer 3 communication, and elasticity. At least one of configuration rules for IP communication.
- FIG. 16 is a schematic structural diagram of still another physical machine according to an embodiment of the present invention.
- the device 50 includes at least one processor 501, at least one memory 502, and at least one communication interface 503.
- the device may also include common components such as antennas, which are not described in detail here.
- the processor 501 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the above program procedures.
- CPU central processing unit
- ASIC application-specific integrated circuit
- the communication interface 503 is configured to communicate with other devices or communication networks, such as Ethernet, wireless access network (RAN), core network, wireless local area network (WLAN), and the like.
- devices or communication networks such as Ethernet, wireless access network (RAN), core network, wireless local area network (WLAN), and the like.
- the memory 502 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type that can store information and instructions
- the dynamic storage device can also be Electrically Erasable Programmable Read-Only Memory (EEPROM), Compact Disc (Read-Only Memory, CD-ROM) or other optical disk storage, optical disk storage (Including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can be used by a computer Any other media accessed, but not limited to this.
- the memory may exist independently and be connected to the processor through a bus. The memory can also be integrated with the processor.
- the memory 502 is configured to store application program code that executes the foregoing solutions, and is controlled and executed by the processor 501.
- the processor 501 is configured to execute application program code stored in the memory 502.
- the code stored in the memory 502 may execute the data processing method provided in FIG. 5 above, such as receiving a first data packet, where the first data packet includes first data, and a destination address of the first data is a first virtual machine; Two data packets, the second data packet includes the first data and an identifier of a second virtual machine, and the first virtual machine is the second virtual machine after hot migration from the source physical machine to the destination physical machine The identifier of the second virtual machine is used to identify the second virtual machine on the destination physical machine; and sending the second data packet to the destination physical machine.
- the code stored in the memory 502 may execute the data processing method provided in FIG. 5 above, such as receiving a second data packet sent by a source physical machine, where the second data packet is generated by the source physical machine according to the received first data packet
- the first data packet includes first data, a destination address of the first data is a first virtual machine, the second data packet includes the first data and an identifier of a second virtual machine, and the first data packet includes After the virtual machine is hot-migrated from the source physical machine to the destination physical machine, the virtual machine is the second virtual machine, and the identifier of the second virtual machine is used to identify the second virtual machine on the destination physical machine;
- the second virtual machine identifier determines that the first data is data sent to the second virtual machine.
- the number of virtual machines can reach 100,000 or even one million. Therefore, if there are third-party virtual machines that have not completely updated the configuration information of the migrated virtual machine communication, there will be bound to be traffic that needs to pass through the source physical machine. If there is a traffic transfer, there may be a network interruption (for example, there may be errors or packet loss during traffic transfer even if the active physical machine is used as a springboard).
- this application also needs to further ensure that the overall time required for virtual machine migration is as short as possible, so as to minimize network interruptions in public cloud scenarios or large-scale virtual machine scenarios.
- FIG. 17 is a schematic diagram of another server architecture according to an embodiment of the present invention.
- the server architecture includes at least one physical machine 10 as a control node, multiple physical machines 20 as computing nodes, and at least one physical machine 30 as a gateway node.
- the physical machine 10 is used to manage the computing resources, network resources, and the like in the connected multiple physical machines 20; multiple physical machines can be deployed on the physical machine 20, and the physical machines 10 can be hot Migration;
- the physical machine 30 acts as a gateway node that centralizes all the gateways and exchanged information of the Virtual Private Network (VPC), and can be used as an intermediate node when communicating across PODs.
- VPC Virtual Private Network
- cross-POD communication refers to cross-domain communication.
- server architecture in FIG. 3 is only an exemplary implementation manner in the embodiment of the present invention, and the network in the embodiment of the present invention includes but is not limited to the above server architecture.
- an embodiment of the present invention provides another physical machine 10, a physical machine 20, and a physical machine 30 that are applied to the server architecture.
- FIG. 18 is a schematic structural diagram of a control node physical machine, a compute node physical machine, and a gateway node physical machine according to an embodiment of the present invention.
- the physical machine 10 as the control node may include a virtual computing management scheduling module 101, Virtual network management control module 102;
- the physical machine 20 as a computing node may include a computing agent module 201, a virtual network agent module 202, a computing virtualization module 203, and a network virtualization module 204.
- the network virtualization module 204 may further include a symmetric routing module.
- Symmetric routing templates can be used to distinguish upstream traffic from springboards or third-party physical machines, and then ensure where the return path comes from and where to return to achieve the effect of symmetry and avoid network interruption caused by asymmetric traffic. For example, when a data packet is sent from a third-party physical machine, transits through the source physical machine, and reaches the destination physical machine, the destination physical machine can also send traffic to the third virtual machine from a symmetrical path, that is, from the destination physical machine. Departure, transit to the third-party physical machine via the source physical machine. When a data packet is sent from a third-party physical machine and directly reaches the destination physical machine, when the destination physical machine sends the data packet to the third virtual machine, it is also directly sent to the third-party physical machine. In the embodiment corresponding to FIG. 5 described above, the symmetry routing module can also be used to limit the symmetry of the path for the destination physical machine to send data packets to the third-party physical machine, which is not repeated here.
- control node physical machine the compute node physical machine
- gateway node physical machine the gateway node physical machine in FIG. 18 is only an exemplary implementation in the embodiment of the present invention. 3.
- the structures of the computing node physical machine and the gateway node physical machine include, but are not limited to, the above structures.
- FIG. 19 is a schematic flowchart of another data processing method according to an embodiment of the present invention.
- the method can be applied to the server architecture described in FIG. 17 above, and the physical machine 20 can be used to support and execute
- the method flow shown in FIG. 19 is step S1901-step S1905.
- the following describes the interaction from the source physical machine, the destination physical machine, and the third-party physical machine with reference to FIG. 19.
- the method may include the following steps S1902 to S1905, and optionally may further include step S1901.
- Step S1901 before the first virtual machine is migrated to the destination physical machine, the network configuration information of the second virtual machine is pre-configured; the network configuration information includes a location where the second virtual machine receives data. Required first network configuration.
- Step S1902 The source physical machine receives a first data packet, where the first data packet includes first data, and a destination address of the first data is a first virtual machine.
- Step S1903 The source physical machine generates a second data packet, where the second data packet includes the first data, and the first virtual machine is hot-migrated from the source physical machine to the destination physical machine and is the second virtual machine. machine.
- Step S1904 the source physical machine sends the second data packet to the destination physical machine; the destination physical machine receives the second data packet sent by the source physical machine, where the second data packet is the first received Generated by a data packet, the first data packet includes first data, a destination address of the first data is a first virtual machine, and the first virtual machine is hot-migrated from the source physical machine to the destination physical machine as The second virtual machine.
- Step S1905 the destination physical machine determines that the first data is data sent to the second virtual machine according to the first network configuration.
- steps S1901 to S1905 since the first virtual machine is migrated to the destination physical machine, the related preconfiguration of the second virtual machine is performed on the destination physical machine, that is, the preconfiguration is completed before the virtual machine is migrated. .
- some third-party physical machines may continue to send data to the source physical machine where the first virtual machine is located if the relevant information about the first virtual machine migrated to the destination physical machine is not updated.
- the virtual machine has actually been migrated to the destination physical machine, so the source physical machine still needs to be used as a relay to forward the received data to the destination physical machine.
- the destination physical machine can directly identify that the first data in the second data packet is sent to the second virtual machine according to the first network configuration, so the second data packet in the embodiment of the present invention may not need to carry the second virtual machine. Identification, the destination physical machine can also be correctly identified.
- the first network configuration includes a network configuration of Layer 2 communication, Layer 3 communication, and elastic IP communication required by the second virtual machine to receive data.
- optimization is mainly performed on the computing agent and network management layer processes, and the network configuration capability required by the virtual machine is embedded in the virtual machine migration process, thereby ensuring that the virtual machine can be used when the network is migrated to the destination physical machine, thereby avoiding Network interruption caused by missing physical network configuration of the destination physical machine.
- the preconfiguration is divided into two types: general network preconfiguration and enhanced network preconfiguration.
- the network configuration information of the second virtual machine may also include the data required by the second virtual machine to send data.
- the second network configuration, and the second network configuration includes a network configuration of Layer 2 communication, Layer 3 communication, and elastic IP communication required for the second virtual machine to send data. That is, the second network configuration includes the address of a third-party physical machine where the third virtual machine that has an interaction relationship with the second virtual machine is located. Therefore, the destination physical machine may send the first virtual machine to the first virtual machine according to the second network configuration.
- the three-party physical machine sends a third data packet, the third data packet includes second data, a destination address of the second data is a third virtual machine, and the third virtual machine is in interaction with the first virtual machine Relationship of virtual machines. That is, the destination physical machine can receive and parse the data sent from the source physical machine to the second virtual machine according to the pre-configured network configuration information, or directly send the data that needs to be sent based on the pre-configured network configuration information, or It is the response data of the first data and is directly sent to the corresponding third-party physical machine.
- the above-mentioned general network preconfiguration is used to ensure that there is no network interruption caused by the incomplete configuration of the destination physical machine network after migration, which can not only reduce network interruption, but also greatly reduce the length of hot migration.
- the network configuration information includes, in addition to the first network configuration required by the second virtual machine to receive data, routing information of a gateway node.
- the destination physical machine may send a data packet to a gateway node according to the routing information, and forward the third data packet to the destination physical machine through the gateway node.
- the third data packet includes second data, a destination address of the second data is a third virtual machine, and the third virtual machine is a virtual machine that has an interaction relationship with the first virtual machine. Because the network joint point stores the address of the third-party physical machine where the second virtual machine on the destination physical machine needs to interact with and the third virtual machine is located.
- the destination physical machine can only pre-configure the first network configuration for receiving data, and the second network configuration will not be performed temporarily because the second network configuration may contain more configuration information. Requires longer configuration time. Then, in the embodiment of the present invention, the pre-configuration of the second network configuration and the virtual machine migration can be performed at the same time. When the second network configuration is not configured, it can be forwarded through the gateway node. At the same time, the destination physical machine continues to be configured with the first Two network configurations. After the first network configuration and the second network configuration are completed on the destination physical machine, data is directly fed back to the third-party physical machine through the destination physical machine. It saves the time of the pre-configured second network configuration, and improves the time and efficiency of the entire migration.
- the third data packet may not be forwarded through the network node, but the second data packet on the destination physical machine.
- the virtual machine may send the third-party physical machine directly according to the second network configuration.
- FIG. 20 it is a schematic diagram of a packet encapsulation format before and after a third data packet is forwarded by a gateway node according to an embodiment of the present invention.
- the source address of the outer packet is the destination physical machine, and the destination address is the gateway physical machine (that is, the gateway node);
- the source address of the inner packet is the first Two virtual machines, the destination address is the third virtual machine;
- the source address of the outer packet of the third data packet is updated to the gateway physical machine, and the destination address is updated to the third-party physical machine ,
- the source address and destination address of the inner message will not change, and the data in the inner message will not change.
- the inner layer packet is in the single springboard application scenario, double springboard application scenario, general network pre-configuration or enhanced network pre-configuration scenario in this application, when the data packet passes the springboard or is forwarded by the gateway node, it is in the
- the outer layer of the data packet changes the address or related information, while the inner layer of the data packet remains unchanged.
- Layer 2 communication For Layer 2 communication, Layer 3 communication, and elastic IP communication, it should be noted that, for example, when VM1 and VM2 belong to the same network segment, the communication between them is Layer 2 communication. If VM1 and VM2 are on the same physical machine, the MAC and PORT are forwarded directly. If VM1 and VM2 are on different physical machines, Layer 2 communication needs tunnel encapsulation, so the Layer 2 configuration is mainly the flow table configuration. As another example, when VM1 and VM3 belong to different network segments, the communication between them is Layer 3 communication. At this time, intermediate routing is required to communicate. Therefore, Layer 3 communication is mainly the configuration of routing.
- the network interruption time of a virtual machine during hot migration cannot be guaranteed due to external factors.
- Virtual machine network services are not affected during the virtual machine migration process.
- the impact of VPC scale cannot meet the time limit requirements for large-scale virtual machine migration.
- customers' multiple cloud servers are distributed on different physical nodes. Therefore, the speed of third-party physical machine configuration updates will directly affect and migrate the virtual machine network outage time.
- the speed of network configuration recovery will also directly affect the network interruption time and live migration duration of the migrated virtual machine. It can also solve the problems of long interruption time of the live migration of virtual machines and the overall time consuming of live migration in the existing distributed hierarchical network architecture. Therefore, through this application, the purposes of deterministic network outage duration and predictable hot migration duration can be achieved, thereby providing guarantee for the use of the hot migration capability in large-scale scenarios such as public clouds and data centers.
- FIG. 21 is a schematic diagram of another network pre-configuration process according to an embodiment of the present invention. This step is performed during the hot migration preparation stage of the computing scheduling management module 101, and the virtual machine hot migration task is initiated by the computing management scheduling module 101.
- RPC Remote Procedure Call
- the source physical machine and the destination physical machine computing agent module 201 perform a host-side inspection to check the network equipment required by the destination physical machine computing virtualization module 203 to create a virtual machine after passing through the host physical machine;
- the computing agent module 201 first calls the enhanced network pre-configuration interface, and when the interface returns successfully, it calls the computing virtualization module 203 to migrate the interface; if a dual springboard is used, the proxy module must be calculated on the source and destination physical machines first 201 Configure the information required for the springboard, and then call the universal network pre-configuration interface and the compute virtualization module 203 migration interface, because the two-way springboard does not rely on the destination physical machine network preconfiguration, so the two interfaces can be called concurrently.
- FIG. 9 is a schematic diagram of a network springboard enabling process according to an embodiment of the present invention. This step is performed after step (1) is completed and after the first virtual machine in the source physical machine in the calculation virtualization module 203 hot migration process is suspended.
- the computing virtualization module 203 performs a live migration. First, a source physical machine and a destination physical machine establish a socket connection.
- the initialization virtual machine on the destination physical machine is in a suspended state, and the source physical machine copies the migrated virtual machine memory to the destination physical machine;
- FIG. 22 is a schematic diagram of another normal working process of a springboard provided by an embodiment of the present invention. This step is performed automatically after steps (1) and (2) are completed.
- uplink traffic (such as the first data packet) that needs to be imported into the source physical machine.
- the springboard function module in the network virtualization module 204 will actively intercept this traffic and use the springboard encapsulation to import the traffic to the second virtual machine of the destination physical machine;
- the symmetry routing module needs to first determine whether the packet is still on the springboard or forwarded normally. If the springboard is passed, the backhaul springboard module performs the original message.
- Encapsulated then sent to the source physical machine and then forwarded to the third-party physical machine following the normal rules of the source physical machine (that is, the double jumper path); if there is no backhaul springboard, you need to confirm whether there is a gateway forwarding route, and if there is backhaul traffic It is forwarded to the gateway and then back to the third-party physical machine, otherwise the destination physical machine is forwarded back to the third-party physical machine (that is, a single springboard path).
- FIG. 11 is a schematic diagram of a springboard removal process according to an embodiment of the present invention. This step is performed after performing steps (1) and (2).
- the computing virtualization module of the source physical machine periodically detects whether the springboard has timed out and is not used. If the timeout expires, then the source physical machine's hot-migration network springboard is deleted first, and then the deletion of the hot-migration network reverse springboard on the destination physical machine is deleted, otherwise the next cycle is continued. . Perform this step only after confirming that the source physical machine does not have upstream traffic for migrating the virtual machine, or the springboard timeout period is reached.
- FIG. 23 is a schematic diagram of a bidirectional springboard + symmetrical routing data model according to an embodiment of the present invention
- FIG. 25 is a schematic diagram of a unidirectional springboard + enhanced network pre-configuration data model provided by an embodiment of the present invention.
- FIG. 26 is a schematic structural diagram of a physical machine according to an embodiment of the present invention.
- the physical machine is a destination physical machine.
- the source and destination physical machine 60 may include a first receiving unit 301, a first processing unit 302, and The first sending unit 303 is described in detail below.
- the receiving unit 601 is configured to receive a second data packet sent by a source physical machine, where the second data packet is generated by the source physical machine according to the received first data packet, where the first data packet includes the first data ,
- the destination address of the first data is a first virtual machine, and the first virtual machine is a second virtual machine after hot migration from the source physical machine to the destination physical machine; the destination physical machine has been pre-configured with The network configuration information of the second virtual machine, where the network configuration information includes a first network configuration required by the second virtual machine to receive data;
- the identifying unit 602 is configured to determine that the first data is data sent to the second virtual machine according to the first network configuration.
- the physical machine 60 further includes:
- a pre-configuration unit 603 is configured to pre-configure network configuration information of the second virtual machine before the first virtual machine is migrated to the destination physical machine.
- the first network configuration includes a network configuration of Layer 2 communication, Layer 3 communication, and elastic IP communication required by the second virtual machine to receive data.
- the network configuration information further includes a second network configuration required by the second virtual machine to send data
- the second network configuration includes a second network configuration required by the second virtual machine to send data.
- Network configuration for Layer 2 communication, Layer 3 communication, and elastic IP communication; physical machine 60 also includes:
- a first sending unit 604 configured to send a third data packet to a third-party physical machine according to the second network configuration, where the third data packet includes second data, and a destination address of the second data is a third virtual machine
- the third virtual machine is a virtual machine that has an interaction relationship with the first virtual machine.
- the network configuration information further includes routing information of a gateway node, where the gateway node stores a third-party physical machine address where a third virtual machine is located, and the third virtual machine is connected to the third virtual machine.
- a virtual machine in which the first virtual machine has an interactive relationship; the physical machine 60 further includes:
- a second sending unit 605 configured to forward a third data packet to a third-party physical machine through the gateway node according to the routing information, where the third data packet includes second data and a destination address of the second data Is the third virtual machine.
- the disclosed device may be implemented in other ways.
- the device embodiments described above are only schematic.
- the division of the above units is only a logical function division.
- multiple units or components may be combined or integrated.
- the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, the indirect coupling or communication connection of the device or unit, and may be electrical or other forms.
- the units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objective of the solution of this embodiment.
- the functional units in the embodiments of the present application may be integrated into one processing unit, or each of the units may exist separately physically, or two or more units may be integrated into one unit.
- the above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
- the technical solution of the present application is essentially a part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium It includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device, and specifically a processor in the computer device) to perform all or part of the steps of the foregoing method in each embodiment of the present application.
- a computer device which may be a personal computer, a server, or a network device, and specifically a processor in the computer device
- the aforementioned storage medium may include: a U disk, a mobile hard disk, a magnetic disk, an optical disk, a read-only memory (Read-Only Memory (ROM) or ROM) or a random access memory (RandomAccess Memory (RAM)).
- Program code medium may include: a U disk, a mobile hard disk, a magnetic disk, an optical disk, a read-only memory (Read-Only Memory (ROM) or ROM) or a random access memory (RandomAccess Memory (RAM)).
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明实施例公开了一种数据处理方法及相关设备,该方法可包括:源物理机接收第一数据包,所述第一数据包包括第一数据,所述第一数据的目的地址为第一虚拟机;所述源物理机生成第二数据包,所述第二数据包包括所述第一数据和第二虚拟机的标识,所述第一虚拟机从所述源物理机热迁移至目的物理机后为所述第二虚拟机,所述第二虚拟机的标识用于在所述目的物理机上识别所述第二虚拟机;所述源物理机向所述目的物理机发送所述第二数据包。采用本发明实施例可以有效减少虚拟机热迁移过程中的网络中断时间,避免通信中断。
Description
本发明涉及虚拟机迁移技术领域,尤其涉及一种数据处理方法及相关设备。
公有云是以服务的方式向公众提供计算资源,如虚拟机资源、存储资源和网络资源等。公有云提供商通常将计算资源租借给多个租户,每个租户都可以创建彼此之间互相独立虚拟交换机以及虚拟子网,以形成网络隔离。同一个物理服务器/物理机上可能会存在多个租户的虚拟机,而同一个租户的虚拟机也可以分布在不同的物理机上,在此架构下,为了保证虚拟机之间正常通信,每个物理机上的虚拟交换机上需要保存同租户其它虚拟机通信所需的必要信息,例如,虚拟机所在主机的IP地址、虚似扩展局域网VXLAN封装所需的网络标识VNI。
在实际应用中,可能存在同一个租户的某些虚拟机需要迁移的情况,例如,当通过监控发现某个物理机上的负载过重,VM性能下降、VM的中央处理器(Central Processing Unit,CPU)争抢过高时,需要执行迁移操作,将对应的VM迁移到其余的资源尚有空余的物理机上。而为了保证迁移过程中服务不中断,通常采用虚拟机的热迁移(Live Migration)技术,即虚拟机保存/恢复,是指将整个虚拟机的运行状态完整保存下来,同时可以快速的恢复到原有硬件平台甚至是不同硬件平台上,恢复以后,虚拟机仍旧平滑运行,用户不会察觉到任何差异。
其中,衡量虚拟机热迁移的重要标准就是网络中断时间,网络中断时间是指虚拟机热迁移过程中网络丢包或者网络业务受损的整个时间长度。为了达成网络不中断需要在迁移目的物理机下发和源物理机完全一致的网络配置,同时需要在虚拟机迁移完成后通知第三方物理机上的虚拟交换机更新与迁移虚拟机通信的配置信息,从而才能保证虚拟机迁移完成后,与其他虚拟机之间网络通信及时恢复。例如,某个租户的多个云服务器分布在不同的物理机上,在迁移虚拟机从源物理机上迁移至目的物理机的过程中,当目的物理机上未及时更新迁移虚拟机的网络配置,或者当虚拟机迁移完成后该租户的其它虚拟机上未及时更新与迁移虚拟机通信的配置信息,都有可能导致网络丢包或者网络业务受损。对于普通业务来说,虚拟机网络中断时间超过3秒势必导致网络业务受损,影响客户感知和体验;而对于游戏等实时性业务来说,虚拟机网络中断超过1秒就会导致业务出现卡顿甚至中断。
因此,如何保证虚拟机热迁移过程中的网络不中断是亟待解决的问题。
发明内容
本发明实施例提供一种数据处理方法及相关设备,以解决虚拟机热迁移过程中的网络中断的问题。
第一方面,本发明实施例提供了一种数据处理方法,可包括:
源物理机接收第一数据包,所述第一数据包包括第一数据,所述第一数据的目的地址为第一虚拟机;所述源物理机生成第二数据包,所述第二数据包包括所述第一数据和第二 虚拟机的标识,所述第一虚拟机从所述源物理机热迁移至目的物理机后为所述第二虚拟机,所述第二虚拟机的标识用于在所述目的物理机上识别所述第二虚拟机;所述源物理机向所述目的物理机发送所述第二数据包。
在本发明实施例,解决了虚拟机在热迁移的过程中可能出现的目的物理机上未及时更新迁移虚拟机的网络配置的情况下,或者当虚拟机迁移完成后同租户的其它虚拟机上未及时更新与迁移虚拟机通信的配置信息的情况下,第三方物理机上的虚拟机由于没有存储迁移后的虚拟机所在的目的物理机的地址,而导致向源物理机中的第一虚拟机发送的上行第一数据的丢包的问题,避免网络中断,提升用户体验。
在一种可能的实现方式中,所述方法还包括:所述源物理机接收所述目的物理机发送的第三数据包,所述第三数据包包括第二数据和第一虚拟机的标识,所述第一虚拟机的标识用于在所述源物理机上识别所述第一虚拟机,所述第二数据的目的地址为第三虚拟机;所述源物理机根据所述第一虚拟机的标识,确定所述第三虚拟机所在的第三方物理机的地址;所述源物理机根据所述第三方物理机的地址生成第四数据包,所述第四数据包包括所述第二数据;
所述源物理机向所述第三方物理机发送第四数据包。
在本发明实施例中,解决了虚拟机在热迁移的过程中,由于虚拟机迁移完成后,目的物理机上未及时更新迁移虚拟机的网络配置的情况下,但第二虚拟机需要和第三方物理机上的第三虚拟机进行通信,却由于没有存储第三虚拟机所在的第三方物理机的地址,而导致的下行的数据的丢包的问题,避免网络中断,提升用户体验。
在一种可能的实现方式中,所述第三虚拟机为与所述第一虚拟机存在交互关系的虚拟机;所述源物理机根据所述第一虚拟机的标识,确定所述第三虚拟机所在的第三方物理机的地址,包括:所述源物理机根据所述第一虚拟机的标识,获取所述第一虚拟机的配置信息,所述配置信息包括所述第三虚拟机所在的第三方物理机的地址;所述源物理机根据所述配置信息,查找并确定所述第三虚拟机所在的第三方物理机的地址。本发明实施例中,在目的物理机上还没有配置完成第二虚拟机的网络配置信息之前,源物理机上还保存有第一虚拟机的配置信息,以便于为第二虚拟机进行上行或者下行的数据的转发。
在一种可能的实现方式中,所述第三虚拟机上未更新完成所述第一虚拟机的迁移信息,所述迁移信息包括所述第二虚拟机所在的所述目的物理机的地址。
在一种可能的实现方式中,所述方法还包括:所述源物理机在预设时间段内未接收到所述第一数据包的情况下,删除所述第一虚拟机的所述配置信息。本发明实施例,当所有的第三方物理机上的相关虚拟机都更新完成关于第一虚拟机的迁移相关信息之后,则可以删除第一虚拟机的所述配置信息,无需再进行数据转发功能。
在一种可能的实现方式中,所述网络配置信息包括所述第二虚拟机接收数据和发送数据时所需的二层通信、三层通信和弹性IP通信的网络配置。以满足分布式分层网络组网场景下的虚拟机热迁移的数据传输的网络配置需求。
在一种可能的实现方式中,所述第一数据的源地址为所述第三虚拟机;所述第二数据的目的地址为所述第三虚拟机;其中,所述第二数据为所述第一数据的响应数据或所述第一数据为所述第二数据的响应数据。即当数据包是从第三方物理机发出,并通过源物理机 转发至目的物理机时,则第三方物理机在向第三方物理机反馈数据时,同样也通过对称的路径进行数据的反馈或者发送,避免因为流量传输的不对称导致的丢包问题。
第二方面,本发明实施例提供了一种数据处理的方法,可包括:
源物理机接收目的物理机发送的第三数据包,所述第三数据包包括第二数据和第一虚拟机的标识,所述第一虚拟机的标识用于在所述源物理机上识别所述第一虚拟机,所述第二数据的目的地址为第三虚拟机;所述源物理机根据所述第一虚拟机的标识,确定所述第三虚拟机所在的第三方物理机的地址;所述源物理机根据所述第三方物理机的地址生成第四数据包,所述第四数据包包括所述第二数据;所述源物理机向所述第三方物理机发送第四数据包。
在一种可能的实现方式中,所述方法还包括:源物理机接收第一数据包,所述第一数据包包括第一数据,所述第一数据的目的地址为第一虚拟机;所述源物理机生成第二数据包,所述第二数据包包括所述第一数据和第二虚拟机的标识,所述第一虚拟机从所述源物理机热迁移至目的物理机后为所述第二虚拟机,所述第二虚拟机的标识用于在所述目的物理机上识别所述第二虚拟机;所述源物理机向所述目的物理机发送所述第二数据包。
在一种可能的实现方式中,所述第三虚拟机为与所述第一虚拟机存在交互关系的虚拟机;所述源物理机根据所述第一虚拟机的标识,确定所述第三虚拟机所在的第三方物理机的地址,包括:所述源物理机根据所述第一虚拟机的标识,获取所述第一虚拟机的配置信息,所述配置信息包括所述第三虚拟机所在的第三方物理机的地址;所述源物理机根据所述配置信息,查找并确定所述第三虚拟机所在的第三方物理机的地址。
在一种可能的实现方式中,所述第三虚拟机上未更新完成所述第一虚拟机的迁移信息,所述迁移信息包括所述第二虚拟机所在的所述目的物理机的地址。
在一种可能的实现方式中,所述方法还包括:所述源物理机在预设时间段内未接收到所述第一数据包的情况下,删除所述第一虚拟机的所述配置信息。
第三方面,本发明实施例提供了一种数据处理的方法,可包括:
目的物理机接收源物理机发送的第二数据包,所述第二数据包为所述源物理机根据接收到的第一数据包生成的,所述第一数据包包括第一数据,所述第一数据的目的地址为第一虚拟机,所述第二数据包包括所述第一数据和第二虚拟机的标识,所述第一虚拟机从所述源物理机热迁移至目的物理机后为所述第二虚拟机,所述第二虚拟机的标识用于在所述目的物理机上识别所述第二虚拟机;所述目的物理机根据所述第二虚拟机标识,确定所述第一数据是发送给所述第二虚拟机的数据。
在一种可能的实现方式中,所述方法还包括:所述目的物理机向所述源物理机发送第三数据包,所述第三数据包包括第二数据和第一虚拟机的标识,所述第二数据的目的地址为第三虚拟机,所述第一虚拟机的标识用于在所述源物理机上识别所述第一虚拟机。
在一种可能的实现方式中,所述目的物理机上当前未配置完成所述第二虚拟机的网络配置信息,所述网络配置信息包括二层通信的配置规则、三层通信的配置规则和弹性IP通信的配置规则中的至少一种。
第四方面,本发明实施例提供了一种数据处理的方法,可包括:
目的物理机向源物理机发送第三数据包,所述第三数据包包括第二数据和第一虚拟机的标识,所述第二数据的目的地址为第三虚拟机,所述第一虚拟机的标识用于在所述源物理机上识别所述第一虚拟机。
在一种可能的实现方式中,目的物理机接收源物理机发送的第二数据包,所述第二数据包为所述源物理机根据接收到的第一数据包生成的,所述第一数据包包括第一数据,所述第一数据的目的地址为第一虚拟机,所述第二数据包包括所述第一数据和第二虚拟机的标识,所述第一虚拟机从所述源物理机热迁移至目的物理机后为所述第二虚拟机,所述第二虚拟机的标识用于在所述目的物理机上识别所述第二虚拟机;所述目的物理机根据所述第二虚拟机标识,确定所述第一数据是发送给所述第二虚拟机的数据。
在一种可能的实现方式中,所述目的物理机上当前未配置完成所述第二虚拟机的网络配置信息,所述网络配置信息包括二层通信的配置规则、三层通信的配置规则和弹性IP通信的配置规则中的至少一种。
第五方面,本发明实施例提供了一种物理机,所述物理机为源物理机,可包括:
第一接收单元,用于接收第一数据包,所述第一数据包包括第一数据,所述第一数据的目的地址为第一虚拟机;
第一处理单元,用于生成第二数据包,所述第二数据包包括所述第一数据和第二虚拟机的标识,所述第一虚拟机从所述源物理机热迁移至目的物理机后为所述第二虚拟机,所述第二虚拟机的标识用于在所述目的物理机上识别所述第二虚拟机;
第一发送单元,用于向所述目的物理机发送所述第二数据包。
在一种可能的实现方式中,所述物理机还包括:
第二接收单元,用于接收所述目的物理机发送的第三数据包,所述第三数据包包括第二数据和第一虚拟机的标识,所述第一虚拟机的标识用于在所述源物理机上识别所述第一虚拟机,所述第二数据的目的地址为第三虚拟机;
识别单元,用于根据所述第一虚拟机的标识,确定所述第三虚拟机所在的第三方物理机的地址;
第二处理单元,用于根据所述第三方物理机的地址生成第四数据包,所述第四数据包包括所述第二数据;
第二发送单元,用于向所述第三方物理机发送第四数据包。
在一种可能的实现方式中,所述第三虚拟机为与所述第一虚拟机存在交互关系的虚拟机;所述识别单元,具体用于:
根据所述第一虚拟机的标识,获取所述第一虚拟机的配置信息,所述配置信息包括所述第三虚拟机所在的第三方物理机的地址;根据所述配置信息查找并确定所述第三虚拟机所在的第三方物理机的地址。
在一种可能的实现方式中,所述第三虚拟机上未更新完成所述第一虚拟机的迁移信息,所述迁移信息包括所述第二虚拟机所在的所述目的物理机的地址。
在一种可能的实现方式中,所述物理机还包括:
管理单元,用于在预设时间段内未接收到所述第一数据包的情况下,删除所述第一虚拟机的所述配置信息。
第六方面,本发明实施例提供了一种物理机,所述物理机为目的物理机,包括:
接收单元,用于接收源物理机发送的第二数据包,所述第二数据包为所述源物理机根据接收到的第一数据包生成的,所述第一数据包包括第一数据,所述第一数据的目的地址为第一虚拟机,所述第二数据包包括所述第一数据和第二虚拟机的标识,所述第一虚拟机从所述源物理机热迁移至目的物理机后为所述第二虚拟机,所述第二虚拟机的标识用于在所述目的物理机上识别所述第二虚拟机;
处理单元,用于根据所述第二虚拟机标识,确定所述第一数据是发送给所述第二虚拟机的数据。
在一种可能的实现方式中,所述物理机还包括:
发送单元,用于向所述源物理机发送第三数据包,所述第三数据包包括第二数据和第一虚拟机的标识,所述第二数据的目的地址为第三虚拟机,所述第一虚拟机的标识用于在所述源物理机上识别所述第一虚拟机。
在一种可能的实现方式中,所述目的物理机上当前未配置完成所述第二虚拟机的网络配置信息,所述网络配置信息包括二层通信的配置规则、三层通信的配置规则和弹性IP通信的配置规则中的至少一种。
第七方面,本发明实施例提供了一种数据处理的方法,可包括:
目的物理机接收源物理机发送的第二数据包,所述第二数据包为所述源物理机根据接收到的第一数据包生成的,所述第一数据包包括第一数据,所述第一数据的目的地址为第一虚拟机,所述第一虚拟机从所述源物理机热迁移至目的物理机后为第二虚拟机;所述目的物理机上已经预先配置有所述第二虚拟机的网络配置信息,所述网络配置信息包括所述第二虚拟机接收数据所需的第一网络配置;所述目的物理机根据所述第一网络配置,确定所述第一数据是发送给所述第二虚拟机的数据。
本发明实施例,通过在虚拟机需要热迁移的目的物理机上预先配置该迁移虚拟机的网络配置信息,因此可以根据该第一网络配置正确识别从源物理机转发过来的第三方物理机上第三虚拟机发出的数据包为发送给迁移虚拟机的,避免目的物理机上由于缺失网络配置信息而导致的接收数据的丢包,同时减少了第三方物理机完成第二虚拟机迁移信息更新的整体时长,也即减少了网络中断的发生的时长及概率。
在一种可能的实现方式中,所述目的物理机接收源物理机发送的第二数据包之前,还包括:所述目的物理机在所述第一虚拟机迁移到所述目的物理机之前,预先配置所述第二虚拟机的网络配置信息。本发明实施例,通过在虚拟机需要热迁移的目的物理机上预先配置该迁移虚拟机的网络配置信息,避免目的物理机上由于缺失网络配置信息而导致的丢包或网络中断,同时减少了第三方物理机完成第二虚拟机迁移信息更新的整体时长,也即减少了网络中断的发生的时长及概率。
在一种可能的实现方式中,所述第一网络配置包括所述第二虚拟机接收数据所需的二 层通信、三层通信和弹性IP通信的网络配置。以满足分布式分层网络组网场景下的虚拟机热迁移的数据传输的网络配置需求。
在一种可能的实现方式中,所述网络配置信息还包括所述第二虚拟机发送数据所需的第二网络配置,所述第二网络配置包括所述第二虚拟机发送数据所需的二层通信、三层通信和弹性IP通信的网络配置;所述方法,还包括:所述目的物理机根据所述第二网络配置向第三方物理机发送第三数据包,所述第三数据包包括第二数据,所述第二数据的目的地址为第三虚拟机,所述第三虚拟机为与所述第一虚拟机存在交互关系的虚拟机。本发明实施例可以通过在虚拟机迁移之前,预先进行网络配置信息中的配置,使得目的物理机可以根据第一网络配置接收数据以及根据第二网络配置发送数据,以减少由于网络配置信息缺失导致的数据丢包,同时减少了第三方物理机完成第二虚拟机迁移信息更新的整体时长,也即减少了网络中断的发生的时长及概率。
在一种可能的实现方式中,所述网络配置信息还包括网关节点的路由信息,所述网关节点存储有第三虚拟机所在的第三方物理机地址,所述第三虚拟机为与所述第一虚拟机存在交互关系的虚拟机;所述方法还包括:所述目的物理机根据所述路由信息,通过所述网关节点将第三数据包转发给第三方物理机,所述第三数据包包括第二数据,所述第二数据的目的地址为所述第三虚拟机。本发明实施例可以通过在虚拟机迁移之前,预先只完成接收数据的第一网络配置的配置,使得目的物理机可以根据第一网络配置接收数据,因为第一网络配置中所包含的网络配置相对固定,配置完成所需的时间较短,而针对目的物理机发送数据的第二网络配置(需要包含多个相关联第三虚拟机的配置)则可能需要较长时间配置完成。所以本发明实施例中,在预配置时,先完成第一网络的配置,即可开始虚拟机的迁移,并可以在虚拟机开始迁移的同时或者之后再进行第二网络配置,而在此期间,将目的物理机需要发出的数据包,通过网关节点进行转发即可。减少由于网络配置信息缺失导致的数据丢包,同时进一步地减少了第三方物理机完成第二虚拟机迁移信息更新的整体时长,也即进一步减少了网络中断的发生的时长及概率。
第八方面,本发明实施例提供了一种数据处理的方法,可包括:源物理机接收第一数据包,所述第一数据包包括第一数据,所述第一数据的目的地址为第一虚拟机;所述源物理机生成第二数据包,所述第二数据包包括所述第一数据,所述第一虚拟机从所述源物理机热迁移至目的物理机后为所述第二虚拟机;所述源物理机向所述目的物理机发送所述第二数据包。
第九方面,本发明实施例提供了一种物理机,所述物理机为目的物理机,可包括:
接收单元,用于接收源物理机发送的第二数据包,所述第二数据包为所述源物理机根据接收到的第一数据包生成的,所述第一数据包包括第一数据,所述第一数据的目的地址为第一虚拟机,所述第一虚拟机从所述源物理机热迁移至目的物理机后为第二虚拟机;所述目的物理机上已经预先配置有所述第二虚拟机的网络配置信息,所述网络配置信息包括所述第二虚拟机接收数据所需的第一网络配置;
识别单元,用于根据所述第一网络配置,确定所述第一数据是发送给所述第二虚拟机 的数据。
在一种可能的实现方式中,所述物理机,还包括:
预配置单元,用于在所述第一虚拟机迁移到所述目的物理机之前,预先配置所述第二虚拟机的网络配置信息。
在一种可能的实现方式中,所述第一网络配置包括所述第二虚拟机接收数据所需的二层通信、三层通信和弹性IP通信的网络配置。
在一种可能的实现方式中,所述网络配置信息还包括所述第二虚拟机发送数据所需的第二网络配置,所述第二网络配置包括所述第二虚拟机发送数据所需的二层通信、三层通信和弹性IP通信的网络配置;所述物理机,还包括:
第一发送单元,用于根据所述第二网络配置向第三方物理机发送第三数据包,所述第三数据包包括第二数据,所述第二数据的目的地址为第三虚拟机,所述第三虚拟机为与所述第一虚拟机存在交互关系的虚拟机。
在一种可能的实现方式中,所述网络配置信息还包括网关节点的路由信息,所述网关节点存储有第三虚拟机所在的第三方物理机地址,所述第三虚拟机为与所述第一虚拟机存在交互关系的虚拟机;所述物理机还包括:
第二发送单元,用于根据所述路由信息,通过所述网关节点将第三数据包转发给第三方物理机,所述第三数据包包括第二数据,所述第二数据的目的地址为所述第三虚拟机。
第十方面,本发明实施例提供了一种物理机,所述物理机为源物理机,可包括:
接收单元,用于接收第一数据包,所述第一数据包包括第一数据,所述第一数据的目的地址为第一虚拟机;
处理单元,用于生成第二数据包,所述第二数据包包括所述第一数据,所述第一虚拟机从所述源物理机热迁移至目的物理机后为所述第二虚拟机;
发送单元,用于向所述目的物理机发送所述第二数据包。
第十一方面,本发明实施例提供了一种数据处理系统,包括:源物理机和目的物理机,其中所述源物理机为上述第五方面任意一种实现方式中的源物理机;所述目的物理机为上述第六方面任意一种实现方式中的目的物理机;或者,所述源物理机为上述第十方面任意一种实现方式中的源物理机;所述目的物理机为上述第九方面任意一种实现方式中的目的物理机;
第十二方面,本发明实施例提供一种物理机,该物理机中包括处理器,处理器被配置为支持该物理机实现第一方面、第二方面、第三方面、第四方面、第七方面或第八方面提供的数据处理方法中相应的功能。该物理机还可以包括存储器,存储器用于与处理器耦合,其保存该物理机必要的程序指令和数据。该物理机还可以包括通信接口,用于该物理机与其他设备或通信网络通信。
第十三方面,本发明实施例提供一种计算机存储介质,用于储存为上述第五方面、第六方面、第九方面和第十方面提供的物理机中的处理器中所用的计算机软件指令,其包含用于执行上述方面所设计的程序。
第十四方面,本发明实施例提供了一种计算机程序,该计算机程序包括指令,当该计算机程序被计算机执行时,使得计算机可以执行上述第十三方面提供的物理机中的处理器所执行的流程。
第十五方面,本申请提供了一种芯片系统,该芯片系统包括处理器,用于支持物理机实现上述第一方面、第二方面、第三方面、第四方面、第七方面或第八方面中所涉及的功能,例如,生成或处理上述数据处理方法中所涉及的信息。在一种可能的设计中,所述芯片系统还包括存储器,所述存储器,用于保存数据发送设备必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。
为了更清楚地说明本发明实施例或背景技术中的技术方案,下面将对本发明实施例或背景技术中所需要使用的附图进行说明。
图1是本发明实施例提供的一种虚拟机热迁移对应的网络中断示意图。
图2是本发明实施例提供的另一种虚拟机热迁移对应的网络中断示意图。
图3是本发明实施例提供的一种服务器构架示意图。
图4是本发明实施例提供的一种控制节点物理机和计算节点物理机的结构示意图。
图5是本发明实施例提供的一种数据处理方法的流程示意图。
图6是本发明实施例提供的一种第一数据包和第二数据包的报文封装格式示意图。
图7是本发明实施例提供的一种第三数据包和第四数据包的报文封装格式示意图。
图8是本发明实施例提供的一种网络预配置流程示意图;
图9是本发明实施例提供的一种网络跳板使能流程示意图;
图10是本发明实施例提供的一种跳板正常工作流程示意图;
图11是本发明实施例提供的一种跳板拆除流程示意图;
图12是本发明实施例提供的一种单向跳板数据模型示意图;
图13是本发明实施例提供的一种双向跳板数据模型示意图。
图14是本发明实施例提供的一种物理机的结构示意图;
图15是本发明实施例提供的另一种物理机的结构示意图;
图16是本发明实施例提供的又一种物理机的结构示意图;
图17是本发明实施例提供的另一种服务器构架示意图;
图18是本发明实施例提供的一种控制节点物理机、计算节点物理机和网关节点物理机的结构示意图;
图19是本发明实施例提供的另一种数据处理方法的流程示意图;
图20是本发明实施例提供的一种第三数据包通过网关节点转发前后的报文封装格式示意图;
图21是本发明实施例提供的另一种网络预配置流程示意图;
图22是本发明实施例提供的另一种跳板正常工作流程示意图;
图23是本发明实施例提供的一种双向跳板+对称性路由数据模型示意图;
图24是本发明实施例提供的一种单向跳板+通用网络预配置数据模型示意图;
图25是本发明实施例提供的一种单向跳板+增强网络预配置数据模型示意图;
图26是本发明实施例提供的一种物理机的结构示意图。
下面将结合本发明实施例中的附图,对本发明实施例进行描述。
本申请的说明书和权利要求书及所述附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
在本说明书中使用的术语“部件”、“模块”、“系统”等用于表示计算机相关的实体、硬件、固件、硬件和软件的组合、软件、或执行中的软件。例如,部件可以是但不限于,在处理器上运行的进程、处理器、对象、可执行文件、执行线程、程序和/或计算机。通过图示,在计算设备上运行的应用和计算设备都可以是部件。一个或多个部件可驻留在进程和/或执行线程中,部件可位于一个计算机上和/或分布在2个或更多个计算机之间。此外,这些部件可从在上面存储有各种数据结构的各种计算机可读介质执行。部件可例如根据具有一个或多个数据分组(例如来自与本地系统、分布式系统和/或网络间的另一部件交互的二个部件的数据,例如通过信号与其它系统交互的互联网)的信号通过本地和/或远程进程来通信。
首先,对本申请中的部分用语进行解释说明,以便于本领域技术人员理解。
(1)虚拟机热迁移,又叫动态迁移、实时迁移,即虚拟机保存/恢复,通常是将整个虚拟机的运行状态完整保存下来,同时可以快速的恢复到原有硬件平台甚至是不同硬件平台上。恢复以后,虚拟机仍旧平滑运行,用户不会察觉到任何差异。
(2)虚拟交换机,是软件程序,使一台虚拟机能够与另一台虚拟机可以相互通信。与物理以太网交换机类似,vSwitch通过在传递包之前对其进行检查来控制数据报文的收发。
(3)中断时间,特指虚拟机热迁移过程网络丢包或者网络业务受损的整个时间长度。
(4)分层架构,将解决方案的组件分隔到不同的层中。每一层中的组件应保持内聚性,并且应大致在同一抽象级别。每一层都应与它下面的各层保持松散耦合。
(5)虚似扩展局域网(Virtual Extensible LAN,VXLAN)是一种网络虚似化技术,试图改进大型云计算的部署时的扩展问题。可以说是对vlan的一种扩展,由于vlan Header头部限长是12bit,导致vlan的限制个数是2^12=4096个,无法满足日益增长的需求。
(6)VXLAN网络标识(VXLAN Network Identifier,VNI),VNI类似VLAN ID,用于区分VXLAN段,不同VXLAN段的虚拟机不能直接二层相互通信。一个VNI表示一个租户,即使多个终端用户属于同一个VNI,也表示一个租户。VNI由24比特组成,支持多 达16M((2^24-1)/1024^2)的租户。
(7)媒体访问控制(Media Access Control,MAC)地址,用来定义网络设备的位置。在OSI模型中,第三层网络层负责IP地址,第二层数据链路层则负责MAC地址。因此一个主机会有一个MAC地址,而每个网络位置会有一个专属于它的IP地址。
首先,分析并提出本申请所具体要解决的技术问题。首先需要先对本申请实施例所解决的技术问题对应的实际应用场景进行阐述和分析。在本申请中,将虚拟机热迁移分为两种情况,第一种是虚拟机资源先迁移完成+配置信息后配置完成;第二种是配置信息先配置完成+虚拟机资源后迁移完成,其中虚拟机资源可以包括虚拟处理器(vCPU)、虚拟内存(vMEM)、虚拟网卡(vNIC)、虚拟存储(vStorage)等资源,配置信息可包括二层通信所需流规则、三层通信所需路由、流规则、弹性IP(EIP)通信所需网络地址转换(NetworkAddressTranslation,NAT)规则、安全组、服务质量QOS等配置信息。
配置信息可以包括。针对上述两种情况下可能存在的网络中断情形,进行如下分析:
情况一:配置信息先配置完成+虚拟机资源后迁移完成
请参见图1,图1为本发明实施例提供的一种虚拟机热迁移对应的网络中断示意图。如图1所示,可以按照迁移的时间节点,分为时间段1和时间段2。其中
时间段1,是指在(配置信息已配置完成+虚拟机资源未迁移完成)之后,(配置信息配置完成+虚拟机资源迁移完成)之前的时间段。
在上述时间段1内,由于无论目的物理机上是否已经完成了配置信息的配置,只要当前虚拟机资源还未从源物理机热迁移至目的物理机,那么源物理机上的虚拟机(假设为第一虚拟机)就可以正常工作,因此不管此时是有上行流量,还是有下行流量,都是由第一虚拟机来处理,因此,在该时间段1内不存在由于热迁移导致的网络丢包的情况,也即基本不存在网络中断情况。
时间段2:是指在(配置信息配置完成+虚拟机资源迁移完成)之后,(所有第三方物理机上都更新完与迁移虚拟机通信的配置信息)之前的时间段。
在上述时间段2内,由于管理物理机(控制节点)会在目的物理机的虚拟机资源迁移完成以及配置信息配置完成之后,才会通知第三方物理机(可以为源物理机上也可以为目的物理机上,还可以为其它物理机)更新与迁移虚拟机通信的配置信息。因此在时间段2内可能存在多个第三方物理机均需要更新,但是更新速度不一致的情况,因此当这部分未更新完成的虚拟机中的任意一个需要向第一虚拟机发送上行数据包(假设为第一数据包)时,由于当前还是存储的迁移前的第一虚拟机所在的源物理机的地址,而没有存储迁移后第二虚拟机所在的目的物理机的地址,因此,只能先发送到第一虚拟机。然而,第一虚拟机已经迁移到目的物理机上了,因此不能正常接收并处理数据包,导致上行网络丢包,也即是存在上行网络中断。由于在时间段2内,目的物理机上已经完成了虚拟机的资源迁移和配置信息的配置,因此可以正常工作,所以当目的物理机有下行数据包(假设为第三数据包)需要发送的时候,则直接与需要通信的第三方物理机通信即可,因此不存在由于热迁移导致的网络丢包,也基本不存下行中断。
情况二:虚拟机资源先迁移完成+配置信息后配置完成
请参见图2,图2为本发明实施例提供的另一种虚拟机热迁移对应的网络中断示意图。如图2所示,可以按照迁移的时间节点,分为时间段1’和时间段2’。其中
时间段1’,是指在(虚拟机资源已迁移完成+配置信息未配置完成)之后,(配置信息配置完成+虚拟机资源迁移完成)之前的时间段。
在上述时间段1’内,由于源物理机上的第一虚拟机已经迁移至目的物理机上,因此,源物理机上已经没有第一虚拟机,而目的物理机上只有第二虚拟机但还没有配置。在这种情况下当有相关联的虚拟机向第一虚拟机发送上行数据(假设为第一数据包),那么此时由于源物理机上已经没有第一虚拟机,因此无法处理该第一数据包,只能丢弃;而此时当目的物理机上的第二虚拟机需要向相关联的虚拟机(假设为第三虚拟机)发送下行数据(假设为第三数据包),由于目的物理机上暂未配置完成配置信息,因此无法获知第三虚拟机所在的物理机地址,因此无法成功发送。所以在上述时间段1’内,可能存在由于热迁移导致的上行或者下行网络丢包,也即是存在网络中断。
时间段2’,是指在(配置信息配置完成+虚拟机资源迁移完成)之后,(所有第三方物理机上都更新完与迁移虚拟机通信的配置信息)之前的时间段;
可以理解的是,情况二中的时间段2’对应的网络中断情况,与情况一中的时间段2对应的网络中断情况相同,在此不再赘述。
需要说明的是,热迁移过程中的虚拟机资源迁移,不需要考虑虚拟机资源迁移过程中的时间段,因为虚拟机在由源物理机迁移到目的物理机之前,如果没有完整迁移完成,源物理机上的虚拟机还是正常运行的。
综上所述,本申请实际要解决的技术问题是,在上述两种情况下,如何避免由于热迁移导致的网络丢包,也即是如何在目的物理机上未及时更新迁移虚拟机的网络配置,或者当虚拟机迁移完成后同租户的其它虚拟机上未及时更新与迁移虚拟机通信的配置信息的情况下,仍然能保证同租户的虚拟机之间可以正常的进行数据交互,进而减少或者避免网络中断。
为了便于理解本发明实施例,以下示例性列举本申请中的数据处理方法所应用的虚拟机热迁移的场景,可以包括如下场景:
场景一,源物理机硬件系统的维护,故障修复和升级(upgrade),但运行在源物理机上的虚拟机不能关机,因此,需要将源物理机上的虚拟机热迁移至目的物理机。
场景二,源物理机器软件系统升级,打补丁(patch),由于这些需要重启物理机才可以生效,然而运行在源物理机上的虚拟机不能关机,为了不影响上面运行的虚拟机,在升级和打补丁之前,需要将源物理机上的虚拟机热迁移至目的物理机。
场景三,源物理机上的负载太重,且运行在源物理机上的虚拟机不能关机,因此,需要将源物理机上的虚拟机热迁移至目的物理机,以减少源物理机上的虚拟机来释放资源。
场景四,在一个集群(cluster)里,源物理机上的虚拟机较多,目的物理机上虚拟机较少,且运行在源物理机上的虚拟机不能关机,因此,需要将源物理机上的虚拟机热迁移至目的物理机,以达到资源平衡。
可以理解的是,上述四种应用场景的只是本发明实施例中的几种示例性的实施方式, 本发明实施例中的应用场景包括但不仅限于以上应用场景。
基于上述提出的技术问题以及本申请中对应的应用场景,也为了便于理解本发明实施例,下面先对本发明实施例所基于的其中一种服务器架构进行描述。请参阅图3,图3是本发明实施例提供的一种服务器构架示意图。该服务器架构中至少包含了一个作为控制节点的物理机10和多个作为计算节点的物理机20。其中,物理机10用于对所连接的多个物理机20中的计算资源、网络资源等进行管理;物理机20上则可以部署多个虚拟机,并可以在物理机10的管理下进行热迁移。其中,任意一个物理机20都可以作为本申请中的源物理机将上面的虚拟机迁移到其它物理机20,也可以作为目的物理机接收源物理机上的虚拟机迁移。可以理解的是,图3中的服务器架构只是本发明实施例中的一种示例性的实施方式,本发明实施例中的网络包括但不仅限于以上服务器架构。
基于上述服务器架构,本发明实施例提供一种应用于上述服务器架构中的物理机10和物理机20。请参见图4,图4是本发明实施例提供的一种控制节点物理机和计算节点物理机的结构示意图,作为控制节点的物理机10可包括虚拟计算管理调度模块101、虚拟网络管理控制模块102;作为计算节点的物理机20可以包括计算代理模块201、虚拟网络代理模块202、计算虚拟化模块203以及网络虚拟化模块204。其中,
虚拟计算管理调度模块101,用于负责管理所有计算资源、网络、认证、调度及可扩展性的平台,对外提供标准的计算API接口,内部对接计算代理模块。
虚拟网络管理控制模块102,用于负责虚拟网络分配和虚拟网络资源管理的平台,对外提供标准的网络资源API接口,内部对接虚拟网络代理模块。在本申请中,虚拟网络管理控制模块增加“预配置API”,此模块用于计算代理模块执行热迁移操作时调用,在迁移的目的物理机下发网络配置。
计算代理模块201,用于负责物理机(计算节点)上管理虚拟机的生命周期的模块,包括创建实例、终止实例、迁移实例、Resize实例等。本申请中,计算代理模块增加“双跳板配置适配模块”,此模块用于在计算代码模块执行热迁移操作时调用,分别在迁移的源物理机和目的物理机配置跳板所需的信息,配置信息主要包括源物理机封装报文的IP、目的物理机封装报文的IP、虚拟机端口信息(包括虚拟机的标识,例如虚拟机所在的物理机上虚拟交换机对应放入该虚拟机的虚拟网卡的端口信息)等。
虚拟网络代理模块202,用于负责物理机(计算节点)上管理虚拟机的所有网络配置的模块,包括二层交换,三层路由,负载均衡,防火墙和VPN等。本申请中,虚拟网络代理模块增加“预配置功能模块”,此模块用于当预配置API被调用后,虚拟网络管控模块通知对应的虚拟网络代理模块(L2\L3\DHCP代理等)做配置下发。在本申请中,虚拟网络代理模块增加“单向跳板功能模块”,此模块用于虚拟机迁移完成后调用,将源物理机流量导入目的物理机。
计算虚拟化模块203,用于负责虚拟层虚拟机生命周期、虚拟设备管理层,包括虚拟机创建、启动、关闭等,可对接不同Hypervisors以及上层云计算框架平台。
网络虚拟化模块204,用于为虚拟机提供基本网络通信能力及网络高级特性的平台,对上提供标准的功能接口。在本申请中,网络虚拟化模块增加“双跳板功能模块”,此模块 由计算虚拟化模块虚拟机热迁移完成调用使能接口即可,迁移虚拟机进出流量通过双向跳板进行跳转通信。
需要说明的是,本申请中所提及的跳板可以理解为带有数据转发功能的,双跳则是指由第三方物理机发送给源物理机的上行数据需要进行跳转,目的物理机需要发送给第三方物理机上的虚拟机的下行数据也需要进行跳转;单跳则是指,仅由第三方物理机发送给源物理机的上行数据需要进行跳转。
可以理解的是,图2中的控制节点物理机和计算节点物理机的结构只是本发明实施例中的一种示例性的实施方式,本发明实施例中的控制节点物理机和计算节点物理机的结构包括但不仅限于以上结构。
基于图3提供的服务器架构,以及图4提供的控制节点和计算节点的物理机的结构,结合本申请中提供的数据处理方法,对本申请中提出的技术问题进行具体分析和解决。
参见图5,图5是本发明实施例提供的一种数据处理方法的流程示意图,该方法可应用于上述图3中所述的服务器架构中,其中的物理机20可以用于支持并执行图5中所示的方法流程步骤S501-步骤S504。下面将结合附图3从源物理机和目的物理机的交互侧进行描述。该方法可以包括以下步骤S501-步骤S504,可选的还可以包括步骤S505-步骤S508。
步骤S501:源物理机接收第一数据包,所述第一数据包包括第一数据,所述第一数据的目的地址为第一虚拟机。
步骤S502:源物理机生成第二数据包,所述第二数据包包括所述第一数据和第二虚拟机的标识,所述第一虚拟机从所述源物理机热迁移至目的物理机后为所述第二虚拟机,所述第二虚拟机的标识用于在所述目的物理机上识别所述第二虚拟机。
步骤S503:源物理机向所述目的物理机发送所述第二数据包;目的物理机接收源物理机发送的第二数据包。
步骤S504:目的物理机根据所述第二虚拟机标识,确定所述第一数据是发送给所述第二虚拟机的数据。
需要说明的是,本发明实施例中的源物理机和目的物理机的实质相同,均可以为电脑、物理服务器、物理节点等设备,为了便于描述,将虚拟机迁移前所处的物理机称为源物理机,将虚拟机迁移后所在的物理机称为目的物理机。同理,为了便于描述,将在源物理机上迁移前的虚拟机称为第一虚拟机,将迁移至目的物理机后的虚拟机称为第二虚拟机,后续不再赘述。
具体地,在上述步骤S501-步骤S504对应的实施例中,源物理机上的第一虚拟机热迁移到目的物理机上后为第二虚拟机。源物理机接收的第一数据包可以为第三方物理机(可以是源物理机也可以是目的物理机还可以是其它物理机)发送的。该第一数据包的外层报文的目的地址为源物理机,内层报文(第一数据)的目的地址是第一虚拟机。因此,源物理机接收到第一数据包后,根据还未删除的第一虚拟机的相关配置信息识别出该第一数据包是发送给已经迁移走的第一虚拟机后,将第一数据重新进行封装,即将第一数据的外层物理目的地址更新为目的物理机,将外层物理源地址更新为源物理机地址,从而转发给迁移后的第二虚拟机所在的目的物理机上,以使得第二虚拟机能够接收到第一数据从而进行 处理。避免由于源物理机上没有第一虚拟机而无法正确接收并处理第一数据导致的丢包。可选的,第三方物理机为与第一虚拟机存在交互关系的虚拟机所在的物理机。可选的,第一虚拟机的配置信息可以包括CPU配置、显卡配置、网络配置、存储配置等。
在一种可能的实现方式中,当目的物理机上还没有完成第二虚拟机的网络配置信息,而该网络配置信息中可能包括了二层通信所需的流规则、三层通信所需的路由配置、流规则配置、弹性IP(EIP)通信所需的NAT配置信息等。可选的,所述网络配置信息包括所述第二虚拟机接收数据和发送数据时所需的二层通信、三层通信和弹性IP通信的网络配置。因此,导致第二虚拟机无法识别目的物理机接收到的第二数据包,所以,本发明实施例在第二数据包中添加第二虚拟机的标识,以使的目的物理机可以根据该标识识别出第二数据的接收对象为第二虚拟机,因此可以正确识别出第一数据为发送给第二虚拟机的数据。可选的,第二虚拟机的标识可以为第二虚拟机的虚拟网卡标识,或者是可以在目的物理机上唯一识别第二虚拟机的名称等。可以理解的是,当第一虚拟机从源物理机上迁移到目的物理机上成为第二虚拟机后,其虚拟网卡标识或者虚拟机的名称通常是不变的,因此源物理机在第二数据包封装的过程中添加的第二虚拟机的标识,实际上可以理解为是源物理机上第一虚拟机的标识。
上述网络配置信息(也即后文所述的通用网络预配置),用于保证迁移后不会因为目的物理机网络配置未完成而导致的网络中断,不仅可以减少网络中断,同时可大大减少热迁移时长,且与VPC规模无关。例如,一个客户多个VM之间可以互通,无论是二层通信、三层通信还是EIP通信,对于虚拟机接收数据的方向而言,接收数据的网络配置是固定的,因为对于目的物理机接收数据来说,只需要目的物理机的相关的固定网络配置即可;但是对于虚拟机发送数据方向的网络配置,由于和不同虚拟机通信需要下不同的网络配置,因此发送数据的网络配置可能需要加入多个VM的多个配置信息,例如需要和10个VM通信可能需要100条配置,那么需要和100个VM通信就需要1000条配置。VPC下虚拟机规模越多下发的配置越多。而通用预配置结合双跳板的时候,可以是并行的操作,可以不依赖网络预配置完成,所以中断时间不会受VPC规模影响(现有方案VPC规模越大中断可能越长),但是迁移的整体耗时跟网络预配置完成时间相关的。
例如,如图6所示,图6为本发明实施例提供的一种第一数据包和第二数据包的报文封装格式示意图,第一数据包和第二数据包均包括外层报文和内层报文。其中
1、第三方物理机中与第一虚拟机存在交互关系的第三虚拟机发出的报文为内层报文即第一数据,如果通过第三方物理机本地的流表规则等学习到需要通信的第一虚拟机在源物理机,那么需要封装成标准的VXLAN报文即第一数据包(如图1所示)然后从所在的第三方物理机的物理网卡发送出去,物理上会保证将第一数据包送到源物理机。可选的,在实际应用过程中,在对数据报文进行封装的过程中,还可以将数据报文封装在UDP报文中。需要说明的是,该第三虚拟机与后续步骤S505中的第三虚拟机可以是同一个虚拟机也可以不同的虚拟机,且该第三方物理机与后续的第三方物理机可以是同一个物理机也可以是不同物理机,即可以认为第三方物理机上的的第三方虚拟机,是指与第一虚拟机存在交互关系的一类虚拟机,而不是某个特指的虚拟机,本申请对此不作具体限定。
2、源物理机收到报文之后先解封装,然后确认这个报文是已经迁移走的第一虚拟机(根 据VNI和MAC)那么虚拟交换机新增的跳板模块(在第一虚拟机迁移完之后针对第一虚拟机使能功能)会重新封装内层报文(如图2所示)即增加第二虚拟机的标识,然后再发送给虚拟机迁移后所在的目的物理机。避免了虚拟机迁移过程中向第一虚拟机发送的数据报文被丢弃,进而提高了数据处理的可靠性。
3、目的物理机收到封装报文,跳板模块会确认是否为跳板封装的报文,如果是,那么会解封装然后获取到这个第二虚拟机的标识,如为第二虚拟机的虚拟网卡标识,根据这个标识找到对应的虚拟网卡设备,那么通过这个虚拟网卡设备将内层报文即第一数据发给第二虚拟机。可选的,在报文的VXLAN的头部可以携带特殊的VNI标识如VNI1,用于指示该数据包为上行跳板流量。
在本发明实施例,解决了本申请中前述图1中对应的情况一中的时间段2,和情况二中的(时间段1’+时间段2’)中可能出现的目的物理机上未及时更新迁移虚拟机的网络配置,或者当虚拟机迁移完成后同租户的其它虚拟机上未及时更新与迁移虚拟机通信的配置信息的情况下,第三方物理机上的虚拟机由于没有存储迁移后的虚拟机所在的目的物理机的地址,而导致向源物理机中的第一虚拟机发送的上行第一数据的丢包,避免网络中断,提升用户体验。
可选地,在上述步骤S501-步骤S504执行之前,或者在上述步骤S501-步骤S504执行之后,还可以包括以下步骤S505-步骤S508:
步骤S505:目的物理机向所述源物理机发送第三数据包,所述第三数据包包括第二数据和第一虚拟机的标识,所述第一虚拟机的标识用于在所述源物理机上识别所述第一虚拟机,所述第二数据的目的地址为第三虚拟机;所述源物理机接收所述目的物理机发送的第三数据包。
步骤S506:源物理机根据所述第一虚拟机的标识,确定所述第三虚拟机所在的第三方物理机的地址。
步骤S507:源物理机根据所述第三方物理机的地址生成第四数据包,所述第四数据包包括所述第二数据。
步骤S508:源物理机向所述第三方物理机发送第四数据包。
步骤S509:源物理机在预设时间段内未接收到所述第一数据包的情况下,删除所述第一虚拟机的所述配置信息。
具体地,在上述步骤S505-步骤S509对应的实施例中,若目的物理机通过源物理机接收到了第三方虚拟机发送过来的第一数据后需要反馈第二数据,或者,目的物理机需要主动发送第二数据给第三方虚拟机,那么,此时目的物理机是已经获知了第三方虚拟机的地址的。可选的,如果目的物理机上没有配置第二虚拟机的网络配置信息,而该网络配置信息中又包含了同租户的不同虚拟机所在的物理地址信息,那么目的物理机则无法获知第三方虚拟机的物理地址。而在本发明实施例中该地址信息在源物理机上是有存储的,因此,目的物理机将需要发送给第三方物理机上的第三虚拟机的的第三数据包通过跳板发送给源物理机。源物理机收到该数据包之后,先内部解封装报文根据第一虚拟机的标识确定第一虚拟机,并确定该第一虚拟机对应的虚拟网卡设备(网口),通过该虚拟网卡设备模拟接收 所述第三数据包,并根据第三数据包的内层报文中的目的MAC和IP解析出来这个数据包具体是发送给第三方虚拟机的,因此通过还未删除的配置信息如流表(该配置信息包括了第三方虚拟机所在的物理机的地址)获取到第三方虚拟机的MAC所对应的物理机的地址,再将该数据包重新封装成目的地址为第三方虚拟机所在的物理机的地址,发送给该第三方物理机。可选的,也可以根据携带在VXLAN中的特殊VNI确定第三数据包为跳板报文,然后再进一步根据第一虚拟机的标识找到对应的虚拟机网卡。
在一种可能的实现方式中,所述第一数据的源地址为所述第三虚拟机;所述第二数据的目的地址为所述第三虚拟机;其中,所述第二数据为所述第一数据的响应数据或所述第一数据为所述第二数据的响应数据。也即是第三方物理机中的第三方虚拟机需要向源物理机上的第一虚拟机发送数据,但此时,第一虚拟机已经迁移至目的物理机上,并成为了迁移后的第二虚拟机,通过本申请中源物理机上的跳板进行转发之后,该第一数据经由源物理机转发给了目的物理机,目的物理机上的第二虚拟机若需要响应所述第一数据,即为第二数据时,则目的物理机也同样通过源物理机将第二数据,以第三数据包的形式通过源物理机转发给第三方物理机。可以理解的是,当第三方物理机上的第三虚拟机上已经更新完了第一虚拟机迁移的相关信息之后,若第三虚拟机是直接向目的物理机上发送第一数据时,则此时目的物理机响应所述第一数据的第二数据,可以直接从目的物理机上发送给第三方物理机,如此一来,可以保证第三方物理机和目的物理机之间上行和下行数据的对称性,避免数据遗漏或者丢包。
在一种可能的实现方式中,源物理机在预设时间段内未接收到所述第一数据包的情况下,删除所述第一虚拟机的所述配置信息。可选的,当目的物理机上的第二虚拟机的网络配置完成后,也可以删除第一虚拟机上的配置信息。
例如,如图7所示,图7为本发明实施例提供的一种第三数据包和第四数据包的报文封装格式示意图。
1、目的物理机上的第二虚拟机发出的报文为内层报文即第二数据,目的物理机上的虚拟交换机跳板模块使能,直接将内层报文封装成跳板报文即第三数据包,然后发送给源物理机(如图3所示)。可选的,在报文的VXLAN的头部可以携带特殊的VNI标识如VNI2,用于指示该数据包为下行跳板流量。
2、源物理机收到封装报文,跳板模块会确认是否为跳板封装的报文,如果是,那么会解封装然后获取到这个第一虚拟机的标识,例如为第一虚拟机的虚拟网卡标识,根据这个标识找到对应的虚拟网卡设备,模拟这个虚拟网卡设备接收到了数据包之后的转发流程,根据内层报文确定需要通信的虚拟机为第三虚拟机,并根据还未删除的配置信息确定第三虚拟机所在的第三方物理机地址,然后封装成标准的VXLAN,发送给第三方物理机。
3、第三方物理机收到标准报文,然后正常的解封装,再送到第三虚拟机。
在本发明实施例中,解决了本申请中前述图1中对应的情况一中的时间段1和情况二中的时间段1’中可能出现的由于虚拟机迁移完成后,目的物理机上未及时更新迁移虚拟机的网络配置的情况下,但第二虚拟机需要和第三方物理机上的第三虚拟机进行通信,却由于没有存储第三虚拟机所在的第三方物理机的地址,而导致的下行的数据的丢包。
下面结合本发明实施例提供的物理机10和物理机20的结构,并基于上述提供的物理机20所执行的方法流程,提供以下应用于热迁移场景中避免网络中断的实施方式,步骤如下:
(1)热迁移目的物理机虚拟网络预配置
如图8所示,图8为本发明实施例提供的一种网络预配置流程示意图。
首先,计算管理调度模块101在通知源物理节点迁移之前调用预配置接口。然后计算管理调度模块101发起虚拟机热迁移任务。确认是否指定目的物理机,如是那么直接通过远程过程调用(Remote Procedure Call,RPC)消息通知源物理机计算代理模块201执行热迁移操作;否则,计算管理调度模块101选择可用目的物理机,再通过RPC消息通知源物理机计算代理模块201执行热迁移操作;
然后,源物理机和目的物理机计算代理模块201执行主机侧检查,检查通过后目的物理机计算代理模块201创建虚拟机所需网络设备;
最后,如果使用单跳板那么计算代理模块201先调用预配置接口,等接口返回成功再调用计算虚拟化模块203迁移接口;如果使用双跳板需要先在源物理机和目的物理机计算代理模块201配置跳板所需信息,再调用预配置接口和计算虚拟化模块203迁移接口。
(2)热迁移网络跳板使能
如图9所示,图9为本发明实施例提供的一种网络跳板使能流程示意图。本步骤在步骤(1)完成后并且等计算虚拟化模块203热迁移流程中源物理机中的第一虚拟机暂停之后执行。
计算虚拟化模块203热迁移首先源物理机和目的物理机建立socket连接;
然后目的物理机上初始化虚拟机处于暂停状态,源物理机将迁移虚拟机内存拷贝到目的物理机上;
最后一轮内存迭代拷贝前暂停虚拟机并使能热迁移网络跳板,完成最后一轮迭代拷贝再唤醒目的物理机虚拟机。
(3)热迁移网络跳板转发
如图10所示,图10为本发明实施例提供的一种跳板正常工作流程示意图。本步骤在步骤(1)和步骤(2)完成之后自动执行。
有上行流量(例如第一数据包)需要导入源物理机,网络虚拟化模块204新增的跳板功能模块会主动截获此流量,通过跳板封装将流量导入目的物理机的第二虚拟机;
第二虚拟机回复的下行流量(例如第三数据包)如果有回程跳板将通过跳板将流量导入源物理机再走源物理机的正常转发回到第三方物理机上,双跳板路径;
如果没有回程跳板走目的物理机正常的转发,单跳板路径。
(4)热迁移网络跳板拆除
如图11所示,图11为本发明实施例提供的一种跳板拆除流程示意图。本步骤在步骤(1)和步骤(2)执行完之执行。
源物理机的计算虚拟化模块周期性检测跳板是否超时未使用,如果超时那么先删除源物理机热迁移网络跳板,再通知删除目的物理机上热迁移网络反向跳板,否则再继续下一轮循环。直到确认源物理机无迁移虚拟机的上行流量,或者跳板超时时间到达再执行本步 骤。
以下提供一种将将本申请中的数据处理方法,应用于华为公有云OpenStack云平台,并将本申请涉及的新增功能模块放置的平台对应的软件中的具体实施方式。使用场景是Linux内核版本升级,Linux内核版本升级无法通过热补丁方式实施,所以只能通过虚拟机热迁移将待升级物理服务器上虚拟机迁移到其他物理服务器,然后实施版本升级,完成后再进行虚拟机回迁。具体实施方式如下:
1、升级工具界面选择需要升级的源主机,然后启动迁空主机操作即调用OpenStack nova-api提供的迁空主机接口,迁空主机接口会对于指定主机上所有虚拟机实例先做一系列校验,然后更新状态为migrating;再将热迁移任务传递到nova-conductor。其中nova-api是运行于控制节点上专门处理计算REST API请求的服务、nova-conductor是为了安全访问nova数据库的引入的进程。
2、nova-conductor根据传入信息构建热迁移任务,再执行热迁移任务,任务执行首先校验迁移虚拟机的状态、源主机状态;然后调用nova-scheduler选择可用的目的主机,然后通过RPC调用通知对应源物理机nova-compute执行迁移操作。其中nova-scheduler是nova提供专门用于实例生命周期资源调度的进程。
3、源物理机nova-compute服务收到RPC热迁移请求进行处理,在热迁移之前进行源主机和目的主机检查,然后在目的物理机创建迁移虚拟机所需虚拟端口(网卡)、磁盘等,再调用neutron-api提供的预配置接口下发虚拟机所有虚拟端口(网卡)的L2通信、L3通信、EIP通信、网络安全等所需网络配置。如果是单向跳板方式那么需等预配置接口返回成功后,调用libvirt提供的计算虚拟化层热迁移接口进行热迁移操作;如果是双向跳板无需等预配置接口返回,源和目的物理机nova-compute会调用网络虚拟机化层提供十多万双跳板配置接口分别在源和目的物理机迁移虚拟机的虚拟端口上设置双向跳板所需的跳板配置信息包括跳板封装源IP、目的IP、虚拟端口名称等关键信息,然后调用libvirt提供的计算虚拟化层热迁移接口进行热迁移操作;
4、源物理机和目的物理机的Libvirt进程先建立socket连接,然后将虚拟机xml传到目的物理机并且在目的物理机创建暂停状态的虚拟机,然后源物理机将虚拟机内层通过迭代拷贝方式发送到目的物理机,最后一轮迭代前先将源物理机虚拟机暂停(SUSPEND)并且源物理机使能跳板,然后源物理机发送最后一轮内存给目的物理机,再唤醒(RESUME)在目的物理机虚拟机,此时需要更新虚拟和物理交换机MAC表项并且通过neutron-server使用RPC消息通知所有计算节点更新迁移虚拟机的所在主机信息,计算节点L2Agent收到消息进行处理。此时迁移虚拟机的流量模型如果是单向跳板,如图12所示,图12是本发明实施例提供的一种单向跳板数据模型示意图。如图13所示,图13是本发明实施例提供的一种双向跳板数据模型示意图。
5、Libvirt接口返回迁移成功给源物理机nova-compute,目的物理机nova-compute更新虚拟机的Host信息、源物理机nova-compute开始销毁源物理机暂停状态的虚拟机,至此迁移结束。网络虚拟化组件循环在源物理机检测跳板上是否存在流量经过,如果超过规定时间无流量,那么说明网络流量切换完成即可删除跳板。
本发明实施例,在现有热迁移流程中增加了网络预配置、网络跳板配置、跳板使能、网络跳板功能模块、跳板拆除等操作,进而使迁移虚拟机的数据流量在迁移过程中按照预期路径导入目的物理机迁移完成的虚拟机,可有效保证各种类型流量持续通信不中断,从而保证热迁移网络中断时间符合预期,整体上小于1秒或者更短,保证业务稳定运行不受影响。
上述详细阐述了本发明实施例的方法,下面提供了本发明实施例的相关装置。
请参见图14,图14是本发明实施例提供的一种物理机的结构示意图,所物理机为源物理机,该源物理机30可以包括第一接收单元301、第一处理单元302和第一发送单元303,其中,各个单元的详细描述如下。
第一接收单元301,用于接收第一数据包,所述第一数据包包括第一数据,所述第一数据的目的地址为第一虚拟机;
第一处理单元302,用于生成第二数据包,所述第二数据包包括所述第一数据和第二虚拟机的标识,所述第一虚拟机从所述源物理机热迁移至目的物理机后为所述第二虚拟机,所述第二虚拟机的标识用于在所述目的物理机上识别所述第二虚拟机;
第一发送单元303,用于向所述目的物理机发送所述第二数据包。
在一种可能的实现方式中,所述物理机还包括:
第二接收单元304,用于接收所述目的物理机发送的第三数据包,所述第三数据包包括第二数据和第一虚拟机的标识,所述第一虚拟机的标识用于在所述源物理机上识别所述第一虚拟机,所述第二数据的目的地址为第三虚拟机;
识别单元305,用于根据所述第一虚拟机的标识,确定所述第三虚拟机所在的第三方物理机的地址;
第二处理单元306,用于根据所述第三方物理机的地址生成第四数据包,所述第四数据包包括所述第二数据;
第二发送单元307,用于向所述第三方物理机发送第四数据包。
在一种可能的实现方式中,所述第三虚拟机为与所述第一虚拟机存在交互关系的虚拟机;所述识别单元,具体用于:
根据所述第一虚拟机的标识,获取所述第一虚拟机的配置信息,所述配置信息包括所述第三虚拟机所在的第三方物理机的地址;根据所述配置信息查找并确定所述第三虚拟机所在的第三方物理机的地址。
在一种可能的实现方式中,所述物理机还包括:
管理单元308,用于在预设时间段内未接收到所述第一数据包的情况下,删除所述第一虚拟机的所述配置信息。
在一种可能的实现方式中,所述第三虚拟机上未更新完成所述第一虚拟机的迁移信息,所述迁移信息包括所述第二虚拟机所在的所述目的物理机的地址。
需要说明的是,本发明实施例中所描述的源物理机30中各功能单元的功能可参见上述图5中所述的方法实施例中步骤S501-步骤S509的相关描述,此处不再赘述。
请参见图15,图15是本发明实施例提供的另一种物理机的结构示意图,所物理机为目的物理机,该目的物理机40可以包括接收单元401、处理单元402,其中,各个单元的详细描述如下。
接收单元401,用于接收源物理机发送的第二数据包,所述第二数据包为所述源物理机根据接收到的第一数据包生成的,所述第一数据包包括第一数据,所述第一数据的目的地址为第一虚拟机,所述第二数据包包括所述第一数据和第二虚拟机的标识,所述第一虚拟机从所述源物理机热迁移至目的物理机后为所述第二虚拟机,所述第二虚拟机的标识用于在所述目的物理机上识别所述第二虚拟机;
处理单元402,用于根据所述第二虚拟机标识,确定所述第一数据是发送给所述第二虚拟机的数据。
在一种可能的实现方式中,所述物理机还包括:
发送单元403,用于向所述源物理机发送第三数据包,所述第三数据包包括第二数据和第一虚拟机的标识,所述第二数据的目的地址为第三虚拟机,所述第一虚拟机的标识用于在所述源物理机上识别所述第一虚拟机。
在一种可能的实现方式中,所述目的物理机上当前未配置完成所述第二虚拟机的网络配置信息,所述网络配置信息包括二层通信的配置规则、三层通信的配置规则和弹性IP通信的配置规则中的至少一种。
需要说明的是,本发明实施例中所描述的目的物理机40中各功能单元的功能可参见上述图5中所述的方法实施例中步骤S501-步骤S509的相关描述,此处不再赘述。
如图16所示,图16是本发明实施例提供的又一种物理机的结构示意图,该装置50包括至少一个处理器501,至少一个存储器502、至少一个通信接口503。此外,该设备还可以包括天线等通用部件,在此不再详述。
处理器501可以是通用中央处理器(CPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制以上方案程序执行的集成电路。
通信接口503,用于与其他设备或通信网络通信,如以太网,无线接入网(RAN),核心网,无线局域网(Wireless Local Area Networks,WLAN)等。
存储器502可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过总线与处理器相连接。存储器也可以和处理器集成在一起。
其中,所述存储器502用于存储执行以上方案的应用程序代码,并由处理器501来控制执行。所述处理器501用于执行所述存储器502中存储的应用程序代码。
存储器502存储的代码可执行以上图5提供的数据处理方法,比如接收第一数据包,所述第一数据包包括第一数据,所述第一数据的目的地址为第一虚拟机;生成第二数据包,所述第二数据包包括所述第一数据和第二虚拟机的标识,所述第一虚拟机从所述源物理机热迁移至目的物理机后为所述第二虚拟机,所述第二虚拟机的标识用于在所述目的物理机上识别所述第二虚拟机;向所述目的物理机发送所述第二数据包。
存储器502存储的代码可执行以上图5提供的数据处理方法,比如接收源物理机发送的第二数据包,所述第二数据包为所述源物理机根据接收到的第一数据包生成的,所述第一数据包包括第一数据,所述第一数据的目的地址为第一虚拟机,所述第二数据包包括所述第一数据和第二虚拟机的标识,所述第一虚拟机从所述源物理机热迁移至目的物理机后为所述第二虚拟机,所述第二虚拟机的标识用于在所述目的物理机上识别所述第二虚拟机;根据所述第二虚拟机标识,确定所述第一数据是发送给所述第二虚拟机的数据。
需要说明的是,本发明实施例中所描述的物理机50中各功能单元的功能可参见上述图5中所述的方法实施例中的步骤S501-步骤S509相关描述,此处不再赘述。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
在虚拟机热迁移时需要保证网络不中断,除了上述实施例中所解决的由于网络流量不能正确到达目的地或者不能被正确接收,导致的可能存在的网络中断,另外一个衡量指标则是虚拟机热迁移的整个时长。为了达成虚拟机热迁移后网络不中断需要在迁移目的物理机下发和源物理机完全一致的网络配置,同时需要在虚拟机迁移完成后通知第三方物理机上的虚拟交换机更新与迁移虚拟机通信的配置信息,从而才能保证虚拟机迁移完成后,与其他虚拟机之间网络通信及时恢复。
在公有云场景下,虚拟机数量可达到十万甚至百万级别,因此,如果有第三方虚拟机没有全部更新完迁移虚拟机通信的配置信息,就势必会有流量需要经过源物理机的中转,有流量的中转,就有可能会有网络中断(例如,可能存在即使有源物理机作为跳板,但是仍然可能会存在流量中转时发生错误或者丢包)。因此,虚拟机热迁移(包括网络配置完成和虚拟机迁移完成)的整个时间越长,第三方物理机上的第三虚拟机开始更新与迁移虚拟机通信的配置信息就越晚,而当第三虚拟机的数量越多时,所有第三虚拟机更新完与迁移虚拟机通信的配置信息的时间,就越长,那么在此期间存在网络中断的可能性也就越大。所以,本申请还需要进一步的保证虚拟机迁移的整体耗时尽量短,以尽可能的减少公有云场景或者大规模的虚拟机场景下的网络中断。
请参阅图17,图17是本发明实施例提供的另一种服务器构架示意图。该服务器架构中至少包含了一个作为控制节点的物理机10、多个作为计算节点的物理机20和至少一个作为网关节点的物理机30。其中,物理机10用于对所连接的多个物理机20中的计算资源、网络资源等进行管理;物理机20上则可以部署多个虚拟机,并可以在物理机10的管理下进行热迁移;物理机30则作为网关节点集中了所有虚拟专有网络(Virtual Private Cloud,VPC)的网关和交换信息,可作为跨POD通信时的中间节点。其中,跨POD通信则是指跨域通信,例如,某客户的两个云服务器分别运行在两个城市的机房中,它们之间的相互 通信,则为跨域通信。可以理解的是,图3中的服务器架构只是本发明实施例中的一种示例性的实施方式,本发明实施例中的网络包括但不仅限于以上服务器架构。
基于上述服务器架构,本发明实施例提供另一种应用于上述服务器架构中的物理机10、物理机20和物理机30。请参见图18,图18是本发明实施例提供的一种控制节点物理机、计算节点物理机和网关节点物理机的结构示意图,作为控制节点的物理机10可包括虚拟计算管理调度模块101、虚拟网络管理控制模块102;作为计算节点的物理机20可以包括计算代理模块201、虚拟网络代理模块202、计算虚拟化模块203以及网络虚拟化模块204。关于各个模块的具体功能描述请参照上述图4的描述。其中,相较于图4中的结构示意图,可选的,网络虚拟化模块204中还可以包括对称性路由模块。
对称性路由模板,可以用于区分上行流量从跳板还是第三方物理机过来,然后保证回流路径从哪里过来从哪里回复,以达到对称的效果,避免流量不对称引起的网络中断问题。例如,当数据包是从第三方物理机发出,经由源物理机中转再到达目的物理机,则目的物理机需要向该第三虚拟机发送流量时也可以从对称的路径,即从目的物理机出发,经由源物理机中转再达到第三方物理机。当数据包是从第三方物理机发出,直接达到了目的物理机,则目的物理机向第三虚拟机发送数据包时,也是直接发送至第三方物理机。上述图5对应的实施例中也可以通过该对称性路由模块对目的物理机向第三方物理机发送数据包的路径进行对称性限定,在此不再赘述。
可以理解的是,图18中的控制节点物理机、计算节点物理机和网关节点物理机的结构只是本发明实施例中的一种示例性的实施方式,本发明实施例中的控制节点物理机、计算节点物理机和网关节点物理机的结构包括但不仅限于以上结构。
基于图17提供的服务器架构,以及图18提供的控制节点和计算节点的物理机的结构,结合本申请中提供的数据处理方法,对本申请中提出的技术问题进行具体分析和解决。
参见图19,图19是本发明实施例提供的另一种数据处理方法的流程示意图,该方法可应用于上述图17中所述的服务器架构中,其中的物理机20可以用于支持并执行图19中所示的方法流程步骤S1901-步骤S1905。下面将结合附图19从源物理机、目的物理机以及第三方物理机的交互侧进行描述。该方法可以包括以下步骤S1902-步骤S1905,可选的还可以包括步骤S1901。
步骤S1901:目的物理机在所述第一虚拟机迁移到所述目的物理机之前,预先配置所述第二虚拟机的网络配置信息;所述网络配置信息包括所述第二虚拟机接收数据所需的第一网络配置。
步骤S1902:源物理机接收第一数据包,所述第一数据包包括第一数据,所述第一数据的目的地址为第一虚拟机。
步骤S1903:源物理机生成第二数据包,所述第二数据包包括所述第一数据,所述第一虚拟机从所述源物理机热迁移至目的物理机后为所述第二虚拟机。
步骤S1904:源物理机向目的物理机发送所述第二数据包;目的物理机接收源物理机发送的第二数据包,所述第二数据包为所述源物理机根据接收到的第一数据包生成的,所述第一数据包包括第一数据,所述第一数据的目的地址为第一虚拟机,所述第一虚拟机从 所述源物理机热迁移至目的物理机后为第二虚拟机。
步骤S1905:目的物理机根据所述第一网络配置,确定所述第一数据是发送给所述第二虚拟机的数据。
在上述步骤S1901至S1905中,由于会在将第一虚拟机迁移至目的物理机之前,就对目的物理机上进行第二虚拟机的相关预配置,也即是在虚拟机迁移之前就完成预配置。此时,在该场景下,可能会存在部分第三方物理机上的若没有更新好第一虚拟机迁移至目的物理机上的相关信息,则可能会继续向第一虚拟机所在的源物理机上发送数据,而此时实际上虚拟机已经迁移至目的物理机上,因此仍然需要源物理机作为中转将接收到的数据转发给目的物理机。但是,此时,由于目的物理机上已经预先完成了第二虚拟机的网络配置信息的配置,并且该网络配置信息中包括了第二虚拟机接收数据所需的第一网络配置,所以,目的物理机可以直接根据该第一网络配置,识别出来第二数据包中的第以数据是发送给第二虚拟机的,所以本发明实施例中第二数据包中可以不需要携带第二虚拟机的标识,目的物理机也可以正确识别。
在一种可能的实现方式中,所述第一网络配置包括所述第二虚拟机接收数据所需的二层通信、三层通信和弹性IP通信的网络配置。
本发明实施例中,主要从计算代理和网络管理层流程上优化,通过在虚拟机迁移流程嵌入虚拟机所需网络配置能力,从而保证虚拟机迁移到目的物理机上的网络即可用,从而避免了目的物理机网络配置缺失引起的网络中断。进一步地,本发明实施例中将预配置分为两种类型:通用网络预配置和增强网络预配置。
方案一,通用网络配置:
在一种可能的实现方式中,所述第二虚拟机的网络配置信息除了包含所述第二虚拟机接收数据所需的第一网络配置,还可以包括所述第二虚拟机发送数据所需的第二网络配置,且所述第二网络配置包括所述第二虚拟机发送数据所需的二层通信、三层通信和弹性IP通信的网络配置。即第二网络配置中包含了与所述第二虚拟机之间存在交互关系的第三虚拟机所在的第三方物理机的地址,因此所述目的物理机可以根据所述第二网络配置向第三方物理机发送第三数据包,所述第三数据包包括第二数据,所述第二数据的目的地址为第三虚拟机,所述第三虚拟机为与所述第一虚拟机存在交互关系的虚拟机。即目的物理机上可以根据预配置的网络配置信息,接收并解析从源物理机上转发过来的发送给第二虚拟机的数据,也可以直接根据预配置的网络配置信息,将需要发送的数据,或者是第一数据的响应数据,直接发送给对应的第三方物理机上。
上述通用网络预配置,用于保证迁移后不会因为目的物理机网络配置未完成而导致的网络中断,不仅可以减少网络中断,同时可大大减少热迁移时长。
方案二,增强网络配置:
在另一种可能的实现方式中,所述网络配置信息除了包含所述第二虚拟机接收数据所需的第一网络配置;还包括网关节点的路由信息。所述目的物理机可以在向第三方物理机发送数据时,根据所述路由信息,将数据包发送给网关节点,并通过所述网关节点将所述第三数据包转发给目的物理机,所述第三数据包包括第二数据,所述第二数据的目的地址为第三虚拟机,所述第三虚拟机为与所述第一虚拟机存在交互关系的虚拟机。因为网关节 点上存储有目的物理机上的第二虚拟机需要进行交互的第三虚拟机所在的第三方物理机的地址。因此,目的物理机上便可以在第一虚拟机迁移之前,仅先预配置接收数据的第一网络配置,而第二网络配置则暂时不进行,因为第二网络配置包含的配置信息可能较多,需要较长配置时间。那么本发明实施例可以将第二网络配置的预配置与虚拟机迁移同时进行,当在第二网络配置未配置完成之前,则可以通过网关节点进行转发,与此同时,目的物理机上继续配置第二网络配置。直到目的物理机上完成了第一网络配置和第二网络配置之后,再通过目的物理机直接向第三方物理机反馈数据。节省了预配置的第二网络配置的时间,提升了整个迁移的时间和效率。
可以理解的是,在方案二中,当目的物理机上的第二虚拟机的第二网络配置完成了之后,上述第三数据包则可以不通过网络节点进行转发,而是目的物理机上的第二虚拟机直接根据第二网络配置向第三方物理机发送即可。
如图20所示,为本发明实施例提供的一种第三数据包通过网关节点转发前后的报文封装格式示意图。第三数据包在通过目的物理机向网关节点发送时,外层报文的源地址是目的物理机,目的地址是网关物理机(也即是网关节点);内层报文的源地址是第二虚拟机,目的地址是第三虚拟机;第三数据包发送给网关节点之后,第三数据包的外层报文的源地址则更新为了网关物理机,目的地址则更新为第三方物理机,内层报文的源地址和目的地址则不会发生变化,且内层报文中的数据同样不会发生变化。也即是内层报文不管是在本申请中的单跳板应用场景、双跳板应用场景、通用网络预配置或增强网络预配置场景,在数据包经过跳板或者是网关节点转发时,都是在数据包的外层报文上进行地址或者相关信息的改变,而针对内层报文,则保持不变。
针对二层通信、三层通信以及弹性IP通信,需要说明的是,例如,当VM1和VM2属于同一网段,那么他们之间的通信就是二层通信。若VM1和VM2在同一个物理机上,则直接走MAC PORT转发,若VM1和VM2在不同的物理机上则二层通信需要隧道封装,所以二层配置主要是流表配置。又例如,当VM1和VM3属于不同网段,那么他们之间的通信就是三层通信,此时需要经过中间的路由才可以进行通信,所以三层通信主要是路由的配置。又例如,当VM1需要访问www.huawei.com那么他需要将内部的192.168.1.101转化为公网ip,www.huawei.com回复的流量需要将公网这个转华为对应虚拟机内部ip,这些配置就是弹性IP(EIP)的配置。
在公有云或数据中心的分布式分层架构组网场景下,虚拟机热迁移网络中断时间,受外部因素影响无法保证虚拟机迁移过程中虚拟机网络业务不受影响;虚拟机迁移时长,受VPC规模的影响无法满足大规模虚拟机迁移的时限要求。随着POD规模的不断扩大、提供服务越来越多,客户多个云服务器分布在不同的物理节点上因此第三方物理机配置更新快慢会直接影响与迁移虚拟机网络中断时间;另外迁移目的主机的网络配置恢复快慢,也会直接影响迁移虚拟机网络中断时间及热迁移时长。还可以解决现有分布式分层网络架构下,虚拟机热迁移网络中断时间长和热迁移整体耗时长的问题。因而通过本申请,可以实现确定性网络中断时长及可预期性热迁移时长的目的,从而为热迁移能力在公有云、数据中心等大规模场景使用提供了保障。
下面结合本发明实施例提供的物理机10和物理机20的结构,并基于上述提供的物理机20所执行的方法流程,提供以下应用于热迁移场景中避免网络中断的实施方式,步骤如下:
(1)热迁移目的物理机虚拟网络预配置
如图21所示,图21为本发明实施例提供的另一种网络预配置流程示意图。本步骤在计算调度管理模块101热迁移准备阶段执行,由计算管理调度模块101发起虚拟机热迁移任务。
首先,确认是否为指定目的物理机,如果是,那么直接通过远程过程调用(Remote Procedure Call,RPC)消息通知源物理机的计算代理模块201执行热迁移操作;否则,计算管理调度模块101选择可用目的物理机,再通过RPC消息通知源物理机计算代理模块201执行热迁移操作;
然后,源物理机和目的物理机计算代理模块201执行主机侧检查,检查通过后目的物理机计算虚拟化模块203创建虚拟机所需网络设备;
最后,如果使用单跳板那么计算代理模块201先调用增强网络预配置接口,等接口返回成功再调用计算虚拟化模块203迁移接口;如果使用双跳板需要先在源物理机和目的物理机计算代理模块201配置跳板所需信息,再调用通用网络预配置接口和计算虚拟化模块203迁移接口,因为双向跳板不依赖目的物理机网络预配置,因此两个接口可并发调用。
(2)热迁移网络跳板使能
如图9所示,图9为本发明实施例提供的一种网络跳板使能流程示意图。本步骤在步骤(1)完成后并且等计算虚拟化模块203热迁移流程中源物理机中的第一虚拟机暂停之后执行。
计算虚拟化模块203热迁移首先源物理机和目的物理机建立socket连接;
然后目的物理机上初始化虚拟机处于暂停状态,源物理机将迁移虚拟机内存拷贝到目的物理机上;
最后一轮内存迭代拷贝前暂停虚拟机并使能热迁移网络跳板,完成最后一轮迭代拷贝再唤醒目的物理机虚拟机。
(3)热迁移网络跳板转发
如图22所示,图22为本发明实施例提供的另一种跳板正常工作流程示意图。本步骤在步骤(1)和步骤(2)完成之后自动执行。
有上行流量(例如第一数据包)需要导入源物理机,网络虚拟化模块204中的的跳板功能模块会主动截获此流量,通过跳板封装将流量导入目的物理机的第二虚拟机;
第二虚拟机回复的下行流量(例如第三数据包),如果有回程跳板,那么需要先通过对称性路由模块判断报文走跳板还是正常转发,如果通过跳板那么回程跳板模块对原始报文进行封装,然后发送到源物理机再走源物理机的正常规则转发回到第三方物理机上(即为双跳板路径);如果没有回程跳板,那么需要确认是否存在网关转发路由,如果存在那么回程流量先转发到网关再转发回第三方物理机,否则走目的物理机转发回第三方物理机(即为单跳板路径)。
(4)热迁移网络跳板拆除
如图11所示,图11为本发明实施例提供的一种跳板拆除流程示意图。本步骤在步骤(1)和步骤(2)执行完之执行。
源物理机的计算虚拟化模块周期性检测跳板是否超时未使用,如果超时那么先删除源物理机热迁移网络跳板,再通知删除目的物理机上热迁移网络反向跳板,否则再继续下一轮循环。直到确认源物理机无迁移虚拟机的上行流量,或者跳板超时时间到达再执行本步骤。
结合图12和图13所提供的单向跳板和双向跳板的数据模型示意图,以及对应的描述,图23是本发明实施例提供的一种双向跳板+对称性路由数据模型示意图;图24是本发明实施例提供的一种单向跳板+通用网络预配置数据模型示意图;图25是本发明实施例提供的一种单向跳板+增强网络预配置数据模型示意图。关于上述数据模型示意图,请参照上述相关实施例的描述,在此不再赘述。
上述详细阐述了本发明实施例的方法,下面提供了本发明实施例的相关装置。
请参见图26,图26是本发明实施例提供的一种物理机的结构示意图,所物理机为目的物理机,该源目的物理机60可以包括第一接收单元301、第一处理单元302和第一发送单元303,其中,各个单元的详细描述如下。
接收单元601,用于接收源物理机发送的第二数据包,所述第二数据包为所述源物理机根据接收到的第一数据包生成的,所述第一数据包包括第一数据,所述第一数据的目的地址为第一虚拟机,所述第一虚拟机从所述源物理机热迁移至目的物理机后为第二虚拟机;所述目的物理机上已经预先配置有所述第二虚拟机的网络配置信息,所述网络配置信息包括所述第二虚拟机接收数据所需的第一网络配置;
识别单元602,用于根据所述第一网络配置,确定所述第一数据是发送给所述第二虚拟机的数据。
在一种可能的实现方式中,物理机60还包括:
预配置单元603,用于在所述第一虚拟机迁移到所述目的物理机之前,预先配置所述第二虚拟机的网络配置信息。
在一种可能的实现方式中,所述第一网络配置包括所述第二虚拟机接收数据所需的二层通信、三层通信和弹性IP通信的网络配置。
在一种可能的实现方式中,所述网络配置信息还包括所述第二虚拟机发送数据所需的第二网络配置,所述第二网络配置包括所述第二虚拟机发送数据所需的二层通信、三层通信和弹性IP通信的网络配置;物理机60还包括:
第一发送单元604,用于根据所述第二网络配置向第三方物理机发送第三数据包,所述第三数据包包括第二数据,所述第二数据的目的地址为第三虚拟机,所述第三虚拟机为与所述第一虚拟机存在交互关系的虚拟机。
在一种可能的实现方式中,所述网络配置信息还包括网关节点的路由信息,所述网关节点存储有第三虚拟机所在的第三方物理机地址,所述第三虚拟机为与所述第一虚拟机存在交互关系的虚拟机;物理机60还包括:
第二发送单元605,用于根据所述路由信息,通过所述网关节点将第三数据包转发给 第三方物理机,所述第三数据包包括第二数据,所述第二数据的目的地址为所述第三虚拟机。需要说明的是,本发明实施例中所描述的源物理机30中各功能单元的功能可参见上述图19中所述的方法实施例中步骤S1901-步骤S1902的相关描述,此处不再赘述。可以理解的是,本发明实施例中的目的物理机的结构还可以参照图16中所述的物理机的结构示意图,在此不再详述。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可能可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如上述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
上述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以为个人计算机、服务端或者网络设备等,具体可以是计算机设备中的处理器)执行本申请各个实施例上述方法的全部或部分步骤。其中,而前述的存储介质可包括:U盘、移动硬盘、磁碟、光盘、只读存储器(Read-OnlyMemory,缩写:ROM)或者随机存取存储器(RandomAccessMemory,缩写:RAM)等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。
Claims (33)
- 一种数据处理方法,其特征在于,包括:源物理机接收第一数据包,所述第一数据包包括第一数据,所述第一数据的目的地址为第一虚拟机;所述源物理机生成第二数据包,所述第二数据包包括所述第一数据和第二虚拟机的标识,所述第一虚拟机从所述源物理机热迁移至目的物理机后为所述第二虚拟机,所述第二虚拟机的标识用于在所述目的物理机上识别所述第二虚拟机;所述源物理机向所述目的物理机发送所述第二数据包。
- 如权利要求1所述的方法,其特征在于,所述方法还包括:所述源物理机接收所述目的物理机发送的第三数据包,所述第三数据包包括第二数据和第一虚拟机的标识,所述第一虚拟机的标识用于在所述源物理机上识别所述第一虚拟机,所述第二数据的目的地址为第三虚拟机;所述源物理机根据所述第一虚拟机的标识,确定所述第三虚拟机所在的第三方物理机的地址;所述源物理机根据所述第三方物理机的地址生成第四数据包,所述第四数据包包括所述第二数据;所述源物理机向所述第三方物理机发送第四数据包。
- 如权利要求2所述的方法,其特征在于,所述第三虚拟机为与所述第一虚拟机存在交互关系的虚拟机;所述源物理机根据所述第一虚拟机的标识,确定所述第三虚拟机所在的第三方物理机的地址,包括:所述源物理机根据所述第一虚拟机的标识,获取所述第一虚拟机的配置信息,所述配置信息包括所述第三虚拟机所在的第三方物理机的地址;所述源物理机根据所述配置信息,查找并确定所述第三虚拟机所在的第三方物理机的地址。
- 如权利要求2或3所述的方法,其特征在于,所述第三虚拟机上未更新完成所述第一虚拟机的迁移信息,所述迁移信息包括所述第二虚拟机所在的所述目的物理机的地址。
- 如权利要求1-4任意一项所述的方法,其特征在于,所述方法还包括:所述源物理机在预设时间段内未接收到所述第一数据包的情况下,删除所述第一虚拟机的所述配置信息。
- 一种数据处理的方法,其特征在于,包括:目的物理机接收源物理机发送的第二数据包,所述第二数据包为所述源物理机根据接收到的第一数据包生成的,所述第一数据包包括第一数据,所述第一数据的目的地址为第 一虚拟机,所述第二数据包包括所述第一数据和第二虚拟机的标识,所述第一虚拟机从所述源物理机热迁移至目的物理机后为所述第二虚拟机,所述第二虚拟机的标识用于在所述目的物理机上识别所述第二虚拟机;所述目的物理机根据所述第二虚拟机标识,确定所述第一数据是发送给所述第二虚拟机的数据。
- 如权利要求6所述的方法,其特征在于,所述方法还包括:所述目的物理机向所述源物理机发送第三数据包,所述第三数据包包括第二数据和第一虚拟机的标识,所述第二数据的目的地址为第三虚拟机,所述第一虚拟机的标识用于在所述源物理机上识别所述第一虚拟机。
- 如权利要求7所述的方法,其特征在于,所述第一数据的源地址为所述第三虚拟机;所述第二数据的目的地址为所述第三虚拟机;其中,所述第二数据为所述第一数据的响应数据或所述第一数据为所述第二数据的响应数据。
- 如权利要求6-8任意一项所述的方法,其特征在于,所述目的物理机上当前未配置完成所述第二虚拟机的网络配置信息,所述网络配置信息包括二层通信的配置规则、三层通信的配置规则和弹性IP通信的配置规则中的至少一种。
- 一种物理机,其特征在于,所述物理机为源物理机,包括:第一接收单元,用于接收第一数据包,所述第一数据包包括第一数据,所述第一数据的目的地址为第一虚拟机;第一处理单元,用于生成第二数据包,所述第二数据包包括所述第一数据和第二虚拟机的标识,所述第一虚拟机从所述源物理机热迁移至目的物理机后为所述第二虚拟机,所述第二虚拟机的标识用于在所述目的物理机上识别所述第二虚拟机;第一发送单元,用于向所述目的物理机发送所述第二数据包。
- 如权利要求10所述的物理机,其特征在于,所述物理机还包括:第二接收单元,用于接收所述目的物理机发送的第三数据包,所述第三数据包包括第二数据和第一虚拟机的标识,所述第一虚拟机的标识用于在所述源物理机上识别所述第一虚拟机,所述第二数据的目的地址为第三虚拟机;识别单元,用于根据所述第一虚拟机的标识,确定所述第三虚拟机所在的第三方物理机的地址;第二处理单元,用于根据所述第三方物理机的地址生成第四数据包,所述第四数据包包括所述第二数据;第二发送单元,用于向所述第三方物理机发送第四数据包。
- 如权利要求11所述的物理机,其特征在于,所述第三虚拟机为与所述第一虚拟机 存在交互关系的虚拟机;所述识别单元,具体用于:根据所述第一虚拟机的标识,获取所述第一虚拟机的配置信息,所述配置信息包括所述第三虚拟机所在的第三方物理机的地址;根据所述配置信息查找并确定所述第三虚拟机所在的第三方物理机的地址。
- 如权利要求11或12所述的物理机,其特征在于,所述第三虚拟机上未更新完成所述第一虚拟机的迁移信息,所述迁移信息包括所述第二虚拟机所在的所述目的物理机的地址。
- 如权利要求10-13任意一项所述的物理机,其特征在于,所述物理机还包括:管理单元,用于在预设时间段内未接收到所述第一数据包的情况下,删除所述第一虚拟机的所述配置信息。
- 一种物理机,其特征在于,所述物理机为目的物理机,包括:接收单元,用于接收源物理机发送的第二数据包,所述第二数据包为所述源物理机根据接收到的第一数据包生成的,所述第一数据包包括第一数据,所述第一数据的目的地址为第一虚拟机,所述第二数据包包括所述第一数据和第二虚拟机的标识,所述第一虚拟机从所述源物理机热迁移至目的物理机后为所述第二虚拟机,所述第二虚拟机的标识用于在所述目的物理机上识别所述第二虚拟机;处理单元,用于根据所述第二虚拟机标识,确定所述第一数据是发送给所述第二虚拟机的数据。
- 如权利要求15所述的物理机,其特征在于,所述物理机还包括:发送单元,用于向所述源物理机发送第三数据包,所述第三数据包包括第二数据和第一虚拟机的标识,所述第二数据的目的地址为第三虚拟机,所述第一虚拟机的标识用于在所述源物理机上识别所述第一虚拟机。
- 如权利要求16所述的物理机,其特征在于,所述第一数据的源地址为所述第三虚拟机;所述第二数据的目的地址为所述第三虚拟机;其中,所述第二数据为所述第一数据的响应数据或所述第一数据为所述第二数据的响应数据。
- 如权利要求15-17任意一项所述的物理机,其特征在于,所述目的物理机上当前未配置完成所述第二虚拟机的网络配置信息,所述网络配置信息包括二层通信的配置规则、三层通信的配置规则和弹性IP通信的配置规则中的至少一种。
- 一种数据处理的方法,其特征在于,包括:目的物理机接收源物理机发送的第二数据包,所述第二数据包为所述源物理机根据接收到的第一数据包生成的,所述第一数据包包括第一数据,所述第一数据的目的地址为第一虚拟机,所述第一虚拟机从所述源物理机热迁移至目的物理机后为第二虚拟机;所述目 的物理机上已经预先配置有所述第二虚拟机的网络配置信息,所述网络配置信息包括所述第二虚拟机接收数据所需的第一网络配置;所述目的物理机根据所述第一网络配置,确定所述第一数据是发送给所述第二虚拟机的数据。
- 如权利要求19所述的方法,其特征在于,所述目的物理机接收源物理机发送的第二数据包之前,还包括:所述目的物理机在所述第一虚拟机迁移到所述目的物理机之前,预先配置所述第二虚拟机的网络配置信息。
- 如权利要求19或20所述的方法,其特征在于,所述第一网络配置包括所述第二虚拟机接收数据所需的二层通信、三层通信和弹性IP通信的网络配置。
- 如权利要求19-21任意一项所述的方法,其特征在于,所述网络配置信息还包括所述第二虚拟机发送数据所需的第二网络配置,所述第二网络配置包括所述第二虚拟机发送数据所需的二层通信、三层通信和弹性IP通信的网络配置;所述方法,还包括:所述目的物理机根据所述第二网络配置向第三方物理机发送第三数据包,所述第三数据包包括第二数据,所述第二数据的目的地址为第三虚拟机,所述第三虚拟机为与所述第一虚拟机存在交互关系的虚拟机。
- 如权利要求19-21任意一项所述的方法,其特征在于,所述网络配置信息还包括网关节点的路由信息,所述网关节点存储有第三虚拟机所在的第三方物理机地址,所述第三虚拟机为与所述第一虚拟机存在交互关系的虚拟机;所述方法还包括:所述目的物理机根据所述路由信息,通过所述网关节点将第三数据包转发给第三方物理机,所述第三数据包包括第二数据,所述第二数据的目的地址为所述第三虚拟机。
- 一种物理机,其特征在于,所述物理机为目的物理机,包括:接收单元,用于接收源物理机发送的第二数据包,所述第二数据包为所述源物理机根据接收到的第一数据包生成的,所述第一数据包包括第一数据,所述第一数据的目的地址为第一虚拟机,所述第一虚拟机从所述源物理机热迁移至目的物理机后为第二虚拟机;所述目的物理机上已经预先配置有所述第二虚拟机的网络配置信息,所述网络配置信息包括所述第二虚拟机接收数据所需的第一网络配置;识别单元,用于根据所述第一网络配置,确定所述第一数据是发送给所述第二虚拟机的数据。
- 如权利要求24所述的物理机,其特征在于,所述物理机,还包括:预配置单元,用于在所述第一虚拟机迁移到所述目的物理机之前,预先配置所述第二虚拟机的网络配置信息。
- 如权利要求24或25所述的物理机,其特征在于,所述第一网络配置包括所述第二虚拟机接收数据所需的二层通信、三层通信和弹性IP通信的网络配置。
- 如权利要求24-26任意一项所述的物理机,其特征在于,所述网络配置信息还包括所述第二虚拟机发送数据所需的第二网络配置,所述第二网络配置包括所述第二虚拟机发送数据所需的二层通信、三层通信和弹性IP通信的网络配置;所述物理机,还包括:第一发送单元,用于根据所述第二网络配置向第三方物理机发送第三数据包,所述第三数据包包括第二数据,所述第二数据的目的地址为第三虚拟机,所述第三虚拟机为与所述第一虚拟机存在交互关系的虚拟机。
- 如权利要求24-26任意一项所述的物理机,其特征在于,所述网络配置信息还包括网关节点的路由信息,所述网关节点存储有第三虚拟机所在的第三方物理机地址,所述第三虚拟机为与所述第一虚拟机存在交互关系的虚拟机;所述物理机还包括:第二发送单元,用于根据所述路由信息,通过所述网关节点将第三数据包转发给第三方物理机,所述第三数据包包括第二数据,所述第二数据的目的地址为所述第三虚拟机。
- 一种数据处理系统,其特征在于,包括:源物理机和目的物理机,其中所述源物理机为如权利要求10-14任意一项所述的源物理机;所述目的物理机为如权利要求15-18任意一项所述的目的物理机。
- 一种物理机,其特征在于,包括处理器、存储器以及通信接口,其中,所述存储器用于存储信息发送程序代码,所述处理器用于调用所述数据处理程序代码来执行权利要求1至9中任一项或19至23中任一项所述的方法。
- 一种芯片系统,其特征在于,所述芯片系统包括至少一个处理器,存储器和接口电路,所述存储器、所述接口电路和所述至少一个处理器通过线路互联,所述至少一个存储器中存储有指令;所述指令被所述处理器执行时,权利要求1-8中任意一项或19-23中任意一项所述的方法得以实现。
- 一种计算机存储介质,其特征在于,所述计算机存储介质存储有计算机程序,该计算机程序被处理器执行时实现上述权利要求1-8中任意一项或19-23中任意一项所述的方法。
- 一种计算机程序,其特征在于,所述计算机程序包括指令,当所述计算机程序被计算机执行时,使得所述计算机执行如权利要求1-8中任意一项或19-23中任意一项所述的方法。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP19825411.2A EP3796163B1 (en) | 2018-06-25 | 2019-06-25 | Data processing method and related device |
| US17/132,435 US11941423B2 (en) | 2018-06-25 | 2020-12-23 | Data processing method and related device |
Applications Claiming Priority (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810659693.3 | 2018-06-25 | ||
| CN201810659693 | 2018-06-25 | ||
| CN201810919527.2A CN110633127A (zh) | 2018-06-25 | 2018-08-13 | 一种数据处理方法及相关设备 |
| CN201810919527.2 | 2018-08-13 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US17/132,435 Continuation US11941423B2 (en) | 2018-06-25 | 2020-12-23 | Data processing method and related device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020001442A1 true WO2020001442A1 (zh) | 2020-01-02 |
Family
ID=68968164
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/092827 Ceased WO2020001442A1 (zh) | 2018-06-25 | 2019-06-25 | 一种数据处理方法及相关设备 |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US11941423B2 (zh) |
| EP (1) | EP3796163B1 (zh) |
| CN (1) | CN110633127A (zh) |
| WO (1) | WO2020001442A1 (zh) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114205229A (zh) * | 2021-12-03 | 2022-03-18 | 紫光云(南京)数字技术有限公司 | 灵活控制弹性公网ip绑定弹性网卡时下发配置的判断方法 |
| CN114844833A (zh) * | 2022-03-30 | 2022-08-02 | 阿里云计算有限公司 | 报文处理方法和系统,存储介质及计算机终端 |
| US12481535B2 (en) * | 2020-04-23 | 2025-11-25 | Immersive Labs Holdings Limited | Resource management |
Families Citing this family (16)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US11734038B1 (en) * | 2019-11-21 | 2023-08-22 | Amazon Technologies, Inc | Multiple simultaneous volume attachments for live migration between cloud regions and edge locations |
| US11573839B1 (en) | 2019-11-21 | 2023-02-07 | Amazon Technologies, Inc. | Dynamic scheduling for live migration between cloud regions and edge locations |
| CN113377488B (zh) * | 2020-03-09 | 2025-10-14 | 华为云计算技术有限公司 | 一种资源迁移的方法、系统及设备 |
| CN113687940B (zh) * | 2020-05-19 | 2024-02-27 | 阿里巴巴集团控股有限公司 | 负载均衡方法、装置及物理机 |
| CN114003334B (zh) * | 2020-07-28 | 2024-12-13 | 中移(苏州)软件技术有限公司 | 虚拟机热迁移网络中断的优化方法、装置、设备、存储介质和系统 |
| US11829792B1 (en) * | 2020-09-21 | 2023-11-28 | Amazon Technologies, Inc. | In-place live migration of compute instances for efficient host domain patching |
| CN113014630B (zh) * | 2021-02-10 | 2025-03-28 | 腾讯科技(深圳)有限公司 | 实现通信连续性的方法及相关设备 |
| CN115714748B (zh) * | 2021-08-19 | 2024-11-08 | 抖音视界有限公司 | 公有云平台弹性ip的流量控制方法、装置和系统 |
| CN115037627B (zh) * | 2022-04-29 | 2024-05-07 | 阿里云计算有限公司 | 网络配置信息处理方法、sdn控制器、系统及存储介质 |
| CN115314437B (zh) * | 2022-06-16 | 2024-03-01 | 阿里巴巴(中国)有限公司 | 容器虚拟网络通信方法和容器虚拟网络 |
| CN115499385B (zh) * | 2022-09-21 | 2023-09-12 | 中电云数智科技有限公司 | 一种vDPA虚机热迁移不丢包的方法 |
| US12034595B2 (en) * | 2022-11-10 | 2024-07-09 | Oracle International Corporation | Dynamically reprogrammable region lattices |
| CN115834293B (zh) * | 2022-11-17 | 2024-07-19 | 中国联合网络通信集团有限公司 | 一种构造楼宇专网的方法和楼宇专网 |
| CN119544824A (zh) * | 2023-08-31 | 2025-02-28 | 华为云计算技术有限公司 | 一种网络连接热迁移的方法及相应装置 |
| CN116912003B (zh) * | 2023-09-12 | 2024-01-12 | 国网山西省电力公司营销服务中心 | 面向多交易品种的电力资源调度方法及系统 |
| US12549478B2 (en) * | 2024-01-29 | 2026-02-10 | Cisco Technology, Inc. | Proactive convergence of endpoint reachability in data centers |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106227578A (zh) * | 2016-07-12 | 2016-12-14 | 腾讯科技(深圳)有限公司 | 一种虚拟机热迁移的方法、设备及系统 |
| CN107247619A (zh) * | 2017-06-12 | 2017-10-13 | 上海优刻得信息科技有限公司 | 虚拟机热迁移方法、装置、系统、存储介质及设备 |
Family Cites Families (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7761573B2 (en) * | 2005-12-07 | 2010-07-20 | Avaya Inc. | Seamless live migration of virtual machines across optical networks |
| CN101937438B (zh) | 2009-06-30 | 2013-06-05 | 富士通株式会社 | 网页内容提取方法和装置 |
| US8434001B2 (en) | 2010-06-03 | 2013-04-30 | Rhonda Enterprises, Llc | Systems and methods for presenting a content summary of a media item to a user based on a position within the media item |
| US9424144B2 (en) * | 2011-07-27 | 2016-08-23 | Microsoft Technology Licensing, Llc | Virtual machine migration to minimize packet loss in virtualized network |
| CN102663023B (zh) | 2012-03-22 | 2014-09-17 | 浙江盘石信息技术有限公司 | 一种提取网页内容的实现方法 |
| EP2687982A1 (en) * | 2012-07-16 | 2014-01-22 | NTT DoCoMo, Inc. | Hierarchical system for managing a plurality of virtual machines, method and computer program |
| US9323566B2 (en) * | 2012-08-22 | 2016-04-26 | Hitachi, Ltd. | Virtual computer system for restoring network connection of live-migrated virtual computer |
| CN103200069B (zh) * | 2013-03-29 | 2016-01-27 | 华为技术有限公司 | 一种报文处理的方法和设备 |
| CN104243427B (zh) * | 2013-06-19 | 2018-04-06 | 日电(中国)有限公司 | 虚拟机在线迁移方法、数据包传输方法和设备 |
| WO2015027513A1 (zh) * | 2013-09-02 | 2015-03-05 | 运软网络科技(上海)有限公司 | 交付点跨域迁移系统 |
| US10120729B2 (en) * | 2014-02-14 | 2018-11-06 | Vmware, Inc. | Virtual machine load balancing |
| CN109144679B (zh) | 2017-06-27 | 2022-03-29 | 华为技术有限公司 | 中断请求的处理方法、装置及虚拟化设备 |
| CN110020292B (zh) | 2017-10-13 | 2020-07-28 | 华为技术有限公司 | 网页内容提取方法以及终端设备 |
-
2018
- 2018-08-13 CN CN201810919527.2A patent/CN110633127A/zh active Pending
-
2019
- 2019-06-25 EP EP19825411.2A patent/EP3796163B1/en active Active
- 2019-06-25 WO PCT/CN2019/092827 patent/WO2020001442A1/zh not_active Ceased
-
2020
- 2020-12-23 US US17/132,435 patent/US11941423B2/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106227578A (zh) * | 2016-07-12 | 2016-12-14 | 腾讯科技(深圳)有限公司 | 一种虚拟机热迁移的方法、设备及系统 |
| CN107247619A (zh) * | 2017-06-12 | 2017-10-13 | 上海优刻得信息科技有限公司 | 虚拟机热迁移方法、装置、系统、存储介质及设备 |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP3796163A4 * |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US12481535B2 (en) * | 2020-04-23 | 2025-11-25 | Immersive Labs Holdings Limited | Resource management |
| CN114205229A (zh) * | 2021-12-03 | 2022-03-18 | 紫光云(南京)数字技术有限公司 | 灵活控制弹性公网ip绑定弹性网卡时下发配置的判断方法 |
| CN114205229B (zh) * | 2021-12-03 | 2024-01-05 | 紫光云(南京)数字技术有限公司 | 弹性公网ip绑定弹性网卡时下发配置的判断方法 |
| CN114844833A (zh) * | 2022-03-30 | 2022-08-02 | 阿里云计算有限公司 | 报文处理方法和系统,存储介质及计算机终端 |
Also Published As
| Publication number | Publication date |
|---|---|
| EP3796163A4 (en) | 2021-07-21 |
| EP3796163B1 (en) | 2025-02-19 |
| US11941423B2 (en) | 2024-03-26 |
| US20210149706A1 (en) | 2021-05-20 |
| EP3796163A1 (en) | 2021-03-24 |
| CN110633127A (zh) | 2019-12-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2020001442A1 (zh) | 一种数据处理方法及相关设备 | |
| CN114946166B (zh) | 在包括云边缘位置的异构计算环境中的动态资源移动的方法和系统 | |
| CN111355604B (zh) | 在软件定义网络上的用户定制和自动化操作的系统和方法 | |
| US10700979B2 (en) | Load balancing for a virtual networking system | |
| US9634930B2 (en) | Method of controlling virtual router, computer-readable recording medium, and control device | |
| US9628290B2 (en) | Traffic migration acceleration for overlay virtual environments | |
| US7941539B2 (en) | Method and system for creating a virtual router in a blade chassis to maintain connectivity | |
| US7962587B2 (en) | Method and system for enforcing resource constraints for virtual machines across migration | |
| CN107111509B (zh) | 用于计算机网络中的虚拟机迁移的方法 | |
| CN114902182A (zh) | 通信服务提供商网络中的云计算 | |
| US9354905B2 (en) | Migration of port profile associated with a target virtual machine to be migrated in blade servers | |
| US20140068045A1 (en) | Network system and virtual node migration method | |
| US11595347B1 (en) | Dual-stack network addressing in cloud provider network edge locations | |
| WO2017113231A1 (zh) | 一种报文传输的方法、装置和系统 | |
| JP6432955B2 (ja) | 仮想ネットワーク機能インスタンスをマイグレーションさせるための方法、装置およびシステム | |
| US20130061225A1 (en) | Data relay device, computer-readable recording medium, and data relay method | |
| US11997015B2 (en) | Route updating method and user cluster | |
| US11652717B2 (en) | Simulation-based cross-cloud connectivity checks | |
| CN110855488A (zh) | 一种虚拟机接入方法及装置 | |
| CN117061425A (zh) | 利用虚拟联网的容器化路由器 | |
| US20240378092A1 (en) | Cloud native network function deployment | |
| CN117271064A (zh) | 一种虚拟机管理方法、装置、电子设备和存储介质 | |
| CN117501674A (zh) | 边缘平台管理装置、操作边缘平台管理装置的方法和边缘网关装置 | |
| CN114221827A (zh) | 溯源信息获取方法、装置和系统 | |
| WO2018060761A1 (en) | Techniques for simplified service modification utilizing a split design-assign framework |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19825411 Country of ref document: EP Kind code of ref document: A1 |
|
| ENP | Entry into the national phase |
Ref document number: 2019825411 Country of ref document: EP Effective date: 20201217 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |