Method and system for positioning virtual machine based on software SDN (Software Defined Network) architecture

By using the LLDP protocol and cloud platform interface, the corresponding relationship between the Leaf switch port and the virtual machine is established, and the problem of being unable to quickly locate the virtual machine under the Leaf switch port in the existing technology is solved, and efficient and timely virtual machine positioning and failure recovery are achieved. .

CN119473504APending Publication Date: 2025-02-18中国邮政储蓄银行股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411619963.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The existing technology cannot quickly locate the associated virtual machines under the Leaf switch port, resulting in unknown scope of failure impact, difficulty in recovery, and risk of smooth system operation.

Method used

Use the LLDP protocol to obtain the LLDP information of the Leaf switch, traverse the port to obtain the device name, call the cloud platform interface to query the server information, establish the correspondence between the Leaf switch port and the virtual machine, and realize the positioning of the virtual machine.

Benefits of technology

It realizes the rapid and timely positioning of virtual machines in the event of Leaf switch failure or port failure, reducing the risk of failure recovery and improving the reliability and operation and maintenance efficiency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473504A_ABST
    Figure CN119473504A_ABST
Patent Text Reader

Abstract

The invention provides a method and a system for positioning a virtual machine based on a software SDN (Software Defined Network) architecture. The method comprises the following steps: acquiring LLDP information of a Leaf switch by adopting an LLDP protocol; traversing the Leaf switch port according to the LLDP information, acquiring an LLDP device name according to the Leaf switch port, and determining device name information connected with the Leaf switch port according to the LLDP device name; the cloud platform interface is called to inquire server information according to the LLDP device name, and the server information comprises virtual machine information; and according to the server information and the equipment name information, obtaining a corresponding relationship between the Leaf switch port and the virtual machine, and positioning the virtual machine according to the corresponding relationship. The problem that the associated virtual machine under the Leaf switch port cannot be quickly positioned in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of positioning virtual machines based on software SDN architecture, and in particular to a positioning method, system, automation platform, computer-readable storage medium and electronic device for virtual machines based on software SDN architecture. Background Art

[0002] The development of modern cloud computing technology and big data environment has brought more challenges to the network structure of financial industry data centers. In order to adapt to more complex data environments, large-scale networks in modern data centers mostly adopt leaf-spine-border architecture, which consists of three main layers: Leaf layer, Spine layer and Border layer. The Leaf layer consists of multiple Leaf switches. The control of each layer of equipment is independent of each other, making it difficult to perform unified traffic scheduling and management, which brings great difficulties to network operation and maintenance. In order to solve this problem, SDN technology came into being and gradually developed into an indispensable part of network operation and maintenance.

[0003] As a new type of network technology, SDN technology brings many advantages to data centers by separating the network control plane and the data forwarding plane and managing the network in a unified manner through a centralized controller. SDN technology can be divided into software SDN and hardware SDN. Software SDN can avoid excessive reliance on hardware network devices and reduce the cost of networking. Therefore, it has been gradually piloted and applied on a large scale in the financial industry in recent years. However, due to its special architecture and implementation method, software SDN technology also brings many inconveniences to operation and maintenance work. In the network architecture, due to the large number of Leaf switches and their direct connection with many network devices such as servers, problems such as large port traffic, port failures, and switch failures or upgrades often occur. However, for the above scenarios, software SDN technology lacks a method to quickly locate the virtual machines associated with the Leaf switch ports, so it is impossible to clearly define the scope of the fault impact and ensure rapid fault recovery, which poses a certain risk to the smooth operation of the system. Summary of the invention

[0004] The main purpose of the present application is to provide a method, system, automation platform, computer-readable storage medium and electronic device for locating a virtual machine based on a software SDN architecture, so as to at least solve the problem that the prior art cannot quickly locate the virtual machine associated with the Leaf switch port.

