Virtual network control method and apparatus, electronic device, and storage medium

After receiving the operation event on the virtual network interface, the flow table information is executed in the edge virtual switch and sent to the virtual private cloud node controller, which solves the problem of requiring two sets of network management and control solutions for virtual machines and containers, and realizes the control of virtual machines. Unified network control of machines and containers reduces costs.

WO2024199358A1PCT designated stage expired Publication Date: 2024-10-03BEIJING VOLCANO ENGINE TECH CO LTD

Patent Information

Application Number
PCT/CN2024/084416
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-31
Filing Date
2024-03-28
Publication Date
2024-10-03

AI Technical Summary

Technical Problem

In the existing technology, virtual machines and containers require two different network management and control solutions, resulting in high development and maintenance costs.

Method used

After receiving the operation event on the virtual network interface, the operation event is executed in the edge virtual switch, and the elastic network interface information and operation event are sent to the virtual private cloud node controller to execute the matching flow table information to realize the control of the virtual machine. and unified network control of containers.

Benefits of technology

It reduces the cost of network management and control of virtual machines and containers, realizes the reuse of a set of processes for network control of virtual machines and containers, and reduces development and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024084416_03102024_PF_FP_ABST
    Figure CN2024084416_03102024_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure provides a virtual network control method and apparatus, a device, and a storage medium. The method comprises: after a virtual network interface receives an operation event for a terminal object, executing the operation event in an edge virtual switch; sending elastic network interface information of the terminal object and the operation event to a virtual private cloud node controller, wherein the virtual private cloud node controller stores configuration information of elastic network interfaces of different terminal objects; and executing an operation corresponding to flow table information issued by the virtual private cloud node controller, wherein the flow table information is obtained by matching the operation event, the elastic network interface information, and the configuration information of the elastic network interfaces of the different terminal objects by the virtual private cloud node controller.
Need to check novelty before this filing date? Find Prior Art

Description

Virtual network control method, device, electronic device and storage medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application is based on the Chinese application with application number 202310343128.7 and application date March 31, 2023, and claims its priority. The disclosed content of the Chinese application is hereby introduced as a whole into this application. Technical Field

[0003] The present disclosure relates to the technical field of cloud computing, and in particular to a virtual network method, device, electronic device, and storage medium. Background Art

[0004] Currently, the entire edge computing node product portfolio includes two computing product 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. The operating base for both virtual machines and containers is provided by Kubernetes (k8s). The lifecycle of virtual machines is managed by the kubevirt component, scheduled by k8s, and specifically controlled by Quick Emulator (QEMU). The lifecycle of containers is managed by native k8s components. In related technologies, network control solutions for virtual machines primarily provide IAAS (Infrastructure as a Service)-layer network control solutions for virtual machines. Network control solutions for containers primarily provide PAAS (Platform as a Service)-layer networking for container products through k8s' container network interface. Because virtual machines and containers require two different network control solutions, the development and maintenance of these two network control solutions is costly.

[0005] Summary of the Invention

[0006] In view of this, embodiments of the present disclosure provide a virtual network control method, apparatus, electronic device, and storage medium.

[0007] On the one hand, the present disclosure provides a virtual network control method, the method comprising: after a virtual network interface receives an operation event for a terminal object, executing the operation event in an 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: a virtual machine, a container; the elastic network interface information of the terminal object and the operation event are sent to a virtual private cloud node controller; the virtual private cloud node controller stores configuration information of elastic network interfaces of different terminal objects; executing an operation corresponding to the flow table information issued by the virtual private cloud node controller; the flow table information is obtained by matching the virtual private cloud node controller with the operation event, the elastic network interface information and the configuration information of the elastic network interfaces of the different terminal objects.

[0008] On the other hand, the present disclosure also provides a virtual network control device, which includes: an operation event execution unit, which is used to execute the operation event in the edge virtual switch after the virtual network interface receives the operation event for the 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, a container; an elastic network interface information sending unit, which 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; a terminal object control unit, which is used to execute operations corresponding to the flow table information issued by the virtual private cloud node controller; the flow table information is obtained by matching the virtual private cloud node controller with the operation event, the elastic network interface information and the configuration information of the elastic network interfaces of the different terminal objects.

