Host discovery method, device and equipment and readable storage medium

By obtaining the host's BMC IP address and account, setting the host to PXE startup, monitoring the DHCP server's appointment file, and automatically determining the host's network card physical address and IP address, solving the problem of cloud computing platform's workload when deploying host nodes , improves efficiency.

CN118945048APending Publication Date: 2024-11-12WUHAN FIBERHOME INFORMATION INTEGRATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411167802.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

When deploying and adding host nodes, cloud computing platforms need to manually confirm the physical address of the PXE network card, resulting in large workload, cumbersome and inefficient.

Method used

By obtaining the BMC IP address, account number and password of the host to be discovered, setting the host to PXE startup, and monitoring the DHCP server's appointment file update, matching the network card physical address and IP address, thereby automatically determining the host's PXE network card physical address and IP address. Avoid artificially configuring switches.

Benefits of technology

It realizes automation and rapid host discovery, reduces the tedious workload of configuring switches, and improves the efficiency of adding host nodes on cloud computing platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118945048A_ABST
    Figure CN118945048A_ABST
Patent Text Reader

Abstract

The invention discloses a host discovery method, apparatus and device, and a readable storage medium. The host discovery method comprises the steps of obtaining a host discovery request; the BMC IP address, the account number and the password of the host to be discovered are used, and the host to be discovered is set to be PXE starting and restarting; monitoring and acquiring one or more data records updated by a concluded file of the DHCP server; obtaining physical addresses of all network cards of the to-be-discovered host; and for each data record, if the PXE network card physical address of the data record exists in the physical addresses of all network cards of the to-be-discovered host, taking the PXE network card physical address and the PXE IP address of the data record as the PXE network card physical address and the PXE IP address of the to-be-discovered host. Through the method, host discovery can be automatically and quickly completed, and the discovery and addition efficiency of the host nodes of the cloud computing platform can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing information technology, and in particular to a host discovery method, device, equipment and readable storage medium. Background Art

[0002] With the continuous development of cloud computing technology, cloud computing platforms are becoming more and more popular. Many government departments and enterprises have deployed their businesses on cloud computing platforms to improve office efficiency, save costs, and facilitate management and operation and maintenance. For cloud computing platform vendors, efficiency issues such as cloud computing project deployment, capacity expansion, and node reinstallation are becoming increasingly important.

[0003] At present, when cloud computing platforms deploy and add host nodes, they need to fill in the physical address of the PXE (Pre-boot Execution Environment, a protocol designed by Intel that allows computers to start over the network) network card of the added host. However, cloud computing platforms cannot directly identify the physical address of the PXE network card and need to be manually confirmed through switches, which results in a lot of preparation work required to add host nodes. In addition, the common host discovery methods in the industry all rely on configuring switches to interact with switches, but configuring switches requires a lot of preparation work.

[0004] In summary, the current cloud computing platform has problems such as heavy workload, cumbersome work and low efficiency when deploying and adding host nodes. Summary of the invention

[0005] The present application provides a host discovery method, apparatus, device and readable storage medium, aiming to solve the technical problems of large workload, cumbersome work and low efficiency when deploying and adding host nodes on the current cloud computing platform.

[0006] In a first aspect, an embodiment of the present application provides a host discovery method, the host discovery method comprising:

[0007] Obtain a host discovery request, wherein the host discovery request includes a BMC IP address, account number, and password of the host to be discovered;

[0008] Use the BMC IP address, account, and password of the host to be discovered to set the host to PXE startup and restart it, so that the host to be discovered can request the DHCP server to allocate a PXE IP address when it restarts.

[0009] Monitor and obtain one or more data records of appointment file updates of the DHCP server, wherein each data record includes a PXE network card physical address and a PXE IP address;

[0010] Get the physical addresses of all network cards of the host to be discovered;

[0011] For each data record, if the PXE network card physical address of the data record exists in the physical addresses of all network cards of the host to be discovered, the PXE network card physical address and PXE IP address of the data record are used as the PXE network card physical address and PXE IP address of the host to be discovered.