[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for locating a virtual machine based on a software SDN architecture is provided, including: using the LLDP protocol to obtain LLDP information of a Leaf switch, wherein the LLDP information includes name information of a Leaf switch port and a connected device; traversing the Leaf switch port according to the LLDP information, obtaining an LLDP device name according to the Leaf switch port, and determining the device name information connected to the Leaf switch port according to the LLDP device name; calling a cloud platform interface to query server information according to the LLDP device name, wherein the server information includes virtual machine information; according to the server information and the device name information, obtaining a correspondence between the Leaf switch port and the virtual machine, and locating the virtual machine according to the correspondence.

[0006] Optionally, after obtaining the LLDP device name according to the Leaf switch port, the method further includes: obtaining a server list, wherein the server list includes multiple server names; determining whether the LLDP device name contains the server name in the server list; and when it is determined that the LLDP device name contains the server name, determining the device name information connected to the Leaf switch port according to the server name in the LLDP device name.

[0007] Optionally, before calling the cloud platform interface to query the server information according to the LLDP device name, the method also includes: determining whether the server information is queried according to the LLDP device name by calling the cloud platform interface; if it is determined that the server information is not queried, it is characterized that the Leaf switch port is not connected to the server, and directly traverses the next Leaf switch port.

[0008] Optionally, after directly traversing the next Leaf switch port, the method further includes: determining whether all the Leaf switch ports of the Leaf switch are traversed; when all the Leaf switch ports of the Leaf switch are traversed, generating a connection table of the Leaf switch ports of the Leaf switch, wherein the connection table is a connection relationship table of the Leaf switch ports of the Leaf switch.

[0009] Optionally, after obtaining the correspondence between the Leaf switch port and the virtual machine according to the server information and the device name information, the method further includes: when receiving fault alarm information of the virtual machine, locating the faulty virtual machine according to the correspondence.

[0010] Optionally, after locating the faulty virtual machine according to the corresponding relationship, the method further includes: generating prompt information, where the prompt information is used to prompt to perform inspection and maintenance processing on the faulty virtual machine.

[0011] According to another aspect of the present application, a system for positioning a virtual machine based on a software SDN architecture is provided, including: an automation platform, the automation platform is used to execute any one of the methods for positioning a virtual machine based on a software SDN architecture; a Leaf switch, the Leaf switch is connected to a server, a Spine switch and other Leaf switches through a Leaf switch port, and the Leaf switch is used for data forwarding; a cloud platform, the cloud platform provides virtual machine creation services, management services, monitoring services, backup services and recovery services; the server, the virtual machine is deployed in the server, and the server carries virtual machine information.

[0012] According to another aspect of the present application, an automation platform is provided, including: an acquisition unit, used to acquire LLDP information of a Leaf switch using an LLDP protocol, wherein the LLDP information includes name information of a Leaf switch port and a connected device; a traversal unit, used to traverse the Leaf switch port according to the LLDP information, acquire the LLDP device name according to the Leaf switch port, and determine the device name information connected to the Leaf switch port according to the LLDP device name; a query unit, used to call a cloud platform interface to query server information according to the LLDP device name, wherein the server information includes virtual machine information; a first positioning unit, used to acquire the correspondence between the Leaf switch port and the virtual machine according to the server information and the device name information, and locate the virtual machine according to the correspondence.

[0013] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is run, the device where the computer-readable storage medium is located is controlled to execute any one of the methods for locating a virtual machine based on a software SDN architecture.

[0014] According to another aspect of the present application, an electronic device is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for executing any one of the positioning methods of a virtual machine based on a software SDN architecture.

[0015] Applying the technical solution of the present application, the LLDP protocol is used to obtain the LLDP information of the Leaf switch, wherein the LLDP information includes the name information of the Leaf switch port and the connected device; the Leaf switch port is traversed according to the LLDP information, the LLDP device name is obtained according to the Leaf switch port, and the device name information connected to the Leaf switch port is determined according to the LLDP device name; the cloud platform interface is called to query the server information according to the LLDP device name, wherein the server information includes the virtual machine information; according to the server information and the device name information, the correspondence between the Leaf switch port and the virtual machine is obtained, and the virtual machine is located according to the correspondence. This solution dynamically obtains the port information of the Leaf switch at any time, and combined with the access query to the cloud platform, the virtual machine connected to the port can be located in time. The whole process is efficient, timely, and can be realized automatically, without the need for manual regular maintenance. It can completely solve the problem of locating the virtual machine in scenarios such as Leaf switch failure or Leaf switch port failure, and effectively help risk control and troubleshooting. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0017] Figure 1 A schematic diagram of a flow chart of a method for locating a virtual machine based on a software SDN architecture provided according to an embodiment of the present application is shown;

[0018] Figure 2 A structural diagram of a virtual machine positioning system based on a software SDN architecture provided according to an embodiment of the present application is shown;

[0019] Figure 3 A schematic diagram of a flow chart of a method for locating a virtual machine based on a software SDN architecture provided in accordance with an embodiment of the present application is shown;