[0009] On the other hand, the present disclosure further provides an electronic device, which includes a processor and a memory, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the above-mentioned virtual network control method is implemented.

[0010] On the other hand, the present disclosure further provides a computer-readable storage medium, which is used to store a computer program. When the computer program is executed by a processor, the above-mentioned virtual network control method is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The features and advantages of the present disclosure will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the present disclosure in any way. In the accompanying drawings:

[0012] FIG1 is a schematic diagram showing the steps of a virtual network control method according to an embodiment of the present disclosure;

[0013] FIG2( a ) shows a schematic diagram of accessing a virtual machine using a virtual network control method in one embodiment of the present disclosure;

[0014] FIG2( b ) shows a schematic diagram of accessing a container using a virtual network control method in one embodiment of the present disclosure;

[0015] FIG3( a ) shows a schematic diagram of connecting a virtual machine to a network in one embodiment of the present disclosure;

[0016] FIG3( b ) shows a schematic diagram of connecting a container to a network in one embodiment of the present disclosure;

[0017] FIG4( a ) shows a schematic diagram of removing a virtual machine from a network in one embodiment of the present disclosure;

[0018] FIG4( b ) shows a schematic diagram of removing a container from a network in one embodiment of the present disclosure;

[0019] FIG5 is a schematic diagram showing a process of migrating a virtual machine in one embodiment of the present disclosure;

[0020] FIG6 shows a schematic diagram of a virtual network control device in one embodiment of the present disclosure;

[0021] FIG7 shows a schematic structural diagram of an electronic device in one embodiment of the present disclosure. DETAILED DESCRIPTION

[0022] To make the purpose, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present disclosure.

[0023] Hyperconverged infrastructure (HCI) integrates computing, networking, and storage resources as infrastructure. This allows for selection, combination, and customization based on specific business system requirements, enabling convenient and efficient data center construction and business system deployment. This is typically achieved by integrating software virtualization technology (including computing, networking, storage, and security virtualization) into unit nodes (x86 servers). Each unit node can be aggregated through the network to achieve modular, seamless scale-out, creating a unified resource pool.

[0024] Virtual machines and containers are currently the mainstream virtualization technologies. A virtual machine is a complete computer system simulated through software, with complete hardware system functionality, running in a completely isolated environment. Virtualization technology primarily relies on the virtual machine manager (VMM), a layer of code that sits between the operating system and the computer hardware, partitioning the hardware platform into multiple virtual machines. The VMM runs in privileged mode and primarily isolates and manages the multiple virtual machines running above it, arbitrating their access to the underlying hardware and creating a virtual hardware environment (including processors, memory, and I / O (Input / Output) devices) for each client operating system, independent of the actual hardware.

[0025] Container technology is a sandbox technology that isolates applications from the outside world, allowing them to be easily "transferred." Essentially, a container is a specialized process. When creating a container process, a set of namespace parameters are specified, allowing the container process to only see resources, files, devices, status, or configurations within the current namespace. Kubernetes is currently the mainstream container computing resource orchestration platform.

[0026] A virtual machine hypervisor (VMM) provides users with the same functionality as a physical machine by emulating hardware devices, and hardware-based resource isolation ensures the security of virtual machines. Business users tend to run their core business operations on virtual machines. With technological advancements and the emergence of microservices architectures, the lightweight and low-overhead features of containers have led to their increasing use. Virtual machines and containers each have their own advantages and are essential in hyperconverged environments. Currently, edge computing node products include edge virtual machines and edge containers. Virtual machines and containers are deployed in a converged manner on edge clusters, fully reusing edge computing node resources. The operating infrastructure for both virtual machines and containers is provided by Kubernetes. The lifecycle of virtual machines is managed by the kubevirt component, which is scheduled by Kubernetes, and QEMU and other tools provide specific control over virtual machines. The lifecycle of containers is managed by native Kubernetes components. In related technologies, network control solutions for virtual machines primarily provide network control solutions at the IAAS layer for virtual machines, while network control solutions for containers primarily provide network control solutions at the PAAS layer for container products through the Kubernetes container network interface. Since virtual machines and containers require two different sets of network management and control solutions, it costs a lot of money to develop and maintain these two sets of network management and control solutions for virtual machines and containers.

