Virtual network control methods, devices, electronic equipment and storage media
By receiving operation events and executing flow table information through a virtual network interface, the problem of needing two network management schemes for virtual machines and containers is solved, achieving unified network management and reducing costs.
Patent Information
- Application Number
- CN202310343128.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2043-03-31
AI Technical Summary
In existing technologies, virtual machines and containers require two different network management schemes, resulting in high development and maintenance costs.
After receiving operation events at the virtual network interface, the operation is executed in the edge virtual switch, and the elastic network interface information and operation events are sent to the virtual private cloud node controller to execute the matching flow table information to achieve network control over virtual machines and containers.
It enables the simultaneous management of virtual machines and containers using a single network control scheme, reducing the development and maintenance costs of network management.
Smart Images

Figure CN116366473B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cloud computing technology, and more specifically to a virtual network method, apparatus, electronic device, and storage medium. Background Technology
[0002] Currently, edge computing node products include two forms: edge virtual machines and edge containers. Virtual machines and containers are deployed in a converged manner on edge clusters, meaning they fully reuse edge computing node resources. Both virtual machines and containers are powered by Kubernetes (k8s). The lifecycle of virtual machines is managed by the kubevirt component, scheduled by k8s, and specifically controlled by QEMU, while the lifecycle of containers is managed by native k8s components. Existing technologies primarily address network management for virtual machines by providing IaaS-layer network control, while network management for containers primarily provides PaaS-layer network control through k8s' container network interface. Because virtual machines and containers require two different network management solutions, the development and maintenance of these two solutions incur significant costs. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a virtual network control method, apparatus, electronic device, and storage medium, which can reduce the development and maintenance costs of network control for virtual machines and containers to a certain extent.
[0004] This invention provides a virtual network control method, comprising: after receiving an operation event for a terminal object at a virtual network interface, executing the operation event in an edge virtual switch; the virtual network interface being a virtual machine network interface or a container network interface; the terminal object including at least one of the following: a virtual machine, a container; sending the elastic network interface information of the terminal object and the operation event to a virtual private cloud node controller; the virtual private cloud node controller storing configuration information of elastic network interfaces for different terminal objects; and executing an operation corresponding to flow table information issued by the virtual private cloud node controller; the flow table information being obtained by the virtual private cloud node controller by matching the operation event, the elastic network interface information, and the configuration information of the elastic network interfaces for different terminal objects.
[0005] In another aspect, the present invention provides a virtual network control device, comprising: an operation event execution unit, configured to execute the operation event in an edge virtual switch after receiving an operation event for a terminal object through a virtual network interface; the virtual network interface is a virtual machine network interface or a container network interface; the terminal object includes at least one of the following: a virtual machine or a container; an elastic network interface information sending unit, configured to send the elastic network interface information of the terminal object and the operation event to a virtual private cloud node controller; the virtual private cloud node controller stores configuration information of elastic network interfaces for different terminal objects; and a terminal object control unit, configured to perform an operation corresponding to flow table information issued by the virtual private cloud node controller; the flow table information is obtained by the virtual private cloud node controller by matching the operation event, the elastic network interface information, and the configuration information of the elastic network interfaces of the different terminal objects.
[0006] In another aspect, the present invention provides an electronic device, the electronic device comprising a processor and a memory, the memory being used to store a computer program, which, when executed by the processor, implements the above-described virtual network control method.
[0007] In another aspect, the present invention provides a computer-readable storage medium for storing a computer program that, when executed by a processor, implements the above-described virtual network control method.
[0008] After receiving an operation event for an end object through the virtual network interface, the operation event is executed in the virtual edge switch. The elastic network interface information corresponding to the operation event and the operation event are then sent to the virtual private cloud node controller. The virtual private cloud node controller then calculates the flow table information based on the relevant configuration information and sends it to the virtual edge switch to implement the communication protocol between the virtual edge switch and the end object. Thus, a single network control scheme can be used to achieve network control of virtual machines and containers, which reduces the cost of network management of virtual machines and containers to a certain extent. Attached Figure Description
[0009] The features and advantages of the invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the invention in any way. In the drawings:
[0010] Figure 1 A schematic diagram illustrating the steps of a virtual network control method in one embodiment of this disclosure is shown.
[0011] Figure 2(a) shows a schematic diagram of accessing a virtual machine using a virtual network control method in one embodiment of this disclosure;
[0012] Figure 2(b) shows a schematic diagram of accessing a container using a virtual network control method in one embodiment of this disclosure;
[0013] Figure 3(a) shows a schematic diagram of connecting a virtual machine to a network in one embodiment of this disclosure;
[0014] Figure 3(b) shows a schematic diagram of connecting a container to a network in one embodiment of this disclosure;
[0015] Figure 4(a) illustrates a schematic diagram of removing a virtual machine from the network in one embodiment of this disclosure;
[0016] Figure 4(b) shows a schematic diagram of removing a container from a network in one embodiment of this disclosure;
[0017] Figure 5 A schematic diagram of the process of migrating a virtual machine is shown in one embodiment of this disclosure;
[0018] Figure 6 A schematic diagram of a virtual network control device according to one embodiment of the present disclosure is shown;
[0019] Figure 7 A schematic diagram of the structure of an electronic device according to one embodiment of the present disclosure is shown. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0021] Hyperconverged infrastructure is a technical architecture that integrates computing, networking, and storage resources as infrastructure. It allows for selection, combination, and customization based on specific business system needs, facilitating the rapid and convenient construction of data centers and deployment of business systems. In practice, it typically integrates software virtualization technology (including virtualization of computing, networking, storage, and security) into unit nodes (x86 servers). Each unit node can be aggregated through a network to achieve modular, seamless horizontal scaling (scale-out) and build a unified resource pool.
[0022] Virtual machines and containers are currently the mainstream virtualization technologies. A virtual machine refers to a complete computer system simulated by software, possessing full hardware system functionality, and running in a completely isolated environment. The implementation of virtualization technology mainly relies on a virtualization manager (VMM), which is a layer of code located between the operating system and the computer hardware, used to divide the hardware platform into multiple virtual machines. The VMM runs in privileged mode, and its main function is to isolate and manage the multiple virtual machines running at the upper layer, arbitrate their access to the underlying hardware, and virtualize a virtual hardware environment (including processor, memory, and I / O devices) independent of the actual hardware for each guest operating system.
[0023] Container technology is a sandbox technology that allows applications to run within a sandbox, isolated from the outside world. This sandbox can be easily "transferred." Essentially, a container is a special type of process. By specifying a set of namespace parameters when creating a container process, the container process can only see the resources, files, devices, states, and configurations defined by the current namespace. Kubernetes is currently the mainstream container computing resource orchestration platform.
[0024] Virtual Machine Managers (VMMs) provide users with the same functionality as physical machines by simulating hardware devices, and hardware-based resource isolation ensures the security of virtual machines. Business users tend to run their core business on virtual machines. With technological advancements and the emergence of microservice architectures, the lightweight and low-overhead characteristics of containers have led to their increasing use. Virtual machines and containers each have their advantages and are both essential in hyperconverged environments. Currently, edge computing node products include both edge virtual machines and edge containers. Virtual machines and containers are deployed in a converged manner on edge clusters, meaning they fully reuse edge computing node resources. Both virtual machines and containers are run on Kubernetes (k8s). The lifecycle of virtual machines is managed by the kubevirt component, scheduled by k8s, and specifically controlled by QEMU; the lifecycle of containers is managed by native k8s components. Existing technologies primarily provide IaaS-layer network control solutions for virtual machines, while network control solutions for containers primarily provide PaaS-layer network access for container products through k8s' container network interface. Since virtual machines and containers require two different network management solutions, it is costly to develop and maintain these two network management solutions.
[0025] Please see Figure 1This disclosure provides a method for controlling a virtual network according to one embodiment, which may include the following steps.
[0026] S110: After receiving an operation event for a terminal object on the virtual network interface, the operation event is executed in the edge virtual switch; the virtual network interface is a virtual machine network interface or a container network interface; the terminal object includes at least one of the following: virtual machine, container.
[0027] In this embodiment, the virtual network interface is used to receive operation events issued by the computing component. The virtual network interface can be a Virtual Machine Network Interface (VNI) or a Container Network Interface (CNI). The VNI is used to decouple the computing and network processing flows; the computing component calls the VNI as needed to implement different network configurations. The CNI is a standard interface in Kubernetes for calling network implementations; the kubelet uses this standard API to call different network plugins to achieve different network configurations. The computing component can be a virtual machine component or the kubelet, used for monitoring virtual machines and containers, respectively.
[0028] In this embodiment, the operation event can be an operation event targeting a virtual machine or a container. The operation event includes at least one of the following: connecting a virtual machine, connecting a container, removing a virtual machine, removing a container, migrating the original virtual machine to the target virtual machine, migrating the original container to the target container, restarting a virtual machine, restarting a container, shutting down a virtual machine, and shutting down a container. When the operation event targets a virtual machine, the virtual machine component calls the VNI; when the operation event targets a container, the container component calls the CNI.
[0029] In this embodiment, the Edge Virtual Switch (EVS) refers to a switch connected to virtual machines to provide host network virtualization capabilities. Only switches added to the VCM edge switch list can be managed by the VCM, enabling connection configuration management capabilities, including adding, deleting, and querying edge switches, and viewing the migration history of virtual machines connected to the edge switch. When a virtual network interface receives an operation event for an end object, it needs to send the operation event to the EVS, and then execute the operation event on the EVS. Specifically, for example, when the operation event is to connect a virtual machine, a port is created on the EVS for connecting to the connected virtual machine; when the operation event is to remove a virtual machine, the port corresponding to that virtual machine is deleted on the EVS.
[0030] S120: Send the elastic network interface information of the terminal object and the operation event to the virtual private cloud node controller; the virtual private cloud node controller stores the configuration information of the elastic network interfaces of different terminal objects.
[0031] In this implementation, a Virtual Private Cloud (VPC) is a logically isolated virtual network environment built for instances, configured and managed by the user. It aims to enhance the security of user resources and simplify network deployment. Users can freely choose IP address ranges, create multiple subnets, customize security groups, and configure routing tables and gateways within the VPC, facilitating convenient network management and configuration, and enabling secure and rapid network changes. Simultaneously, access control for instances within subnets is strengthened through customizable access rules for instances within and between security groups, as well as multiple security layers such as firewalls. Furthermore, users can create Virtual Private Networks (VPNs) between their company data center or private network and the VPC without needing to forward ports via external IP addresses. The VPC node controller is deployed at the edge, with one VPC node controller per edge cluster. This controller manages and configures VPCs within the edge cluster, addressing the issues of hierarchical computing and edge autonomy. One end connects to the VPC core controller via a general controller platform, and the other end connects to the EVS device. By sending operation events and endpoint object information on the elastic network interface of the edge virtual switch to the VPC node controller, the VPC node controller does not need to distinguish whether the endpoint object targeted by the current operation event is a virtual machine or a server. Therefore, only one network control scheme needs to be deployed on the network side to achieve network control of virtual machines and containers.
[0032] In this embodiment, the Elastic Network Interface (ENI) is a logical network component in a VPC that represents a virtual network card. The container itself can carry ENI information, and the virtual machine can be one of a virtual machine, a virtual mobile facility, or an ENI. Since a container can only be represented by an ENI, in order to allow virtual machines and containers to reuse a single network control scheme, the virtual network interface information of the virtual machine needs to be mapped to ENI information for representation.
[0033] S130: Perform the operation corresponding to the flow table information issued by the virtual private cloud node controller; the flow table information is obtained by the virtual private cloud node controller by matching the operation event, the elastic network interface information, and the configuration information of the elastic network interfaces of the different terminal objects.
[0034] In this embodiment, the VPC core controller is located on the central side, storing configuration information of virtual machines or containers. The VPC core controller can send configuration information of virtual machines or containers related to the VPC node controller to the VPC node controller. After receiving a request from the virtual network interface, the VPC node controller can perform matching calculations with the configuration information of several terminal objects issued by the VPC core controller to obtain flow table information. This flow table information is then sent to the EVS agent node on the host where the terminal object targeted by the operation event resides. The EVS agent node then sends the flow table information to the EVS. After receiving the flow table information, the EVS can establish a communication protocol with the terminal object using the port information corresponding to the terminal object. The EVS agent acts as an agent for the EVS device, used for configuration translation and distribution, and forwarding flow table information to the EVS device. The VPC core controller, deployed on the central side, is the global VPC controller for the entire edge network. It provides the platform with a single API entry point for edge network-side VPC capabilities on one end, and connects to the VPC core controller and EVS device through a general controller platform on the other end.
[0035] In one implementation, the operation event is an access terminal object. Executing the operation event in the edge virtual switch may include: after the virtual network interface receives the operation event for the terminal object, creating a port corresponding to the terminal object in the edge virtual switch; correspondingly, performing an operation corresponding to the flow table information issued by the virtual private cloud node controller may include: establishing communication between the edge virtual switch and the terminal object through the port corresponding to the terminal object based on the flow table information.
[0036] In this implementation, the lifecycle of virtual machines is managed by the kubevirt component, scheduled by Kubernetes, and specifically controlled by QEMU; the lifecycle of containers is managed by native Kubernetes components. Therefore, the network access method for virtual machines can be set to synchronize with containers, allowing the VPC node controller to distribute flow table information to the corresponding EVS device without distinguishing between virtual machines and containers through internal calculations. Virtual machines and containers are organized using ENIs as the unit of organization. A single-interface container has a default ENI, and the control plane establishes an ENI→EVS Port mapping to unify the processing flow for virtual machines and containers, reusing a single processing flow. Furthermore, an Endpoint abstraction is introduced within the VPC node controller. The ENIs of virtual machines and containers are uniformly centralized to an Endpoint object. The Endpoint manages complete ENI information, including IP address, label, rate limit configuration, etc., allowing the VPC node controller to manage the complete lifecycle of the end object. Specifically, for example, when the virtual machine component detects the addition of a virtual machine, the Endpoint also adds the complete ENI information of that virtual machine until the virtual machine is removed from the node controller.
[0037] Please refer to Figures 2(a) and 2(b). In this embodiment, the operation event is an access terminal object. After the virtual network interface receives the operation event, it needs to create a port corresponding to the terminal object in the edge virtual server. Then, the ENI information of the port and the operation event are sent to the corresponding VPC node controller for processing. The VPC node controller can calculate a relevant configuration and send it to the EVS-Agent. After translation processing, the EVS-Agent sends the flow table information to the corresponding EVS device. Thus, the network access of the terminal device can be realized through the newly created port in EVS.
[0038] In one implementation, the terminal object is a virtual machine, and the virtual network control method may include: after the virtual machine network interface receives an access operation for the virtual machine, creating a port corresponding to the virtual machine in the edge virtual switch; sending the elastic network port information of the port corresponding to the virtual machine and the port access information of the virtual machine to the virtual private cloud node controller; and establishing communication between the virtual machine and the edge virtual switch through the port corresponding to the virtual machine based on the flow table information issued by the virtual private cloud node controller.
[0039] In this implementation, since it is necessary to reuse a set of processes for network control of virtual machines and containers, and containers need to fully comply with the protocol settings related to native Kubernetes components, the network control scheme for virtual machines can be mapped to be the same as that for containers. Thus, control of virtual machines and containers can be achieved through a single network control scheme.
[0040] Referring to Figures 3(a) and 3(b), in this embodiment, the virtual machine is managed by a virtual machine component, which needs to call VNI to implement network control over the virtual machine; while the container is managed by a kubelet, which needs to call CNI to implement network control over the container. Then, VNI sends the interface information corresponding to the virtual machine to the VPC node controller, and CNI sends the interface information corresponding to the container to the VPC node controller. Since the interface information of the virtual machine and the container is inconsistent, two different schemes need to be designed for network control of the virtual machine and the container respectively. Therefore, the port information of the virtual machine can be mapped to be consistent with the port information of the container, such as ENI information. In this way, the VPC node controller does not need to distinguish whether the terminal object is a virtual machine or a container, and can achieve joint control of virtual machines and containers through a single network control scheme, thereby saving the development and maintenance costs of two separate schemes. Specifically, for example, the joining information of the virtual machine port can be sent to the VPC node controller, where the joining information of the virtual machine port includes the current host's geographical location information. After receiving the virtual machine port join information, the VPC node controller can determine which host device the join information originated from based on geographical location information, and then send the flow table information to the edge virtual switch of that host device. During container creation, the compute stack platform needs to first send the compute content to the Multi-Chip Package (MCP), and then the MCP sends the compute content to the Kubernetes interface service.
[0041] In one implementation, the operation event is the removal of a terminal object. Executing the operation event in the edge virtual switch may include: after the virtual network interface receives an operation event for the terminal object, deleting the port corresponding to the terminal object in the edge virtual switch; correspondingly, performing an operation corresponding to the flow table information issued by the virtual private cloud node controller may include: disconnecting the communication between the edge virtual switch and the terminal object based on the flow table information.
[0042] In this embodiment, the operation event is the removal of a terminal object. Therefore, before the virtual network interface receives the operation event, the port corresponding to the terminal object needs to be deleted in the edge virtual server. Then, the ENI information of the port and the operation event are sent to the corresponding VPC node controller for processing. The VPC node controller can calculate a relevant configuration and send it to the EVS-Agent. After translation processing, the EVS-Agent sends the flow table information to the corresponding EVS device. Thus, the network of the terminal device can be disconnected through the newly created port in EVS.
[0043] In one implementation, the terminal object is a virtual machine, and the virtual network control method includes: after the virtual machine network interface receives a removal operation for the virtual machine, deleting the port corresponding to the virtual machine in the edge virtual switch; sending the elastic network port information of the port corresponding to the virtual machine and the port access information of the virtual machine to the virtual private cloud node controller; and disconnecting the communication between the virtual machine and the edge virtual switch based on the flow table information issued by the virtual private cloud node controller.
[0044] Please refer to Figures 4(a) and 4(b). In this embodiment, the deletion of a virtual machine from the network is similar to the access to the network. After the virtual machine component receives the deletion operation for the virtual machine, it first calls the VNI, then triggers the removal of the port corresponding to the virtual machine from the EVS, and then sends the virtual machine removal event to the VPC node controller.
[0045] In this implementation, when a virtual machine restarts, it triggers a rescheduling process. During this rescheduling, the virtual machine component on the source host first triggers a VM Port removal event via a VNI call. Then, the virtual machine component on the target host triggers a VM Port access event via a VNI call. Finally, the VPC node controller calculates the relevant configuration and distributes it to the corresponding source and destination EVS devices. When a virtual machine shuts down, it triggers VMI deletion. The virtual machine component then triggers a VM Port removal event via a VNI call, releasing the IP address and deleting the OVS port. The VPC node controller then calculates the relevant configuration and distributes it to the corresponding EVS device.
[0046] In one implementation, the operation event is a migration of a terminal object. Executing the operation event in an edge virtual switch may include: after the virtual network interface receives an operation event for the terminal object, creating a target port corresponding to the target terminal object in the edge virtual switch; correspondingly, performing operations corresponding to the flow table information issued by the virtual private cloud node controller may include: establishing a connection between the edge virtual switch and the target terminal object based on the flow table information; deleting the initial port corresponding to the original terminal object in the edge virtual switch; and correspondingly, performing operations corresponding to the flow table information issued by the virtual private cloud node controller may include: disconnecting the connection between the initial port and the original terminal object based on the flow table information.
[0047] In this implementation, for terminal object migration operations, such as moving the current operation from one terminal device to another, it is necessary to remove the terminal device from the source host and then connect it to the target terminal device. This can lead to temporary network interruptions, impacting the user experience. Therefore, a better approach is to first load the target node for initial configuration, creating EVS ports, etc., then distribute the configuration on the target node, including relevant flow tables, security groups, and traffic redirection, and finally distribute the configuration on the source node and remove the terminal device's configuration from the source node.
[0048] In one implementation, the terminal object is a virtual machine, and the virtual network control method may include: after the virtual machine network interface receives a migration operation for the virtual machine, creating a target port corresponding to the target virtual machine in the edge virtual switch; sending the elastic network port information of the target port and the port access information corresponding to the target virtual machine to the virtual private cloud node controller; deleting the original port corresponding to the original virtual machine in the edge virtual switch; sending the network port information of the original port and the removal information of the original port to the virtual private cloud node controller; establishing communication between the target virtual machine and the edge virtual switch based on the flow table information issued by the virtual private cloud node controller, and disconnecting the communication between the original virtual machine and the edge virtual switch based on the flow table information issued by the virtual private cloud node controller.
[0049] Please see Figure 5In this implementation, when a task needs to be moved from the original virtual machine to the target virtual machine, an EVS Port needs to be created in the EVS first and then sent to the VPC node controller. The VPC node controller first calculates the relevant configuration and sends the flow table information to the EVS device to enable communication between the target virtual machine and the EVS device. Then, the original EVS Port is deleted in the EVS, and the original port information is sent to the VPC node controller. After calculating the relevant configuration, the VPC node controller can send it to the original EVS device to disconnect the connection between the original virtual machine device and the original EVS device. It should be noted that the migration operation of virtual machines or containers can be performed within the same host or between different hosts. Of course, in the case of migration operation within the same host, it can be the migration between virtual machines and containers deployed on the same host.
[0050] Please see Figure 6 One embodiment of this disclosure also provides a virtual network control device, which may include: an operation event execution unit, a flexible network interface information sending unit, and a terminal object control unit.
[0051] An operation event execution unit is used to execute an operation event in an edge virtual switch after receiving an operation event for a terminal object through a virtual network interface; the virtual network interface is a virtual machine network interface or a container network interface; the terminal object includes at least one of the following: a virtual machine or a container.
[0052] The elastic network interface information sending unit is used to send the elastic network interface information of the terminal object and the operation event to the virtual private cloud node controller; the virtual private cloud node controller stores the configuration information of the elastic network interfaces of different terminal objects.
[0053] The terminal object control unit is used to perform operations corresponding to the flow table information issued by the virtual private cloud node controller; the flow table information is obtained by the virtual private cloud node controller by matching the operation event, the elastic network interface information, and the configuration information of the elastic network interfaces of different terminal objects.
[0054] In one embodiment, the operation event is an access terminal object, and the operation event execution unit may include: a port creation unit, used to create a port corresponding to the terminal object in the edge virtual switch after the virtual network interface receives an operation event for the terminal object; correspondingly, the terminal object control unit may include a communication relationship establishment unit, used to establish communication between the edge virtual switch and the terminal object through the port corresponding to the terminal object based on the flow table information.
[0055] In one embodiment, the terminal object is a virtual machine, and the virtual network control method may include: a virtual machine port creation unit, used to create a port corresponding to the virtual machine in an edge virtual switch after the virtual machine network interface receives an access operation for the virtual machine; an access event sending unit, used to send the elastic network port information of the port corresponding to the virtual machine and the port access information of the virtual machine to the virtual private cloud node controller; and a communication relationship establishment unit, used to establish communication between the virtual machine and the edge virtual switch through the port corresponding to the virtual machine based on the flow table information issued by the virtual private cloud node controller.
[0056] In one implementation, the operation event is the removal of a terminal object. The operation event execution unit may include: a port removal unit, used to delete the port corresponding to the terminal object in the edge virtual switch after the virtual network interface receives the operation event for the terminal object; correspondingly, the terminal object control unit may include a communication relationship disconnection unit, used to disconnect the communication between the edge virtual switch and the terminal object based on the flow table information.
[0057] In one embodiment, the terminal object is a virtual machine, and the virtual network control device may include: a virtual machine port removal unit, used to delete the port corresponding to the virtual machine in the edge virtual switch after the virtual machine network interface receives a removal operation for the virtual machine; a virtual machine removal information sending unit, used to send the elastic network port information of the port corresponding to the virtual machine and the port access information of the virtual machine to the virtual private cloud node controller; and a communication relationship disconnection unit, used to disconnect the communication between the virtual machine and the edge virtual switch based on the flow table information issued by the virtual private cloud node controller.
[0058] In one implementation, the operation event is a migration terminal object. The operation event execution unit may include: a target port creation unit, used to create a target port corresponding to the target terminal object in the edge virtual switch after the virtual network interface receives an operation event for the terminal object; correspondingly, the terminal object control unit may include: a communication relationship establishment unit, used to establish a connection relationship between the edge virtual switch and the target terminal object based on the flow table information; and an initial port removal unit, used to delete the initial port corresponding to the original terminal object in the edge virtual switch; correspondingly, the terminal object control unit may include: a communication relationship disconnection unit, used to disconnect the connection relationship between the initial port and the original terminal object based on the flow table information.
[0059] In one embodiment, the terminal object is a virtual machine, and the virtual network control device may include: a target virtual machine port creation unit, used to create a target port corresponding to the target virtual machine in an edge virtual switch after the virtual machine network interface receives a migration operation for the virtual machine; an access information sending unit, used to send the elastic network port information of the target port and the port access information corresponding to the target virtual machine to the virtual private cloud node controller; an original virtual machine port removal unit, used to delete the original port corresponding to the original virtual machine in the edge virtual switch; a removal information sending unit, used to send the network port information of the original port and the removal information of the original port to the virtual private cloud node controller; and a communication relationship migration unit, used to establish communication between the target virtual machine and the edge virtual switch based on the flow table information issued by the virtual private cloud node controller, and to disconnect the communication between the original virtual machine and the edge virtual switch based on the flow table information issued by the virtual private cloud node controller.
[0060] The specific functions and effects of the virtual network control device can be explained by referring to other embodiments in this specification, and will not be repeated here. Each module in the virtual network control device can be implemented entirely or partially through software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0061] Please see Figure 7 One embodiment of this disclosure also provides an electronic device, which includes a processor and a memory, the memory being used to store a computer program, which, when executed by the processor, implements the virtual network control method described above.
[0062] The processor can be a central processing unit (CPU). It can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations thereof.
[0063] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the methods in the embodiments of this invention. The processor executes various functional applications and data processing by running the non-transitory software programs, instructions, and modules stored in the memory, thereby implementing the methods described in the above embodiments.
[0064] The memory may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the processor, etc. Furthermore, the memory may include high-speed random access memory and non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include memory remotely located relative to the processor, which can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0065] One embodiment of this disclosure also provides a computer-readable storage medium for storing a computer program that, when executed by a processor, implements the virtual network control method described above.
[0066] Those skilled in the art will understand that implementing all or part of the processes in the methods described in this specification can be accomplished by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described. Any references to memory, storage, databases, or other media used in the embodiments provided in this specification can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0067] It should be understood that each block of a flowchart and / or block diagram, and combinations of blocks in a flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0068] This specification describes various embodiments in a progressive manner. Different embodiments focus on describing the parts that differ from other embodiments. Those skilled in the art, upon reading this specification, will realize that the various embodiments and the technical features disclosed in these embodiments can be combined in numerous ways. For the sake of brevity, not all possible combinations of the technical features in the described embodiments are described. However, any combination of these technical features that does not contradict each other should be considered within the scope of this specification.
[0069] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0070] The various embodiments described in this specification emphasize the parts that differ from other embodiments, and these embodiments can be explained by comparison with each other. Any combination of the various embodiments described in this specification, based on general technical knowledge, is covered within the scope of this specification.
[0071] The above description is merely an embodiment of this invention and is not intended to limit the scope of protection of the claims. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principle of this invention should be included within the scope of the claims.
Claims
1. A virtual network control method, characterized in that, include: After the virtual network interface receives an operation event for a terminal object, the operation event is executed in the edge virtual switch; The virtual network interface is either a virtual machine network interface or a container network interface; the terminal object includes at least one of the following: virtual machine, container; The elastic network interface information of the terminal object and the operation event are sent to the virtual private cloud node controller; the virtual private cloud node controller stores the configuration information of the elastic network interface of different terminal objects, wherein, when the terminal object is a virtual machine, the virtual network interface information of the virtual machine is mapped to the elastic network interface information; Perform the operation corresponding to the flow table information issued by the virtual private cloud node controller; the flow table information is obtained by the virtual private cloud node controller by matching the operation event, the elastic network interface information and the configuration information of the elastic network interfaces of different terminal objects, and the flow table information is used to establish or disconnect the communication protocol with the terminal object through the port information corresponding to the terminal object.
2. The method according to claim 1, characterized in that, The operation event is an access terminal object, and the operation event is executed in the edge virtual switch, including: After the virtual network interface receives an operation event for the terminal object, a port corresponding to the terminal object is created in the edge virtual switch; Accordingly, operations corresponding to the flow table information issued by the virtual private cloud node controller are performed, including: establishing communication between the edge virtual switch and the terminal object through the port corresponding to the terminal object based on the flow table information.
3. The method according to claim 2, characterized in that, The terminal object is a virtual machine, and the method includes: After the virtual machine network interface receives an access operation for the virtual machine, a port corresponding to the virtual machine is created in the edge virtual switch; Send the elastic network port information and port access information corresponding to the virtual machine to the virtual private cloud node controller. Based on the flow table information issued by the virtual private cloud node controller, communication is established between the virtual machine and the edge virtual switch through the port corresponding to the virtual machine.
4. The method according to claim 1, characterized in that, The operation event is to remove the terminal object. This operation event is executed in the edge virtual switch and includes: After the virtual network interface receives an operation event for the terminal object, the port corresponding to the terminal object is deleted in the edge virtual switch; Accordingly, operations corresponding to the flow table information issued by the virtual private cloud node controller are performed, including: disconnecting the communication between the edge virtual switch and the terminal object based on the flow table information.
5. The method according to claim 4, characterized in that, The terminal object is a virtual machine, and the method includes: After the virtual machine network interface receives a removal operation for the virtual machine, the port corresponding to the virtual machine is deleted from the edge virtual switch; Based on the flow table information issued by the virtual private cloud node controller, the communication between the virtual machine and the edge virtual switch is disconnected.
6. The method according to claim 1, characterized in that, The operation event is a migration terminal object, and the operation event is executed in the edge virtual switch, including: After the virtual network interface receives an operation event for the terminal object, a target port corresponding to the target terminal object is created in the edge virtual switch; Accordingly, operations corresponding to the flow table information issued by the virtual private cloud node controller are performed, including: establishing a connection relationship between the edge virtual switch and the target terminal object based on the flow table information; Delete the initial port corresponding to the original terminal object in the edge virtual switch; Accordingly, operations corresponding to the flow table information issued by the virtual private cloud node controller are performed, including: disconnecting the connection between the initial port and the original terminal object based on the flow table information.
7. The method according to claim 6, characterized in that, The terminal object is a virtual machine, and the method includes: After the virtual machine network interface receives a migration operation for the virtual machine, a target port corresponding to the target virtual machine is created in the edge virtual switch; Send the elastic network port information of the target port and the port access information corresponding to the target virtual machine to the virtual private cloud node controller; Delete the original port corresponding to the original virtual machine in the edge virtual switch; Send the network port information of the original port and the removal information of the original port to the virtual private cloud node controller; Communication between the target virtual machine and the edge virtual switch is established based on the flow table information issued by the virtual private cloud node controller, and communication between the original virtual machine and the edge virtual switch is disconnected based on the flow table information issued by the virtual private cloud node controller.
8. A virtual network control device, characterized in that, The virtual network control device includes: An operation event execution unit is configured to execute an operation event in an edge virtual switch after the virtual network interface receives an operation event for a terminal object; the virtual network interface is a virtual machine network interface or a container network interface; the terminal object includes at least one of the following: a virtual machine or a container; The elastic network interface information sending unit is used to send the elastic network interface information of the terminal object and the operation event to the virtual private cloud node controller; the virtual private cloud node controller stores the configuration information of the elastic network interface of different terminal objects, wherein, when the terminal object is a virtual machine, the virtual network interface information of the virtual machine is mapped to the elastic network interface information; The terminal object control unit is used to perform operations corresponding to the flow table information issued by the virtual private cloud node controller. The flow table information is obtained by the virtual private cloud node controller by matching the operation event, the elastic network interface information, and the configuration information of the elastic network interfaces of different terminal objects. The flow table information is used to establish or disconnect the communication protocol with the terminal object through the port information corresponding to the terminal object.
9. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory being used to store a computer program that, when executed by the processor, implements the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Virtual network management method and system for fixed nested framework of virtual machine and container
CN108418705A