[0020] Figure 4 A structural block diagram of an automation platform provided according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0021] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0022] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0024] As introduced in the background technology, the existing technology cannot quickly locate the virtual machine associated with the Leaf switch port. In order to solve the problem that the existing technology cannot quickly locate the virtual machine associated with the Leaf switch port, the embodiments of the present application provide a method, system, automation platform, computer-readable storage medium and electronic device for locating a virtual machine based on a software SDN architecture.

[0025] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0026] Figure 1 FIG. 1 is a flow chart of a method for locating a virtual machine based on a software SDN architecture according to an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:

[0027] Step S201, using the LLDP protocol to obtain LLDP information of the Leaf switch, wherein the LLDP information includes name information of the Leaf switch port and the connected device;

[0028] Specifically, the Link Layer Discovery Protocol (LLDP) of the data link layer is needed to learn the name of the opposite device connected to a certain port. In the data link layer, the Link Layer Discovery Protocol is a Layer 2 protocol defined in IEEE 802.1ab, which enables network devices (such as switches) to transmit LLDP packets (Link Layer Discovery Protocol Data Unit) within a local area network to announce their own status details to other devices, including device identity, interface number, management IP and other information. This practice facilitates the discovery of the physical layout of network devices and the acquisition of their management configuration information.

[0029] Step S202, traversing the Leaf switch ports according to the LLDP information, obtaining the LLDP device name according to the Leaf switch port, and determining the device name information connected to the Leaf switch port according to the LLDP device name;

[0030] Specifically, the Leaf switch exchanges LLDP packets with the port device through the link layer discovery protocol, and learns the device name information connected to the port through the packet. The automation platform can first log in to the corresponding Leaf switch and view the LLDP device name learned by the Leaf switch port to obtain the device name information connected to all ports.

[0031] Step S203, calling the cloud platform interface to query server information according to the LLDP device name, wherein the server information includes virtual machine information;

[0032] Step S204: According to the server information and the device name information, the correspondence between the Leaf switch port and the virtual machine is obtained, and the virtual machine is located according to the correspondence.

[0033] Specifically, after querying the server information on the cloud platform according to the LLDP device name, the server name in the device can be successfully selected, but the virtual machine information is still unknown. In order to centrally manage computing resources, the cloud platform will also save the correspondence between the server and the virtual machine it carries when selecting the server to which the virtual machine is sent. Based on this, the automation platform can obtain the virtual machine information carried on the server stored by the cloud platform by further accessing the cloud platform, and combine the previously obtained connection relationship between the Leaf switch port and the server to finally establish a mapping relationship between the Leaf switch port and the virtual machine, thereby locating the virtual machine.

[0034] Through this embodiment, the LLDP protocol is used to obtain the LLDP information of the Leaf switch, wherein the LLDP information includes the name information of the Leaf switch port and the connected device; the Leaf switch port is traversed according to the LLDP information, the LLDP device name is obtained according to the Leaf switch port, and the device name information connected to the Leaf switch port is determined according to the LLDP device name; the cloud platform interface is called to query the server information according to the LLDP device name, wherein the server information includes the virtual machine information; according to the server information and the device name information, the correspondence between the Leaf switch port and the virtual machine is obtained, and the virtual machine is located according to the correspondence. This solution dynamically obtains the port information of the Leaf switch at any time, and combined with the access query to the cloud platform, the virtual machine connected to the port can be located in time. The whole process is efficient, timely, and can be realized automatically, without the need for manual regular maintenance. It can completely solve the problem of locating the virtual machine in scenarios such as Leaf switch failure or Leaf switch port failure, and effectively help risk control and troubleshooting.

[0035] During the specific implementation process, after obtaining the LLDP device name according to the Leaf switch port, the method also includes: obtaining a server list, wherein the server list includes multiple server names; determining whether the LLDP device name contains the server name in the server list; when it is determined that the LLDP device name contains the server name, determining the device name information connected to the Leaf switch port according to the server name in the LLDP device name.

[0036] In the actual network architecture, the Leaf switch is not only connected to the server. Due to the hierarchical architecture and redundancy of the network, the Leaf switch is also connected to the Spine switch and other Leaf switches. Therefore, the LLDP device name learned by the port of the Leaf switch may be the Spine switch name, other Leaf switch names, or server names. The first two do not deploy virtual machines. In order to locate the virtual machine, the server name needs to be selected from all the learned device names.