[0027] Please refer to FIG1 , which shows a method for controlling a virtual network provided by an embodiment of the present disclosure. The method may include the following steps.

[0028] S110: 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 a virtual machine network interface or a container network interface; the terminal object includes at least one of the following: a virtual machine, a container.

[0029] 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 API interface (VirtulaMachine Network Interface, VNI) or a container network API interface (Container Network Interface, CNI). Among them, VNI is used to decouple computing and network processing processes, and the computing component calls VNI on demand to implement different network configurations. CNI is a standard interface for calling network implementation in k8s. Kubelet calls different network plug-ins through this standard API to implement different network configuration methods. Among them, the computing component can be a virtual machine component or kubelet, which is used to monitor virtual machines and containers respectively.

[0030] In this embodiment, the operation event may be an operation event for 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 the virtual machine, restarting the container, shutting down the virtual machine, shutting down the container. When the terminal object targeted by the operation event is a virtual machine, the virtual machine component invokes the VNI; when the terminal object targeted by the operation event is a container, the container component invokes the CNI.

[0031] In this embodiment, the Edge Virtual Switch (EVS) refers to a switch with a virtual machine connected to it, which is used to provide host network virtualization capabilities. Only switches added to the VCM edge switch list can be managed by the VCM to implement the management capabilities of connection configuration, including adding, deleting, querying edge switches, and viewing the migration history of virtual machines connected to edge switches. When the virtual network interface receives an operation event for a terminal 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 to 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 the virtual machine is deleted on the EVS.

[0032] S120: 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 stores configuration information of elastic network interfaces of different terminal objects.

[0033] In this embodiment, the Virtual Private Cloud (VPC) is a set of logically isolated virtual network environments built for instances, which are configured and managed by users themselves. It aims to improve the security of user resources and simplify user network deployment. Users can freely select IP (internet protocol) address ranges, create multiple subnets, customize security groups, and configure routing tables and gateways in the VPC, conveniently manage and configure the network, and make safe and fast network changes. At the same time, access control of instances in the subnet is strengthened by customizing access rules for instances within and between security groups and multiple security layers such as firewalls. In addition, users can also create a virtual private network (VPN) between the company's data center or private network and the VPC without the need for port forwarding through the external network IP. The VPC node controller is deployed on the edge side, and each edge cluster has a set of VPC node controllers to manage and configure calculations for the VPC in the edge cluster scope, solving the problems of hierarchical computing and edge autonomy. One end is connected to the VPC core controller through the general controller middle platform, and the other end is connected to the EVS device. By sending the operation event and the elastic network interface information of the terminal object on the edge virtual switch to the VPC node controller, the VPC node controller does not need to distinguish whether the terminal object targeted by the current operation event is a virtual machine or a server. Therefore, only one network control solution needs to be deployed on the network side to achieve network control of virtual machines and containers.

[0034] In this implementation, the Elastic Network Interface (ENI) is a logical network component that represents a virtual network card in a VPC. A container can carry ENI information, and a virtual machine can be any of a virtual machine, a virtual mobile facility, and an ENI. Since containers can only be represented by ENIs, in order to allow virtual machines and containers to reuse the same network control scheme, the virtual machine's virtual network interface information must be mapped to ENI information for representation.

[0035] S130: Execute an operation corresponding to the flow table information issued by the virtual private cloud node controller; the flow table information is obtained by matching the virtual private cloud node controller with the operation event, the elastic network interface information and the configuration information of the elastic network interface of the different terminal objects.