[0012] Optionally, using the BMC IP address, account number and password of the host to be discovered to set the host to be discovered to PXE boot and restart includes:

[0013] Use the BMC IP address, account number and password of the host to be discovered to establish a connection with the host to be discovered;

[0014] Send a command to the host to be discovered, set the host to be discovered to PXE boot and restart.

[0015] Optionally, each data record in the agreement file of the DHCP server is updated as follows: after receiving the PXE IP address allocation request sent by the host, the DHCP server identifies the PXE network card of the host and obtains the physical address of the PXE network card, allocates a PXE IP address to the PXE network card, and stores the PXE network card physical address and the PXE IP address as a data record in the agreement file.

[0016] Optionally, after the PXE network card physical address and the PXE IP address of the data record are used as the PXE network card physical address and the PXE IP address of the host to be discovered, the method further includes:

[0017] The PXE network card physical address, PXE IP address, BMC IP address, account number and password of the host to be discovered are saved to the database, so as to facilitate the subsequent installation of the operating system for the host to be discovered based on the PXE network card physical address, PXE IP address, BMC IP address, account number and password of the host to be discovered.

[0018] Optionally, after the PXE network card physical address, PXE IP address, BMC IP address, account number and password of the host to be discovered are saved in the database, the following steps are included:

[0019] Outputs a prompt indicating that the discovery of the host to be discovered is complete.

[0020] In a second aspect, an embodiment of the present application provides a host discovery device, the host discovery device comprising:

[0021] A first acquisition module is used to acquire a host discovery request, wherein the host discovery request includes a BMC IP address, an account number and a password of a host to be discovered;

[0022] The restart setting module is used to use the BMC IP address, account and password of the host to be discovered to set the host to be discovered to PXE startup and restart, so that the host to be discovered can request the DHCP server to allocate a PXE IP address when restarting;

[0023] A monitoring and obtaining module, used for monitoring and obtaining one or more data records of the appointment file update of the DHCP server, wherein each data record includes the PXE network card physical address and the PXE IP address;

[0024] The second acquisition module is used to obtain the physical addresses of all network cards of the host to be discovered;

[0025] The matching determination module is used for, for each data record, if the PXE network card physical address of the data record exists in the physical addresses of all network cards of the host to be discovered, then the PXE network card physical address and PXE IP address of the data record are used as the PXE network card physical address and PXE IP address of the host to be discovered.

[0026] Optionally, the restart setting module is used to:

[0027] Use the BMC IP address, account number and password of the host to be discovered to establish a connection with the host to be discovered;

[0028] Send a command to the host to be discovered, set the host to be discovered to PXE boot and restart.

[0029] Optionally, each data record in the agreement file of the DHCP server is updated as follows: after receiving the PXE IP address allocation request sent by the host, the DHCP server identifies the PXE network card of the host and obtains the physical address of the PXE network card, allocates a PXE IP address to the PXE network card, and stores the PXE network card physical address and the PXE IP address as a data record in the agreement file.

[0030] In a third aspect, an embodiment of the present application provides a host discovery device, which includes a processor, a memory, and a host discovery program stored in the memory and executable by the processor, wherein when the host discovery program is executed by the processor, the steps of the host discovery method described above are implemented.

[0031] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a host discovery program is stored, wherein when the host discovery program is executed by a processor, the steps of the host discovery method as described above are implemented.

[0032] The beneficial effects brought by the technical solution provided in the embodiments of the present application include:

[0033] In an embodiment of the present application, a host discovery request is obtained, wherein the host discovery request includes a BMC IP address, an account number, and a password of a host to be discovered; the host to be discovered is set to PXE startup and restart using the BMC IP address, an account number, and a password of the host to be discovered, so that the host to be discovered requests a PXE IP address from a DHCP server when it restarts; one or more data records of appointment file updates of a DHCP server are monitored and obtained, wherein each data record includes a PXE network card physical address and a PXE IP address; the physical addresses of all network cards of the host to be discovered are obtained; for each data record, if the PXE network card physical address of the data record exists in the physical addresses of all network cards of the host to be discovered, the PXE network card physical address and the PXE IP address of the data record are used as the PXE network card physical address and the PXE IP address of the host to be discovered. The embodiment of the present application monitors and obtains one or more data records of the appointment file update of the DHCP server, and compares and matches the PXE network card physical address of each data record with the physical addresses of all network cards of the host to be discovered, so as to determine the PXE network card physical address and PXE IP address of the host to be discovered, so as to automatically and quickly complete the host discovery, and the PXE network card physical address and PXE IP address of the host to be discovered can be determined without manual confirmation through the switch, thereby avoiding the tedious workload of configuring the switch, thereby improving the discovery and addition efficiency of the host nodes of the cloud computing platform. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 This is a flow chart of an embodiment of a host discovery method of the present application;

[0035] Figure 2 For this application Figure 1 Detailed flow chart of step S20;

[0036] Figure 3 Another flowchart of an embodiment of the host discovery method of the present application is shown;

[0037] Figure 4 This is a functional module diagram of an embodiment of a host discovery device of the present application;

[0038] Figure 5 The figure is a schematic diagram of the hardware structure of the host discovery device involved in the embodiment of the present application. DETAILED DESCRIPTION

[0039] 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 are within the scope of protection of this application.

[0040] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0041] In a first aspect, an embodiment of the present application provides a host discovery method.

[0042] In one embodiment, referring to Figure 1 , Figure 1 This is a flow chart of an embodiment of the host discovery method of the present application. Figure 1 As shown, the host discovery method includes:

[0043] Step S10, obtaining a host discovery request, wherein the host discovery request includes a BMC IP address, an account number, and a password of a host to be discovered.

[0044] In this embodiment, the execution subject may be a functional module of the cloud computing platform or an independent functional module independent of the cloud computing platform. The functional module may be referred to as a deployment service, that is, the deployment service obtains a host discovery request, wherein the host discovery request may be issued by a user through an IPMI management interface, wherein IPMI is the abbreviation of an Intelligent Platform Management Interface, and a user may use IPMI to monitor the physical health characteristics of a server (such as a host to be discovered), such as temperature, voltage, fan working status, and power supply status, etc. The core of IPMI is a dedicated chip / controller (called a server processor or baseboard management controller (i.e., BMC)). When working, all IPMI functions are completed by sending commands to the BMC. The BMC IP of the host to be discovered refers to the IP address of the baseboard management controller (BMC) of the server (such as the host to be discovered). The BMC is a management controller independent of the server operating system, which is responsible for monitoring and managing the hardware resources of the server, including temperature sensors, fan speeds, and power supply status, etc. The BMC also provides a remote management function, which can remotely access the server through the network to perform some management tasks, such as restarting the server and monitoring the hardware status, etc.

[0045] Step S20, using the BMC IP address, account and password of the host to be discovered, setting the host to be discovered to PXE boot and restart, so that the host to be discovered can request the DHCP server to allocate a PXE IP address when restarting.

[0046] In this embodiment, the BMC IP address, account number and password of the host to be discovered are used to send a BMC instruction to the host to be discovered, set the host to be discovered to PXE startup and restart, so that the host to be discovered sends a request to the DHCP server when it restarts, requesting the DHCP server to assign a PXE IP address to it.

[0047] Step S30, monitoring and acquiring one or more data records of the appointment file update of the DHCP server, wherein each data record includes the PXE network card physical address and the PXE IP address.

[0048] In this embodiment, the DHCP server serves multiple hosts and allocates PXE IP addresses to them based on the requests of each host. When allocating a PXE IP address to each host, for each host, in the agreement file of the DHCP server, a piece of data is used to record the PXE network card physical address and PXE IP address of the host. By monitoring the changes and updates of the agreement file of the DHCP server, the updated PXE network card physical address and PXE IP address can be obtained.

[0049] Step S40, obtaining the physical addresses of all network cards of the host to be discovered.