[0037] Specifically, before calling the cloud platform interface to query the server information according to the LLDP device name, the method also includes: determining whether the server information is queried according to the LLDP device name by calling the cloud platform interface; if it is determined that the server information is not queried, it indicates that the Leaf switch port is not connected to the server, and directly traverses the next Leaf switch port.

[0038] This method can query the LLDP device name learned by the switch on the cloud platform by calling the cloud platform interface. If the server information cannot be found, the Leaf switch port is not connected to a server device, and the next Leaf switch port is skipped. After an automatic traversal, the automation platform can echo the corresponding information between the port and all directly connected server devices.

[0039] More specifically, after directly traversing the next Leaf switch port, the method also includes: determining whether all the Leaf switch ports of the Leaf switch are traversed; when all the Leaf switch ports of the Leaf switch are traversed, generating a connection table of the Leaf switch ports of the Leaf switch, wherein the connection table is a connection relationship table of the Leaf switch ports of the Leaf switch.

[0040] If the method fails to find the server information, the Leaf switch port is not connected to a server device, and the next Leaf switch port is skipped. After an automatic traversal, the automation platform can echo the corresponding information of the port and all directly connected server devices.

[0041] Furthermore, after obtaining the correspondence between the Leaf switch port and the virtual machine according to the server information and the device name information, the method further includes: when receiving the fault alarm information of the virtual machine, locating the faulty virtual machine according to the correspondence.

[0042] This method automatically and timely obtains the information of the virtual machine connected to the Leaf switch port when an alarm or failure occurs, which completely solves the problem of quickly locating the virtual machine associated with the Leaf switch port under the software SDN architecture.

[0043] Furthermore, after locating the faulty virtual machine according to the corresponding relationship, the method further includes: generating prompt information, where the prompt information is used to prompt to perform inspection and maintenance processing on the faulty virtual machine.

[0044] This embodiment also provides a virtual machine positioning system based on software SDN architecture, such as Figure 2 As shown, including:

[0045] An automation platform, the automation platform is used to execute any method for locating a virtual machine based on a software SDN architecture;

[0046] Leaf switches: Leaf switches are connected to other Leaf switches on the server spine switch through Leaf switch ports. Leaf switches are used for data forwarding.

[0047] Cloud platform, which provides virtual machine creation, management, monitoring, backup, and recovery services;

[0048] Server, the virtual machine is deployed in the server, and the server carries the virtual machine information.

[0049] In the network architecture, the cloud platform provides a series of services such as virtual machine creation, management, monitoring, backup, and recovery. In the process of creating a virtual machine, the cloud platform will select the server to which the virtual machine is sent according to a specific policy, so it will record the name information of all servers where the virtual machine is deployed.

[0050] The numerous ports of the Leaf switch in this system can be connected to multiple servers, and corresponding virtual machines are deployed on the servers. In the actual network architecture, the Leaf switch can also be connected to the Spine switch and other Leaf switches. The automation platform can log in to the Leaf switch through the SNMP protocol to achieve remote control of the switch. The cloud platform achieves centralized, automated and intelligent management of computing resources by managing server resources. At the same time, the automation platform can access the cloud platform resources and query the relevant information of the server recorded in the cloud platform. At the same time, the automation platform also integrates the function of monitoring virtual machine failure alarms.

[0051] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the method for locating a virtual machine based on a software SDN architecture of the present application will be described in detail below in conjunction with specific embodiments.

[0052] Software SDN is also known as Host Overlay. The biggest difference between it and hardware SDN (i.e. Network Overlay) is the location of the virtual machine gateway. In the hardware SDN architecture, the virtual machine gateway is usually deployed on a dedicated network hardware device, which usually has high performance and stability. In the cloud network with a leaf-spine-border structure, the virtual machine gateway is deployed on the Leaf switch. In daily information communication, the ARP table of the Leaf switch itself stores the corresponding information between the port and the virtual machine, so when a fault occurs, the corresponding relationship between the Leaf switch port and the virtual machine can be intuitively located. In software SDN, the virtual machine gateway is usually deployed on a general-purpose server, using server resources (such as CPU, memory, and storage) to perform network functions and control. In the cloud network, the virtual machine gateway is deployed on the host's vSwitch. The Leaf switch only forwards information, does not perceive the control layer and virtual machine information, and does not support the mapping and positioning of virtual machines and hardware access ports. Therefore, it is impossible to quickly locate the Leaf switch port corresponding to the hardware access of the virtual machine through the Leaf switch like hardware SDN.