[0036] In this embodiment, the VPC core controller is located on the central side, and the configuration information of the virtual machine or container stored thereon is sent by the VPC core controller to the VPC core controller. After receiving the request sent by the virtual network interface, the VPC node controller can then match the configuration information of several terminal objects issued by the VPC core controller to obtain the flow table information, and send the flow table information to the EVS agent node of the host where the terminal object targeted by the operation event is located, and then the EVS agent (EVS-Agent) node sends the flow table information to EVS. After receiving the flow table information, EVS can establish a communication protocol with the terminal object through the port information corresponding to the terminal object. Among them, EVS-Agent is an agent of the EVS device, which is used for configuration translation and issuance, and forwarding the flow table information to the EVS device. The VPC core controller is deployed on the central side and is the VPC global controller of the entire edge network. One end provides the platform with the only API entrance for the VPC capability on the edge network side, and the other end connects the VPC core controller and EVS device through the general controller middle platform.

[0037] In one embodiment, the operation event is an access terminal object. Executing the operation event in the edge virtual switch may include: after a virtual network interface receives the operation event for the terminal object, creating a port corresponding to the terminal object in the edge virtual switch. Accordingly, executing 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 via the port corresponding to the terminal object based on the flow table information.

[0038] In this embodiment, since the life cycle of the virtual machine is managed by the kubevirt component, scheduled by k8s, and QEMU and other components perform specific control over the virtual machine; the life cycle of the container is managed by the k8s native component. Therefore, the network access method of the virtual machine can be set to synchronize with the container, so that the VPC node controller does not need to distinguish whether the terminal device is a virtual machine or a container, and sends the flow table information to the corresponding EVS device through internal calculations. The product side of the virtual machine and container uses ENI as the organizational unit, where a single-interface container has a default ENI. The control plane then establishes a mapping relationship from ENI to EVS Port to unify the processing flow of the virtual machine and container and reuse a set of processing flows. In addition, the Endpoint object is introduced inside the VPC node controller, and the ENI of the virtual machine and container are unified into the Endpoint object. The Endpoint manages complete ENI information, including IP address, Label, rate limit configuration, etc., so that the VPC node controller can manage the complete life cycle of the terminal object. Specifically, for example, when the virtual machine component detects the addition of a virtual machine, the complete ENI information of the virtual machine will be added to the Endpoint until the virtual machine is removed from the node controller.

[0039] After the virtual network interface receives an operation event for the terminal object, the operation event is executed in the virtual edge switch, and the elastic network interface information and operation event corresponding to the operation event are sent to the virtual private cloud node controller. Then, after the virtual private cloud node controller calculates the relevant configuration information, it can send the flow table information to the virtual edge switch to implement the communication protocol between the virtual edge switch and the terminal object, so that network control of virtual machines and containers can be achieved using a set of network control solutions, which reduces the cost of network management and control of virtual machines and containers to a certain extent.

[0040] Please refer to Figures 2(a) and 2(b). In this embodiment, the operation event is an access terminal object. Then, after the virtual network interface receives the operation event, it is necessary to create a port corresponding to the terminal object in the edge virtual server, and then send the ENI information and operation event of the port to the corresponding VPC node controller for processing. The VPC node controller can calculate a relevant configuration and send it to the EVS-Agent. Then, after translation, the EVS-Agent sends the flow table information to the corresponding EVS device, so that the network access of the terminal device can be achieved through the newly created port in the EVS.

[0041] In one embodiment, 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 corresponding to 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.

[0042] In this embodiment, since it is necessary to reuse a set of processes for network control of virtual machines and containers, and the containers need to fully comply with the protocol settings related to the k8s native components, the network control scheme for the virtual machines can be mapped to the same as that for the containers, and the control of the virtual machines and containers can be achieved through a set of network control schemes.

[0043] Please refer to Figures 3(a) and 3(b). In this embodiment, the virtual machine is managed by the virtual machine component, and the virtual machine component needs to call VNI to implement network control of the virtual machine; while the container is managed by kubelet, and kubelet needs to call CNI to implement network control of the container. The VNI then sends the interface information corresponding to the virtual machine to the VPC node controller, and the CNI sends the interface information corresponding to the container to the VPC node controller. Since the interface information of the virtual machine and the interface information of the container are inconsistent, two different solutions 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 set of network control solutions, thereby saving the development and maintenance costs of the two solutions. 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 geographic location information of the current host. After receiving the VM port join information, the VPC node controller can determine the host device from which the node join information comes based on the geographic location information, and then send the flow table information to the edge virtual switch of the host device. During the container creation process, the computing stack platform needs to first send the computing content to the Multi-Chip-Package (MCP), and then the MCP sends the computing content to the Kubernetes interface service.