[0050] In this embodiment, the host to be discovered may have multiple network cards, and the physical addresses of all network cards of the host to be discovered are obtained by sending a BMC instruction to the host to be discovered.

[0051] Step S50, for each data record, if the PXE network card physical address of the data record exists in the physical addresses of all network cards of the host to be discovered, the PXE network card physical address and PXE IP address of the data record are used as the PXE network card physical address and PXE IP address of the host to be discovered.

[0052] In this embodiment, in step S30, the PXE network card physical address and PXE IP address of each host recorded in the DHCP server agreement file are obtained. Since the DHCP server serves multiple hosts, a PXE IP address is assigned to each host and a piece of data is used to record the PXE network card physical address and PXE IP address of each host. However, for the deployment service, after obtaining the PXE network card physical address and PXE IP address of multiple data records, it is impossible to determine which data record is the PXE network card physical address and PXE IP address of the host to be discovered. Further, in step S40, the physical addresses of all network cards of the host to be discovered are obtained. It should be noted that the host to be discovered may have multiple network cards, at least one of which supports the PXE function. The DHCP server assigns a PXE to a network card that supports the PXE function. The IP address is recorded, and the physical address of the network card that supports the PXE function, that is, the physical address of the PXE network card. Therefore, the two are matched. If the physical address of the PXE network card of a data record exists in the physical addresses of all network cards of the host to be discovered, it means that the data record belongs to the host to be discovered. Therefore, the PXE network card physical address and the PXE IP address of the host to be discovered are determined by matching, so that the host discovery can be completed automatically and quickly, and the PXE network card physical address and the PXE IP address of the host to be discovered can be determined without manual confirmation through the switch, avoiding the tedious workload of configuring the switch, thereby improving the efficiency of discovering and adding host nodes of the cloud computing platform.

[0053] In this embodiment, the execution subject can be a functional module of the cloud computing platform or an independent functional module independent of the cloud computing platform. The functional module can be called a deployment service, that is, the deployment service obtains a host discovery request, wherein the host discovery request can be issued by the user through the IPMI management interface, and the BMC IP address, account and password of the host to be discovered are used to send a BMC instruction to the host to be discovered, set the host to be discovered to PXE startup and restart, and the host to be discovered sends a request to the DHCP server when restarting, requesting the DHCP server to allocate a PXE IP address to it, monitor and obtain the PXE network card physical address and PXE IP address of each host recorded in the DHCP server agreement file, and send a BMC instruction to the host to be discovered to obtain the physical addresses of all network cards of the host to be discovered, and match the two. If the PXE network card physical address of a data record exists in the physical addresses of all network cards of the host to be discovered, it means that the data record belongs to the host to be discovered, thereby determining the PXE network card physical address and PXE of the host to be discovered through matching. IP address, so that host discovery can be completed automatically and quickly, without manual confirmation through the switch to determine the PXE network card physical address and PXE IP address of the host to be discovered, avoiding the tedious workload of configuring the switch, thereby improving the efficiency of discovering and adding host nodes on the cloud computing platform.

[0054] Further, in one embodiment, referring to Figure 2 , Figure 2 For this application Figure 1 The detailed flow chart of step S20 is as follows: Figure 2 As shown, step S20 includes:

[0055] Step S201, establishing a connection with the host to be discovered using the BMC IP address, account number and password of the host to be discovered;

[0056] Step S202: Send an instruction to the host to be discovered, set the host to be discovered to PXE boot and restart.

[0057] In this embodiment, as mentioned above, the core of IPMI is a dedicated chip / controller (called a server processor or baseboard management controller (i.e., BMC)). When working, all IPMI functions are completed by sending commands to the BMC. The BMC IP of the host to be discovered refers to the IP address of the baseboard management controller (Baseboard Management Controller, referred to as BMC) of the server (such as the host to be discovered). BMC is a management controller independent of the server operating system. It is responsible for monitoring and managing the hardware resources of the server, including temperature sensors, fan speeds, and power supply status. BMC also provides remote management functions, which can remotely access the server through the network to perform some management tasks, such as restarting the server and monitoring the hardware status. Based on IPMI, the BMC IP address, account number, and password of the host to be discovered are used to establish a connection with the host to be discovered. By sending BMC instructions to the host to be discovered, the host to be discovered is set to PXE boot and restart.