[0053] Leaf switches are key nodes that connect to servers and other devices. Problems such as heavy port traffic, port failures, and Leaf switch failures or upgrades may often occur in the network. It is necessary to locate the virtual machine connected to the port in a timely manner to help identify hidden dangers and troubleshoot. The existing technology generally records the corresponding mapping table between the virtual machine and the switch port at the beginning of virtual machine creation. When encountering problems such as failures, the mapping table is manually searched to traverse the mappings in the table one by one until the corresponding port mapping relationship is found, which can correspond to the virtual machine information connected to the port. This method requires manual operation, and it is difficult to locate and troubleshoot the virtual machine in a timely manner when a failure occurs. At the same time, when the virtual machine is migrated or the network topology undergoes other dynamic changes, the mapping table needs to be manually maintained in a timely manner, which cannot meet the needs of modern operation and maintenance.

[0054] This embodiment relates to a specific method for locating a virtual machine based on a software SDN architecture.

[0055] like Figure 2 As shown in the figure, the system of virtual machines based on software SDN architecture includes Leaf switches, servers, cloud platforms, and automation platforms. The many ports of Leaf switches can be connected to multiple servers, and corresponding virtual machines are deployed on the servers. In the actual network architecture, Leaf switches can also be connected to Spine switches and other Leaf switches. The automation platform can log in to the Leaf switch through the SNMP protocol to achieve remote control of the switch. The cloud platform achieves centralized, automated, and intelligent management of computing resources by managing server resources. At the same time, the automation platform can access the resources of the cloud platform and query the relevant information of the server recorded in the cloud platform.

[0056] In the software SDN architecture, Leaf switches only forward data and are not aware of the application layer and virtual machine information. However, by obtaining the server information connected to the switch port and then understanding the deployed virtual machine information through the server, the virtual machine directly connected to the Leaf switch port can be located. In this process, querying the related devices connected to the switch port is the first step. In order to achieve this function, it is necessary to use the Link Layer Discovery Protocol (LLDP) of the data link layer to learn the name of the opposite device connected to a port, such as Figure 3 The specific method for locating a virtual machine based on the software SDN architecture shown includes the following contents:

[0057] In the data link layer, the Link Layer Discovery Protocol is a Layer 2 protocol defined in IEEE 802.1ab, which enables network devices (such as switches) to transmit LLDP packets (Link Layer Discovery Protocol Data Unit) within the local area network to announce their own status details to other devices, including device identity, interface number, management IP and other information. This practice promotes the discovery of the physical layout of network devices and the acquisition of their management configuration information. Based on this, the Leaf switch exchanges LLDP packets with the port device through the Link Layer Discovery Protocol, and through the packets, the device name information connected to the port can be learned. The automation platform can first log in to the corresponding Leaf switch, view the LLDP device name learned by the Leaf switch port, and obtain the device name information connected to all ports.

[0058] In the actual network architecture, Leaf switches are not only connected to servers. Due to the hierarchical architecture and redundancy of the network, Leaf switches are also connected to Spine switches and other Leaf switches. Therefore, the LLDP device name learned by the port of the Leaf switch may be the Spine switch name, other Leaf switch names, or server names. The first two do not deploy virtual machines. In order to locate the virtual machine, you need to select the server name from all the learned device names.

[0059] In the network architecture, the cloud platform provides a series of services such as virtual machine creation, management, monitoring, backup, and recovery. In the process of creating a virtual machine, the cloud platform will select the server to which the virtual machine is sent according to a specific policy, so it will record the name information of all servers where the virtual machine is deployed. Based on this, the automation platform can query the LLDP device name learned by the switch on the cloud platform by calling the cloud platform interface. If the server information cannot be queried, the Leaf switch port is not connected to a server device, and the next Leaf switch port is skipped directly. After an automatic traversal, the automation platform can echo the corresponding information between the port and all directly connected server devices.

[0060] After the automation module platform queries the server information on the cloud platform according to the LLDP device name, it can successfully select the server name in the device, but the virtual machine information is still unknown. In order to centrally manage computing resources, the cloud platform will also save the correspondence between the server and the virtual machine it carries when selecting the server to which the virtual machine is sent. Based on this, the automation platform can further access the cloud platform to obtain the virtual machine information carried on the server stored by the cloud platform, and combine the previously obtained connection relationship between the Leaf switch port and the server to finally establish a mapping relationship between the Leaf switch port and the virtual machine, thereby locating the virtual machine.