[0044] In one embodiment, the operation event is removing a terminal object. Executing the operation event in the edge virtual switch may include: after a virtual network interface receives the operation event for the terminal object, deleting the port corresponding to the terminal object in the edge virtual switch. Accordingly, executing an operation corresponding to the flow table information issued by the virtual private cloud node controller may include: disconnecting communication between the edge virtual switch and the terminal object based on the flow table information.

[0045] In this embodiment, if the operation event is to remove a terminal object, then before the virtual network interface receives the operation event, the port corresponding to the terminal object must be deleted in the edge virtual server. The ENI information of the port and the operation event are then 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, the EVS-Agent sends the flow table information to the corresponding EVS device, thereby disconnecting the terminal device from the network through the newly created port in the EVS.

[0046] In one embodiment, 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 corresponding to 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.

[0047] Please refer to Figure 4(a) and Figure 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 will first call the VNI, and then trigger the removal of the port corresponding to the virtual machine from the EVS, and then send the virtual machine removal event to the VPC node controller.

[0048] In this embodiment, when a virtual machine is restarted, it triggers the rescheduling of the virtual machine. During the rescheduling process, the virtual machine component of the source host first triggers the source host's VM Port removal event through a VNI call. Then, the virtual machine component of the target host triggers the target host's VM Port access event through a VNI call. Finally, the VPC node controller calculates the relevant configuration and sends it to the corresponding source and destination EVS devices. When the virtual machine is shut down, it triggers the deletion of the VMI. The virtual machine component then triggers the VM Port removal event through a VNI call, releasing the IP address and deleting the OVS Port action. The VPC node controller then calculates the relevant configuration and sends it to the corresponding EVS device side.

[0049] In one embodiment, the operation event is a migration terminal object, and 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 target port corresponding to the target terminal object in the edge virtual switch. Accordingly, executing the operation corresponding to the flow table information sent by the virtual private cloud node controller may include: establishing a connection relationship 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. Accordingly, executing the operation corresponding to the flow table information sent by the virtual private cloud node controller may include: disconnecting the connection relationship between the initial port and the original terminal object based on the flow table information.

[0050] In this embodiment, for the migration operation of the terminal object, such as moving the current operation item from one terminal device to another terminal device, it is necessary to remove the terminal device on the source host and then connect to the target terminal device. In this case, a temporary terminal of the network will appear, which will affect the customer experience. Therefore, you can first load the target node for initial configuration, create EVS Port, etc., and then send the configuration to the target node, including related flow tables, security groups, diversion, etc., and finally send the configuration to the source node and delete the configuration of the terminal device on the source node.

[0051] In one embodiment, 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.

[0052] Please refer to Figure 5. In this embodiment, in the case where the current processing matter needs to be removed from the original virtual machine to the target virtual machine, it is necessary to first create an EVS Port in the EVS and then send it to the VPC node controller. The VPC node controller will first calculate the relevant configuration and send the flow table information to the EVS device to achieve communication between the target virtual machine and the EVS device, and then delete the original EVS Port in the EVS and send the original port information 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 the virtual machine or container can be performed within the same host or between different hosts. Of course, in the case of performing the migration operation within the same host, it can be a migration between virtual machines and containers deployed on the same host.

[0053] Please refer to FIG. 6 . An embodiment of the present disclosure further provides a virtual network control device 600 . The virtual network control device may include: an operation event execution unit 601 , an elastic network interface information sending unit 602 , and a terminal object control unit 603 .

[0054] The operation event execution unit 601 is used to execute the operation event in the edge virtual switch after the virtual network interface receives the operation event for the 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, a container.

[0055] The elastic network interface information sending unit 602 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.

[0056] The terminal object control unit 603 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 matching the virtual private cloud node controller with the operation event, the elastic network interface information and the configuration information of the elastic network interface of the different terminal objects.