[0058] Furthermore, in one embodiment, each data record in the appointment file of the DHCP server is updated as follows: after receiving the PXE IP address allocation request sent by the host, the DHCP server identifies the PXE network card of the host and obtains the physical address of the PXE network card, allocates a PXE IP address to the PXE network card, and stores the PXE network card physical address and the PXE IP address as a data record in the appointment file.

[0059] In this embodiment, the DHCP server serves multiple hosts, including a host to be discovered, and allocates a PXE IP address to each host based on a request from each host. Specifically, after receiving a PXE IP address allocation request sent by the host, the DHCP server identifies the PXE network card of the host and obtains the physical address of the PXE network card, allocates a PXE IP address to the PXE network card, and stores the PXE network card physical address and the PXE IP address as a data record in a contract file. It should be noted that PXE is a network boot technology developed by Intel Corporation, which works in Client / Server mode, allowing the client to download the boot image from the remote server through the network and load the installation file or the entire operating system. Its basic principle is: the necessary condition for PXE installation is that the computer to be installed contains a network card that supports PXE, that is, the network card must have a PXE Client. The PXE protocol enables the computer to start through the network. The protocol is divided into Client and Server. The PXE client exists in the ROM (Read-Only Memory) of the network card. When the computer boots, the BIOS (Basic Input Output System) calls the PXE client into the memory for execution, and the PXE client downloads the files placed on the remote end through the network to the local for execution.

[0060] Further, in one embodiment, referring to Figure 3 , Figure 3 Another flowchart of an embodiment of the host discovery method of the present application is shown in FIG. Figure 3 As shown, after step S50, the following steps are included:

[0061] Step S60, save the PXE network card physical address, PXE IP address, BMC IP address, account number and password of the host to be discovered to the database for subsequent installation of the operating system for the host to be discovered based on the PXE network card physical address, PXE IP address, BMC IP address, account number and password of the host to be discovered.

[0062] In this embodiment, after step S50 determines the PXE network card physical address and PXE IP address of the host to be discovered, plus the host discovery request obtained in step S10 includes the BMC IP address, account number and password of the host to be discovered, the PXE network card physical address, PXE IP address, BMC IP address, account number and password of the host to be discovered together constitute the most basic information for installing the operating system for the host to be discovered. The PXE network card physical address, PXE IP address, BMC IP address, account number and password of the host to be discovered are persisted and saved in the database so that this information can be called at any time to install the operating system for the host to be discovered.

[0063] Further, in one embodiment, after the PXE network card physical address, PXE IP address, BMC IP address, account number and password of the host to be discovered are saved in the database, the following steps are included:

[0064] Outputs a prompt indicating that the discovery of the host to be discovered is complete.

[0065] In this embodiment, the PXE network card physical address, PXE IP address, BMC IP address, account number and password of the host to be discovered together constitute the most basic information for installing the operating system for the host to be discovered. After this information is persistently saved in the database, the discovery task of the host to be discovered is completed, and a prompt indicating that the discovery of the host to be discovered is completed is output. This persistent information can be called later to install the operating system for the host to be discovered and perform other deployment tasks.

[0066] In a second aspect, an embodiment of the present application also provides a host discovery device.

[0067] In one embodiment, referring to Figure 4 , Figure 4 This is a functional module diagram of an embodiment of a host discovery device of the present application, such as Figure 4 As shown, the host discovery device includes:

[0068] A first acquisition module 10 is used to acquire a host discovery request, wherein the host discovery request includes a BMC IP address, an account number and a password of a host to be discovered;

[0069] The restart setting module 20 is used to use the BMC IP address, account number and password of the host to be discovered to set the host to be discovered to PXE startup and restart, so that the host to be discovered requests the DHCP server to allocate a PXE IP address when restarting;