[0061] This embodiment can be applied not only in the software SDN architecture, but also in the hardware SDN architecture. It is a solution that can cover switches from all manufacturers. In the event of an alarm or failure, it automatically and timely obtains the virtual machine information connected to the Leaf switch port, which completely solves the problem of quickly locating the virtual machine associated with the Leaf switch port under the software SDN architecture. Remote login based on the automation platform can dynamically obtain the port information of the Leaf switch at any time. Combined with the access query to the cloud platform, the virtual machine connected to the port can be located in time. The whole process is efficient, timely, and can be realized automatically. It does not require manual regular maintenance. It can completely solve the problem of locating virtual machines in scenarios such as Leaf switch failure or Leaf switch port failure, and effectively help risk control and troubleshooting.

[0062] The embodiment of the present application also provides an automation platform. It should be noted that the automation platform of the embodiment of the present application can be used to execute the positioning method for a virtual machine based on a software SDN architecture provided by the embodiment of the present application. The automation platform is used to implement the above-mentioned embodiments and preferred implementation modes, and those that have been described will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the automation platform described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0063] The following is an introduction to the automation platform provided in the embodiments of the present application.

[0064] Figure 4 Schematic diagram of an automation platform according to an embodiment of the present application. Figure 4 As shown, the automation platform includes:

[0065] An acquisition unit 41 is used to acquire LLDP information of a Leaf switch using an LLDP protocol, wherein the LLDP information includes name information of a Leaf switch port and a connected device;

[0066] A traversal unit 42 is used to traverse the Leaf switch port according to the LLDP information, obtain the LLDP device name according to the Leaf switch port, and determine the device name information connected to the Leaf switch port according to the LLDP device name;

[0067] A query unit 43 is used to call a cloud platform interface to query server information according to the LLDP device name, wherein the server information includes virtual machine information;

[0068] The first positioning unit 44 is used to obtain the correspondence between the Leaf switch port and the virtual machine according to the server information and the device name information, and locate the virtual machine according to the correspondence.

[0069] In this embodiment, the acquisition unit is used to acquire the LLDP information of the Leaf switch using the LLDP protocol, wherein the LLDP information includes the name information of the Leaf switch port and the connected device; the traversal unit is used to traverse the Leaf switch port according to the LLDP information, acquire the LLDP device name according to the Leaf switch port, and determine the device name information connected to the Leaf switch port according to the LLDP device name; the query unit is used to call the cloud platform interface to query the server information according to the LLDP device name, wherein the server information includes the virtual machine information; the first positioning unit is used to acquire the correspondence between the Leaf switch port and the virtual machine according to the server information and the device name information, and locate the virtual machine according to the correspondence. By dynamically acquiring the port information of the Leaf switch at any time, combined with the access query to the cloud platform, the virtual machine connected to the port can be located in time. The whole process is efficient, timely, and can be realized automatically, without the need for manual regular maintenance. It can completely solve the problem of locating the virtual machine in scenarios such as Leaf switch failure or Leaf switch port failure, and effectively help risk control and troubleshooting.

[0070] As an optional solution, the device also includes a first acquisition unit, a first determination unit and a second determination unit; the first acquisition unit is used to obtain a server list after obtaining the LLDP device name according to the Leaf switch port, wherein the server list includes multiple server names; the first determination unit is used to determine whether the LLDP device name contains the server name in the server list; the second determination unit is used to determine the device name information connected to the Leaf switch port according to the server name in the LLDP device name when it is determined that the LLDP device name contains the server name.

[0071] An optional solution, the device also includes a third determination unit and a fourth determination unit, the third determination unit is used to determine whether the server information is queried by calling the cloud platform interface according to the LLDP device name before calling the cloud platform interface to query the server information according to the LLDP device name; the fourth determination unit is used to indicate that the Leaf switch port is not connected to the server and directly traverse the next Leaf switch port when it is determined that the server information is not queried.

[0072] In an optional solution, the device also includes a fifth determination unit and a first generation unit, wherein the fifth determination unit determines whether all Leaf switch ports of the Leaf switch are traversed after directly traversing the next Leaf switch port; the first generation unit is used to generate a connection table of the Leaf switch ports of the Leaf switch when all Leaf switch ports of the Leaf switch are traversed, wherein the connection table is a connection relationship table of the Leaf switch ports of the Leaf switch.