[0057] In one embodiment, the operation event is an access terminal object, and the operation event execution unit 601 may include: a port creation unit, configured to create a port corresponding to the terminal object in the edge virtual switch after the virtual network interface receives the operation event for the terminal object. Accordingly, the terminal object control unit 603 may include a communication relationship establishment unit, configured 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.

[0058] 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 the 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 corresponding to the virtual machine to the virtual private cloud node controller; 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.

[0059] In one embodiment, the operation event is the removal of a terminal object. The operation event execution unit 601 may include a port removal unit configured 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. Accordingly, the terminal object control unit 603 may include a communication relationship disconnection unit configured to disconnect the communication between the edge virtual switch and the terminal object based on the flow table information.

[0060] 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 corresponding to the virtual machine to the virtual private cloud node controller; 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.

[0061] In one embodiment, the operation event is a migration terminal object, and the operation event execution unit 601 may include: a target port creation unit, which is used to create a target port corresponding to the target terminal object in the edge virtual switch after the virtual network interface receives the operation event for the terminal object. Accordingly, the terminal object control unit 603 may include: a communication relationship establishment unit, which is 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, which is used to delete the initial port corresponding to the original terminal object in the edge virtual switch. Accordingly, the terminal object control unit 603 may include: a communication relationship disconnection unit, which is used to disconnect the connection relationship between the initial port and the original terminal object based on the flow table information.

[0062] 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, which is used to create a target port corresponding to the target virtual machine in the edge virtual switch after the virtual machine network interface receives a migration operation for the virtual machine; an access information sending unit, which is 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, which is used to delete the original port corresponding to the original virtual machine in the edge virtual switch; a removal information sending unit, which is 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; a communication relationship migration unit, which is 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 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.

[0063] The specific functions and effects achieved by the virtual network control device can be explained in conjunction with other embodiments of this specification and will not be repeated here. The various modules in the virtual network control device can be implemented in whole or in part through software, hardware, or a combination thereof. The modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in the form of software in the computer device so that the processor can call and execute the operations corresponding to the above modules.

[0064] Please refer to Figure 7. An embodiment of the present disclosure also provides an electronic device 700, which includes a processor 701 and a memory 702 connected via an internal bus 703. The memory is used to store a computer program 704. When the computer program is executed by the processor, the above-mentioned virtual network control method is implemented.

[0065] The processor 701 may be a central processing unit (CPU). The processor 701 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.

[0066] Memory 702 is a non-transitory computer-readable storage medium that can be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions / modules corresponding to the methods in the embodiments of the present disclosure. Processor 701 executes the non-transitory software programs, instructions, and modules stored in memory 702 to perform various functional applications and data processing of processor 701, thereby implementing the methods in the above-mentioned method embodiments.

[0067] The memory 702 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory 702 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 702 may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0068] An embodiment of the present disclosure further provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program. When the computer program is executed by a processor, the above-mentioned virtual network control method is implemented.

[0069] Those skilled in the art will understand that all or part of the processes in the implementation methods described can be implemented by instructing related hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the implementation methods of the methods described. Among them, any reference to memory, storage, database or other media used in the various implementation methods provided in this specification may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0070] The embodiment of the present disclosure further provides a computer program, comprising instructions, which, when executed by a processor, enable the processor to execute the above method disclosed in the embodiment of the present disclosure.

[0071] An embodiment of the present disclosure further provides a computer program product, comprising instructions, wherein when the instructions are executed by a processor, the processor is caused to execute the above method disclosed in the embodiment of the present disclosure.

[0072] It should be understood that each process and / or block in the flowchart and / or block diagram, as well as a combination of processes and / or blocks in the 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, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate a device for implementing the functions specified in one or more processes in the flowchart and / or one or more blocks in the block diagram.

[0073] The descriptions of the various embodiments of this specification are made in a progressive manner. Different embodiments focus on describing the parts that are different from other embodiments. After reading this specification, those skilled in the art will know that the various embodiments in this specification, as well as the various technical features disclosed in the embodiments, can be combined in more ways. To make the description concise, not all possible combinations of the various technical features in the embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0074] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0075] The various embodiments in this specification emphasize the differences between the various embodiments, and the various embodiments can be interpreted in comparison with each other. Any combination of the various embodiments in this specification based on general technical knowledge by those skilled in the art is within the scope of this specification.