[0070] A monitoring and obtaining module 30, for monitoring and obtaining one or more data records of appointment file updates of the DHCP server, wherein each data record includes a PXE network card physical address and a PXE IP address;

[0071] The second acquisition module 40 is used to acquire the physical addresses of all network cards of the host to be discovered;

[0072] The matching determination module 50 is used for, for each data record, if the PXE network card physical address of the data record exists in the physical addresses of all network cards of the host to be discovered, then the PXE network card physical address and PXE IP address of the data record are used as the PXE network card physical address and PXE IP address of the host to be discovered.

[0073] Further, in one embodiment, the restart setting module 20 is used to:

[0074] Use the BMC IP address, account number and password of the host to be discovered to establish a connection with the host to be discovered;

[0075] Send a command to the host to be discovered, set the host to be discovered to PXE boot and restart.

[0076] Furthermore, in one embodiment, each data record in the appointment file of the DHCP server is updated as follows: after receiving the PXE IP address allocation request sent by the host, the DHCP server identifies the PXE network card of the host and obtains the physical address of the PXE network card, allocates a PXE IP address to the PXE network card, and stores the PXE network card physical address and the PXE IP address as a data record in the appointment file.

[0077] Furthermore, in one embodiment, the host discovery device further includes a storage module, which is used to:

[0078] The PXE network card physical address, PXE IP address, BMC IP address, account number and password of the host to be discovered are saved to the database, so as to facilitate the subsequent installation of the operating system for the host to be discovered based on the PXE network card physical address, PXE IP address, BMC IP address, account number and password of the host to be discovered.

[0079] Furthermore, in one embodiment, the host discovery device further includes a prompt module, which is used to:

[0080] Outputs a prompt indicating that the discovery of the host to be discovered is complete.

[0081] Among them, the functional implementation of each module in the above-mentioned host discovery device corresponds to each step in the above-mentioned host discovery method embodiment, and its functions and implementation processes are no longer repeated here.

[0082] In a third aspect, an embodiment of the present application provides a host discovery device.

[0083] Reference Figure 5 , Figure 5Schematic diagram of the hardware structure of the host discovery device involved in the embodiment of the present application. In the embodiment of the present application, the host discovery device may include a processor, a memory, a communication interface and a communication bus.

[0084] The communication bus may be of any type and is used to interconnect the processor, the memory, and the communication interface.

[0085] The communication interface includes input / output (I / O) interface, physical interface and logical interface, etc., which are used to realize the interconnection of devices inside the host discovery device, and the interface used to realize the interconnection between the host discovery device and other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, a fiber optic interface, an ATM interface, etc.; the user device can be a display, a keyboard, etc.

[0086] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.

[0087] The processor may be a general-purpose processor, and the general-purpose processor may call the host discovery program stored in the memory and execute the host discovery method provided in the embodiment of the present application. For example, the general-purpose processor may be a central processing unit (CPU). The method executed when the host discovery program is called may refer to the various embodiments of the host discovery method of the present application, and will not be repeated here.

[0088] Those skilled in the art will understand that Figure 5 The hardware structure shown in the figure does not constitute a limitation on the present application, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0089] In a fourth aspect, an embodiment of the present application also provides a readable storage medium.

[0090] The readable storage medium of the present application stores a host discovery program, wherein when the host discovery program is executed by a processor, the steps of the host discovery method as described above are implemented.

[0091] Among them, the method implemented when the host discovery program is executed can refer to the various embodiments of the host discovery method of the present application, and will not be repeated here.

[0092] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.

[0093] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.

[0094] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.

[0095] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or. For example, A / B can mean A or B. The “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.

[0096] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.

[0097] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.