[0073] In an optional solution, the device also includes a second positioning unit, which is used to locate the faulty virtual machine according to the corresponding relationship after obtaining the correspondence between the Leaf switch port and the virtual machine based on the server information and the device name information and receiving the fault alarm information of the virtual machine.

[0074] In an optional solution, the device further includes a second generating unit, which is used to generate prompt information after locating the faulty virtual machine according to the corresponding relationship, wherein the prompt information is used to prompt to perform inspection and maintenance processing on the faulty virtual machine.

[0075] The automation platform includes a processor and a memory. The acquisition unit, query unit, first positioning unit, etc. are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions. The modules are all located in the same processor; or, the modules are located in different processors in any combination.

[0076] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the problem that the existing technology cannot quickly locate the virtual machine associated with the Leaf switch port is solved by adjusting the kernel parameters.

[0077] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0078] An embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for locating a virtual machine based on a software SDN architecture.

[0079] Specifically, the method for locating a virtual machine based on the software SDN architecture includes:

[0080] Step S201, using the LLDP protocol to obtain LLDP information of the Leaf switch, wherein the LLDP information includes name information of the Leaf switch port and the connected device;

[0081] Step S202, traversing the Leaf switch ports according to the LLDP information, obtaining the LLDP device name according to the Leaf switch port, and determining the device name information connected to the Leaf switch port according to the LLDP device name;

[0082] Step S203, calling the cloud platform interface to query server information according to the LLDP device name, wherein the server information includes virtual machine information;

[0083] Step S204: According to the server information and the device name information, the correspondence between the Leaf switch port and the virtual machine is obtained, and the virtual machine is located according to the correspondence.

[0084] An embodiment of the present invention provides a processor, which is used to run a program, wherein the program executes the method for locating a virtual machine based on a software SDN architecture when running.

[0085] Specifically, the method for locating a virtual machine based on the software SDN architecture includes:

[0086] Step S201, using the LLDP protocol to obtain LLDP information of the Leaf switch, wherein the LLDP information includes name information of the Leaf switch port and the connected device;

[0087] Step S202, traversing the Leaf switch ports according to the LLDP information, obtaining the LLDP device name according to the Leaf switch port, and determining the device name information connected to the Leaf switch port according to the LLDP device name;

[0088] Step S203, calling the cloud platform interface to query server information according to the LLDP device name, wherein the server information includes virtual machine information;

[0089] Step S204: According to the server information and the device name information, the correspondence between the Leaf switch port and the virtual machine is obtained, and the virtual machine is located according to the correspondence.

[0090] An embodiment of the present invention provides an electronic device, the device comprising a processor, a memory, and a program stored in the memory and executable on the processor, and when the processor executes the program, at least the following steps are implemented:

[0091] Step S201, using the LLDP protocol to obtain LLDP information of the Leaf switch, wherein the LLDP information includes name information of the Leaf switch port and the connected device;

[0092] Step S202, traversing the Leaf switch ports according to the LLDP information, obtaining the LLDP device name according to the Leaf switch port, and determining the device name information connected to the Leaf switch port according to the LLDP device name;

[0093] Step S203, calling the cloud platform interface to query server information according to the LLDP device name, wherein the server information includes virtual machine information;

[0094] Step S204: According to the server information and the device name information, the correspondence between the Leaf switch port and the virtual machine is obtained, and the virtual machine is located according to the correspondence.

[0095] The devices in this article can be servers, PCs, PADs, mobile phones, etc.

[0096] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing at least the following method steps:

[0097] Step S201, using the LLDP protocol to obtain LLDP information of the Leaf switch, wherein the LLDP information includes name information of the Leaf switch port and the connected device;

[0098] Step S202, traversing the Leaf switch ports according to the LLDP information, obtaining the LLDP device name according to the Leaf switch port, and determining the device name information connected to the Leaf switch port according to the LLDP device name;

[0099] Step S203, calling the cloud platform interface to query server information according to the LLDP device name, wherein the server information includes virtual machine information;

[0100] Step S204: According to the server information and the device name information, the correspondence between the Leaf switch port and the virtual machine is obtained, and the virtual machine is located according to the correspondence.

[0101] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0102] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0103] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes 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 instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0104] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0105] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0106] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0107] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0108] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0109] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0110] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:

[0111] The present application discloses a method for locating a virtual machine based on a software SDN architecture, including: using the LLDP protocol to obtain the LLDP information of a Leaf switch, wherein the LLDP information includes the name information of the Leaf switch port and the connected device; traversing the Leaf switch port according to the LLDP information, obtaining the LLDP device name according to the Leaf switch port, and determining the device name information connected to the Leaf switch port according to the LLDP device name; calling a cloud platform interface to query server information according to the LLDP device name, wherein the server information includes virtual machine information; obtaining the correspondence between the Leaf switch port and the virtual machine according to the server information and the device name information, and locating the virtual machine according to the correspondence. By dynamically obtaining the port information of the Leaf switch at any time, combined with the access query to the cloud platform, the virtual machine connected to the port can be located in time. The whole process is efficient, timely, and can be realized automatically, without the need for manual regular maintenance. It can completely solve the problem of locating virtual machines in scenarios such as Leaf switch failure or Leaf switch port failure, and effectively help risk control and troubleshooting.

[0112] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for locating a virtual machine based on a software SDN architecture, characterized in that: include: The LLDP protocol is used to obtain the LLDP information of the Leaf switch, wherein the LLDP information includes the name information of the Leaf switch port and the connected device; Traversing the Leaf switch port according to the LLDP information, obtaining the LLDP device name according to the Leaf switch port, and determining the device name information connected to the Leaf switch port according to the LLDP device name; Calling a cloud platform interface to query server information according to the LLDP device name, wherein the server information includes virtual machine information; The correspondence between the Leaf switch port and the virtual machine is obtained according to the server information and the device name information, and the virtual machine is located according to the correspondence.

2. The method according to claim 1, characterized in that After acquiring the LLDP device name according to the Leaf switch port, the method further includes: Obtaining a server list, wherein the server list includes multiple server names; Determine whether the LLDP device name includes the server name in the server list; When it is determined that the LLDP device name includes the server name, the device name information connected to the Leaf switch port is determined according to the server name in the LLDP device name.

3. The method according to claim 1, characterized in that Before calling the cloud platform interface to query server information according to the LLDP device name, the method further includes: Determine whether calling the cloud platform interface to query the server information according to the LLDP device name; When it is determined that the server information is not found, it indicates that the Leaf switch port is not connected to the server, and the next Leaf switch port is directly traversed.

4. The method according to claim 1, characterized in that After directly traversing the next Leaf switch port, the method further includes: Determine whether all the Leaf switch ports of the Leaf switch are traversed; When all the Leaf switch ports of the Leaf switch are traversed, a connection table of the Leaf switch ports of the Leaf switch is generated, wherein the connection table is a connection relationship table of the Leaf switch ports of the Leaf switch.

5. The method according to claim 1, characterized in that After obtaining the correspondence between the Leaf switch port and the virtual machine according to the server information and the device name information, the method further includes: When the fault alarm information of the virtual machine is received, the faulty virtual machine is located according to the corresponding relationship.

6. The method according to claim 5, characterized in that After locating the faulty virtual machine according to the corresponding relationship, the method further includes: Prompt information is generated, where the prompt information is used to prompt an inspection and maintenance process to be performed on the faulty virtual machine.

7. A virtual machine positioning system based on software SDN architecture, characterized in that: include: An automation platform, the automation platform being used to execute the method for locating a virtual machine based on a software SDN architecture as described in any one of claims 1 to 6; Leaf switch, which is connected to the server, spine switch and other Leaf switches through the Leaf switch port, and is used for data forwarding; A cloud platform that provides virtual machine creation, management, monitoring, backup, and recovery services; The server, the virtual machine is deployed in the server, and the server carries the virtual machine information.

8. An automated platform, characterized in that: include: An acquiring unit, configured to acquire LLDP information of a Leaf switch using an LLDP protocol, wherein the LLDP information includes name information of a Leaf switch port and a connected device; A traversal unit, configured to traverse the Leaf switch port according to the LLDP information, obtain the LLDP device name according to the Leaf switch port, and determine the device name information connected to the Leaf switch port according to the LLDP device name; A query unit, configured to call a cloud platform interface to query server information according to the LLDP device name, wherein the server information includes virtual machine information; The first positioning unit is used to obtain the correspondence between the Leaf switch port and the virtual machine according to the server information and the device name information, and locate the virtual machine according to the correspondence.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for locating a virtual machine based on a software SDN architecture as described in any one of claims 1 to 6.

10. An electronic device, characterized in that: include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for executing a positioning method of a virtual machine based on a software SDN architecture as described in any one of claims 1 to 6.