[0076] The foregoing description is merely an embodiment of the present invention and is not intended to limit the scope of the claims. Persons skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements within the spirit and principles of the present invention are intended to be encompassed by the claims.

Claims

1. A virtual network control method, comprising: After the virtual network interface receives the operation event for the terminal object, executing the operation event 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: 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 stores configuration information of elastic network interfaces of different terminal objects; as well as Execute an operation corresponding to the flow table information issued by the virtual private cloud node controller; the flow table information is obtained by matching the virtual private cloud node controller with respect to the operation event, the elastic network interface information and the configuration information of the elastic network interface of the different terminal objects.

2. The method according to claim 1, wherein: The operation event is an access terminal object, and executing the operation event in the edge virtual switch includes: 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; and Executing operations corresponding to the flow table information sent by the virtual private cloud node controller, 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, wherein: 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, 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 corresponding to the virtual machine to the virtual private cloud node controller; and Based on the flow table information sent by the virtual private cloud node controller, communication between the virtual machine and the edge virtual switch is established through the port corresponding to the virtual machine.

4. The method according to any one of claims 1 to 3, wherein: The operation event is removing a terminal object, and executing the operation event in the edge virtual switch includes: After the virtual network interface receives the operation event for the terminal object, deleting the port corresponding to the terminal object in the edge virtual switch; and Executing an operation corresponding to the flow table information sent by the virtual private cloud node controller includes: 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, wherein: 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, deleting 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 corresponding to the virtual machine to the virtual private cloud node controller; and Disconnect the communication between the virtual machine and the edge virtual switch based on the flow table information sent by the virtual private cloud node controller.

6. The method according to any one of claims 1 to 5, wherein: The operation event is a migration terminal object, and executing the operation event in the edge virtual switch includes: After the virtual network interface receives the operation event for the terminal object, creating a target port corresponding to the target terminal object in the edge virtual switch; Executing an operation corresponding to the flow table information sent by the virtual private cloud node controller, including: establishing a connection relationship 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 Executing an operation corresponding to the flow table information sent by the virtual private cloud node controller includes: disconnecting the connection relationship between the initial port and the original terminal object based on the flow table information.

7. The method according to claim 6, wherein: The terminal object is a virtual machine, and the method includes: After the virtual machine network interface receives the migration operation for the virtual machine, a target port corresponding to the target virtual machine is created 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; Delete 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; The communication between the target virtual machine and the edge virtual switch is established based on the flow table information sent by the virtual private cloud node controller, and the communication between the original virtual machine and the edge virtual switch is disconnected by disconnecting the flow table information sent by the virtual private cloud node controller.

8. A virtual network control device, comprising: An operation event execution unit, configured to execute the operation event in the edge virtual switch after the virtual network interface receives the operation event for the 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, a container; An elastic network interface information sending unit, 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; as well as The terminal object control unit is used to perform an operation corresponding to the flow table information issued by the virtual private cloud node controller; the flow table information is the virtual private cloud node controller for the operation event, the elastic network interface The port information is matched with the configuration information of the elastic network interfaces of the different terminal objects.

9. An electronic device, wherein: The electronic device comprises a processor and a memory, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, wherein: The computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

11. A computer program comprising instructions, wherein when the instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 7.

12. A computer program product comprising instructions, wherein: When the instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Network configuration method of public cloud and related equipment

    CN114338606A

  • Public cloud container instance creation method

    CN114422350A

  • Communication method and device based on VPC network, computer equipment and storage medium

    CN115473816A

  • Configuration method and device of elastic network interface ENI

    CN115686818A

  • Virtual network control method and device, electronic equipment and storage medium

    CN116366473A

Cited By

  • Network deployment method, device and equipment and computer readable storage medium

    CN119696956A

  • Speed-limiting configuration method, device and equipment of virtual switch, medium and product

    CN120880998A