[0098] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A host discovery method, characterized in that: The host discovery method comprises: Obtain a host discovery request, wherein the host discovery request includes the BMC IP address, account number and password of the host to be discovered; Use the BMC IP address, account, and password of the host to be discovered to set the host to PXE boot and restart it, so that the host to be discovered can request the DHCP server to allocate a PXE IP address when it restarts. Monitor and obtain one or more data records of appointment file updates of the DHCP server, wherein each data record includes a PXE network card physical address and a PXE IP address; Get the physical addresses of all network cards of the host to be discovered; For each data record, if the PXE network card physical address of the data record exists in the physical addresses of all network cards of the host to be discovered, the PXE network card physical address and PXE IP address of the data record are used as the PXE network card physical address and PXE IP address of the host to be discovered.

2. The host discovery method according to claim 1, characterized in that: The method of using the BMC IP address, account number and password of the host to be discovered to set the host to be discovered to be PXE-enabled and restart includes: Use the BMC IP address, account number and password of the host to be discovered to establish a connection with the host to be discovered; Send a command to the host to be discovered, set the host to be discovered to PXE boot and restart.

3. The host discovery method according to claim 1, characterized in that: The update method of each data record in the agreement file of the DHCP server is as follows: after receiving the PXE IP address allocation request sent by the host, the DHCP server identifies the PXE network card of the host and obtains the physical address of the PXE network card, allocates a PXE IP address to the PXE network card, and stores the PXE network card physical address and the PXE IP address as a data record in the agreement file.

4. The host discovery method according to claim 1, characterized in that: After the PXE network card physical address and the PXE IP address recorded in the data are used as the PXE network card physical address and the PXE IP address of the host to be discovered, the method includes: The PXE network card physical address, PXE IP address, BMC IP address, account number and password of the host to be discovered are saved to the database for subsequent installation of the operating system for the host to be discovered based on the PXE network card physical address, PXE IP address, BMC IP address, account number and password of the host to be discovered.

5. The host discovery method according to claim 4, characterized in that: After the PXE network card physical address, PXE IP address, BMC IP address, account number and password of the host to be discovered are saved in the database, the following steps are included: Outputs a prompt indicating that the discovery of the host to be discovered is complete.

6. A host discovery device, characterized in that: The host discovery device comprises: A first acquisition module is used to acquire a host discovery request, wherein the host discovery request includes a BMC IP address, an account number and a password of a host to be discovered; The restart setting module is used to use the BMC IP address, account and password of the host to be discovered to set the host to be discovered to PXE startup and restart, so that the host to be discovered can request the DHCP server to allocate a PXE IP address when restarting; A monitoring and obtaining module, used for monitoring and obtaining one or more data records of the appointment file update of the DHCP server, wherein each data record includes the PXE network card physical address and the PXE IP address; The second acquisition module is used to obtain the physical addresses of all network cards of the host to be discovered; The matching determination module is used for, for each data record, if the PXE network card physical address of the data record exists in the physical addresses of all network cards of the host to be discovered, then the PXE network card physical address and PXE IP address of the data record are used as the PXE network card physical address and PXE IP address of the host to be discovered.

7. The host discovery device according to claim 6, characterized in that: The restart setting module is used to: Use the BMC IP address, account number and password of the host to be discovered to establish a connection with the host to be discovered; Send a command to the host to be discovered, set the host to be discovered to PXE boot and restart.

8. The host discovery device according to claim 6, characterized in that: The update method of each data record in the agreement file of the DHCP server is as follows: after receiving the PXE IP address allocation request sent by the host, the DHCP server identifies the PXE network card of the host and obtains the physical address of the PXE network card, allocates a PXE IP address to the PXE network card, and stores the PXE network card physical address and the PXE IP address as a data record in the agreement file.

9. A host discovery device, characterized in that: The host discovery device includes a processor, a memory, and a host discovery program stored in the memory and executable by the processor, wherein when the host discovery program is executed by the processor, the steps of the host discovery method according to any one of claims 1 to 5 are implemented.

10. A readable storage medium, characterized in that: The readable storage medium stores a host discovery program, wherein when the host discovery program is executed by a processor, the steps of the host discovery method according to any one of claims 1 to 5 are implemented.