Bare metal server starting method, device and equipment and readable storage medium

By starting the smart network interface initialization and listening for progress codes in parallel when the bare metal server is powered on, the problem of long startup time of bare metal servers is solved, and a fast and reliable startup process is achieved.

CN116860338BActive Publication Date: 2026-11-24YUSUR TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310755913.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-25
Publication Date
2026-11-24
Estimated Expiration
2043-06-25

AI Technical Summary

Technical Problem

In existing technologies, bare metal servers have long startup times, especially when the cloud management platform is notified to start after the smart network interface card (NIC) has finished initializing, resulting in low efficiency.

Method used

When the bare metal server is powered on, the smart network interface card (NIC) initialization process is started simultaneously. By listening to the initialization progress code of the smart NIC, multiple initialization stages are executed in a predetermined order. If the progress code meets the preset rules, the next stage is executed until the server starts.

Benefits of technology

By initializing the bare metal server and smart network interface card in parallel, startup efficiency was improved, and startup time was shortened while ensuring reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116860338B_ABST
    Figure CN116860338B_ABST
Patent Text Reader

Abstract

This disclosure relates to a method, apparatus, device, and readable storage medium for booting a bare metal server. The method includes: in response to powering on the bare metal server, initiating a bare metal server initialization process and simultaneously initiating a smart network interface card (NIC) initialization process. The smart NIC is communicatively connected to the bare metal server. The bare metal server initialization process includes multiple initialization stages executed in a predetermined order. When the bare metal server initialization process enters a preset stage among the multiple initialization stages, an initialization progress code of the smart NIC is obtained. The initialization progress code is used to characterize the execution status of the smart NIC initialization process. If the initialization progress code conforms to preset rules, the preset stage is executed. The next stage of the preset stage is then executed until the bare metal server initialization process is completed, thus completing the boot of the bare metal server. This disclosure ensures the efficiency and reliability of bare metal server booting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of cloud computing technology, and in particular to a method, apparatus, device and readable storage medium for booting a bare metal server. Background Technology

[0002] With the development of technologies such as cloud computing, virtualization, and cloud-native computing, bare metal is becoming increasingly important as a key application scenario for cloud computing.

[0003] A bare metal server is a physical server without an operating system or applications installed. Bare metal servers typically employ automated deployment technologies, enabling rapid deployment and management, significantly improving efficiency while reducing management costs and manpower.

[0004] As businesses expand, the demand for bare metal servers increases, leading to a significant manpower requirement for their installation and deployment. Therefore, bare metal servers need to be launched quickly and delivered within minutes. Existing technologies typically notify the cloud management platform after the smart network interface card (Data Processing Unit, DPU) is initialized, and the cloud management platform then issues a command to start the bare metal server, which takes a long time. Summary of the Invention

[0005] To address the aforementioned technical issues, this disclosure provides a bare metal server boot method, apparatus, device, and readable storage medium to ensure the efficiency and reliability of bare metal server boot.

[0006] In a first aspect, embodiments of this disclosure provide a bare-metal server boot method, including:

[0007] In response to the power-on of the bare metal server, the bare metal server initialization process is started, and the smart network interface card initialization process is started at the same time. The smart network interface card is communicatively connected to the bare metal server. The bare metal server initialization process includes multiple initialization stages executed in a predetermined order.

[0008] When the bare metal server initialization process enters a preset stage among the multiple initialization stages, the initialization progress code of the smart network card is obtained. The initialization progress code is used to characterize the execution status of the smart network card initialization process.

[0009] If the initialization progress code conforms to the preset rules, then the preset stage is executed;

[0010] Continue executing the next stage of the preset stage until the bare metal server initialization process is completed, thus completing the startup of the bare metal server.

[0011] In some embodiments, the step of executing the preset stage if the initialization progress code conforms to a preset rule includes:

[0012] Determine whether the initialization progress code belongs to the preset normal progress code range;

[0013] If the initialization progress code falls within the preset normal progress code range, then determine whether the initialization progress code is greater than or equal to the target progress code.

[0014] If the initialization progress code is greater than or equal to the target progress code, then it is determined that the smart network card has met the conditions for the bare metal server to execute the preset stage, and the preset stage is executed.

[0015] In some embodiments, after determining whether the initialization progress code belongs to a preset normal progress code range, the method further includes:

[0016] If the initialization progress code does not fall within the preset normal progress code range, an error message is generated and reported to the cloud management platform corresponding to the bare metal server.

[0017] In some embodiments, after determining whether the initialization progress code is greater than the target progress code if the initialization progress code belongs to a preset normal progress code range, the method further includes:

[0018] If the initialization progress code is less than the target progress code, the latest initialization progress code will be re-acquired and detected every preset period within a preset waiting time.

[0019] After a preset waiting time, if the latest initialization progress code is less than the target progress code or does not fall within the preset normal progress code range, an error message is generated and reported to the cloud management platform corresponding to the bare metal server.

[0020] In some embodiments, the step of re-acquiring the latest initialization progress code and performing detection every preset period within a preset waiting time includes:

[0021] Determine whether the latest initialization progress code falls within the preset normal progress code range;

[0022] If the latest initialization progress code falls within the preset normal progress code range, then determine whether the latest initialization progress code is greater than or equal to the target progress code.

[0023] In some embodiments, the preset stage is either the DXE stage or the BDS stage.

[0024] In some embodiments, obtaining the initialization progress code of the smart network interface card when the bare metal server initialization process enters a preset stage among the plurality of initialization stages includes:

[0025] When the bare metal server initialization process enters a preset stage among the multiple initialization stages, a progress code acquisition command is sent to the smart network card;

[0026] The system receives feedback information retrieved by the smart network card based on the progress code acquisition command, the feedback information including the initialization progress code.

[0027] Secondly, embodiments of this disclosure provide a bare metal server boot device, comprising:

[0028] A startup module is used to start the bare metal server initialization process and the smart network interface card initialization process in response to the power-on of the bare metal server. The smart network interface card is communicatively connected to the bare metal server. The bare metal server initialization process includes multiple initialization stages executed in a predetermined order.

[0029] The acquisition module is used to acquire the initialization progress code of the smart network card when the bare metal server initialization process enters a preset stage among the multiple initialization stages. The initialization progress code is used to characterize the execution status of the smart network card initialization process.

[0030] The first execution module is used to execute the preset stage if the initialization progress code conforms to the preset rules;

[0031] The second execution module is used to continue executing the next stage of the preset stage until the bare metal server initialization process is completed and the bare metal server is started.

[0032] Thirdly, embodiments of this disclosure provide an electronic device, including:

[0033] Memory;

[0034] Processor; and

[0035] Computer programs;

[0036] The computer program is stored in the memory and configured to be executed by the processor to implement the method as described in the first aspect.

[0037] Fourthly, embodiments of this disclosure provide a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the method described in the first aspect.

[0038] Fifthly, embodiments of this disclosure also provide a computer program product, which includes a computer program or instructions that, when executed by a processor, implement the bare metal server startup method described above.

[0039] The bare metal server startup method, apparatus, device, and readable storage medium provided in this disclosure initialize the smart network interface card (NIC) simultaneously with the bare metal server initialization. The server motherboard and the smart NIC start in parallel. At the same time, the initialization progress code of the smart NIC is listened to and corresponding operations are performed to realize the initialization information exchange between the bare metal server and the smart NIC. This saves the bare metal server startup time while ensuring the reliability of the bare metal server startup. Attached Figure Description

[0040] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0041] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0042] Figure 1 This is a flowchart of a bare metal server startup method provided in an embodiment of the present disclosure;

[0043] Figure 2 A schematic diagram illustrating an application scenario provided by an embodiment of this disclosure;

[0044] Figure 3 This is a schematic diagram illustrating communication between a bare metal server and a smart network interface card according to another embodiment of this disclosure;

[0045] Figure 4 This is a schematic diagram of full-duplex serial communication provided in an embodiment of this disclosure;

[0046] Figure 5 A flowchart of the DXE stage bare metal server workflow provided in another embodiment of this disclosure;

[0047] Figure 6 A flowchart of the bare metal server workflow in the BDS stage provided in another embodiment of this disclosure;

[0048] Figure 7 A flowchart of a bare metal server startup method provided in another embodiment of this disclosure;

[0049] Figure 8This is a schematic diagram of the structure of the bare metal server boot device provided in an embodiment of this disclosure;

[0050] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0051] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0052] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.

[0053] A bare metal server is a physical server without an operating system or applications installed. Compared to traditional virtualized servers, bare metal servers are closer to physical servers, but unlike physical servers, they can be remotely managed and automatically deployed. Bare metal servers typically employ automated deployment technologies, enabling rapid deployment and management, significantly improving efficiency while reducing management costs and manpower.

[0054] To deploy bare-metal compute nodes, a DPU card is essential. Under current technology, the hardware must first power on the DPU card and initialize it before notifying the cloud management platform. The cloud management platform then sends an Ipmi command to the BMC on the bare-metal node, and the BMC powers on the motherboard via a power button.

[0055] Cloud management platform control commands are issued in the form of network packets. When the network is unstable, it can cause bare metal server startup failures. Furthermore, existing startup methods include DPU card startup time and bare metal server startup time. Bare metal servers require initialization of physical CPUs, large amounts of memory (often exceeding 100GB), etc., during the boot process, resulting in long boot times.

[0056] To address this issue, this disclosure provides a method for booting a bare metal server, which will be described below with reference to specific embodiments.

[0057] Figure 1 This is a flowchart illustrating a bare metal server startup method provided in an embodiment of this disclosure. This method can be applied to... Figure 2The application scenario shown includes a bare metal server and a data processing unit (DPU). It is understood that the bare metal server startup method provided in this disclosure can also be applied to other scenarios.

[0058] The following is combined with Figure 2 The application scenarios shown are for Figure 1 The method for starting a bare metal server is described below, and the specific steps involved are as follows:

[0059] S101. In response to the power-on of the bare metal server, the bare metal server initialization process is started, and the smart network card initialization process is started at the same time. The smart network card is communicatively connected to the bare metal server. The bare metal server initialization process includes multiple initialization stages executed in a predetermined order.

[0060] The smart network interface card (NIC) communicates with the bare metal server, exchanging data via a serial port. After the bare metal server powers on, it starts its initialization process (Basic Input Output System, BIOS), and the smart NIC simultaneously powers on and starts its own initialization process. The BIOS is the computer's Basic Input Output System, the software that loads the operating system (OS) and configures the platform.

[0061] The bare metal server initialization process includes multiple initialization phases executed in a predetermined order. In some embodiments, such as... Figure 2 As shown, the bare metal server initialization process includes at least the SEC (Security Phase), PEI (Pre-EFI Initialization), DXE, and BDS (Boot Device Selection) phases.

[0062] The SEC phase is the first stage of bare-metal server initialization, and it's the first stage the system enters after power-on. During the SEC phase, the bare-metal server uses the CPU's cache as random access memory (RAM) to provide storage resources for the next stage of execution. Specifically, in this phase, the bare-metal server performs a simple Cache as Rampage, initializes the stack registers, and allows the CPU to enter the C language execution environment (C environment). Simultaneously, the CPU's serial port is initialized during this phase. In some embodiments, taking an x86 system as an example, multiple serial port controllers are integrated. Typically, one set of serial ports is used as the system serial port to output bare-metal server initialization information, while other serial ports are generally unused and can be used to communicate with the smart network interface card (NIC).

[0063] The PEI stage is used to initialize the physical memory on the motherboard. It involves traversing the memory for read / write verification and setting various memory parameters to achieve stable memory read / write operations, thus creating the runtime environment for subsequent stages of the bare-metal server initialization process. Because large servers typically use physical CPUs and large amounts of memory, and generally employ advanced memory verification, encryption, and reconstruction technologies such as ADDC, ECC, and Memory Mirror, continuous training (read / write, correction, etc.) is required to stabilize memory parameters, resulting in a lengthy memory initialization process.

[0064] The DXE phase requires traversing external devices to determine if they are ready. The BDS phase is used to analyze and determine if the cloud disk is ready to be mounted. Once the external devices are ready and the cloud disk is mounted, the bare metal server initialization process can be completed, and the operating system (OS) required by the business can be entered.

[0065] S102. When the bare metal server initialization process enters a preset stage among the multiple initialization stages, the initialization progress code of the smart network card is obtained. The initialization progress code is used to characterize the execution status of the smart network card initialization process.

[0066] Smart network interface cards (NICs) typically consist of an FPGA (Field Programmable Gate Array) and a system-on-chip (SoC). The FPGA is a further development based on programmable devices such as PAL (Programmable Array Logic) and GAL (General Purpose Array Logic). The smart NIC stores a cloud disk image, including the hard drive required for cloud computing services and the operating system to be installed on it. From the smart NIC firmware boot to the NIC initialization process executed by the SoC on the DPU card, and finally the preparation of the cloud disk image, each stage can define corresponding initialization progress codes.

[0067] During each stage of the initialization process, the smart network interface card (NIC) outputs an initialization progress code corresponding to the current stage. This progress code indicates the execution status of the NIC's initialization process, representing the current stage of the initialization process. The bare-metal server can obtain the initialization progress code from the smart NIC to monitor its initialization progress status.

[0068] Specifically, when the bare metal server initialization process enters a preset stage among the multiple initialization stages, the initialization progress code of the smart network interface card (NIC) is obtained. The preset stage can be either the DXE stage or the BDS stage mentioned above.

[0069] See Figure 2 When the bare metal server enters the DXE stage, it communicates with the smart network interface card (NIC) to obtain the current initialization progress code of the smart NIC; when the bare metal server enters the BDS stage, it communicates with the smart NIC to obtain the current initialization progress code of the smart NIC.

[0070] S103. If the initialization progress code conforms to the preset rules, then the preset stage is executed.

[0071] As described above, the bare metal server initialization process includes multiple initialization stages executed in a predetermined order. The next initialization stage can only be executed in the predetermined order after the previous one is completed. The initialization progress code reflects the initialization progress status of the smart network interface card (NIC). When the initialization progress code conforms to preset rules, it is determined that the current initialization status of the smart NIC meets the requirements for the bare metal server to execute the preset stages, and the preset stages continue to be executed. If the initialization progress code does not conform to the preset rules, the bare metal server performs corresponding processing based on the initialization progress code.

[0072] In some embodiments, if the preset stage is the DXE stage, the initialization progress code of the smart network interface card is obtained; if the initialization progress code conforms to the preset rules, it is determined that the smart network interface card has instantiated the external devices required for the bare metal server to execute the DXE stage, and can support the bare metal server to execute the DXE stage.

[0073] In some embodiments, if the preset stage is the BDS stage, the initialization progress code of the smart network interface card is obtained; if the initialization progress code conforms to the preset rules, it is determined that the smart network interface card has prepared the cloud disk and can support the bare metal server to execute the BDS stage.

[0074] S104. Continue executing the next stage of the preset stage until the bare metal server initialization process is completed and the bare metal server startup is finished.

[0075] The bare metal server initialization process includes multiple initialization phases executed in a predetermined order. After the multiple initialization phases are executed in sequence, the bare metal server starts up and enters the operating system required for the business.

[0076] This embodiment of the disclosure initiates a bare metal server initialization process and a smart network interface card (NIC) initialization process in response to the power-on of the bare metal server. The smart NIC is communicatively connected to the bare metal server. The bare metal server initialization process includes multiple initialization stages executed in a predetermined order. When the bare metal server initialization process enters a preset stage among the multiple initialization stages, the initialization progress code of the smart NIC is obtained. The initialization progress code is used to characterize the execution status of the smart NIC initialization process. If the initialization progress code conforms to preset rules, the preset stage is executed. The next stage of the preset stage is then executed until the bare metal server initialization process is completed, thus completing the startup of the bare metal server. The smart NIC is also initialized simultaneously with the bare metal server initialization. The server motherboard and the smart NIC start in parallel. The initialization information exchange between the bare metal server and the smart NIC is achieved by listening to the initialization progress code of the smart NIC and executing corresponding operations. This saves the bare metal server startup time while ensuring the reliability of the bare metal server startup.

[0077] The following describes how to determine whether the initialization progress code conforms to the preset rules, using specific examples.

[0078] Based on the above embodiments, the step of executing the preset stage if the initialization progress code conforms to preset rules includes: determining whether the initialization progress code belongs to a preset normal progress code range; if the initialization progress code belongs to the preset normal progress code range, determining whether the initialization progress code is greater than or equal to the target progress code; if the initialization progress code is greater than or equal to the target progress code, determining that the smart network card has met the conditions for the bare metal server to execute the preset stage, and executing the preset stage.

[0079] Once the bare metal server obtains the initialization progress code of the smart network interface card, it performs the corresponding operation based on the initialization progress code.

[0080] First, determine if the initialization progress code falls within the preset normal progress code range. When defining the progress code rules, a normal progress code range is also defined, encompassing all initialization progress codes that may be generated during normal operation of the smart network interface card (NIC). If the initialization progress code falls within the normal range, it indicates that the smart NIC is currently operating normally. Further analysis of the initialization progress code is then performed to determine the initialization status of the smart NIC.

[0081] In some embodiments, if the initialization progress code does not fall within the preset normal progress code range, an error message is generated and reported to the cloud management platform corresponding to the bare metal server.

[0082] When the initialization progress code is not within the preset normal progress code range, it indicates that the current smart network card has encountered an error or malfunction. The smart network card initialization process cannot run normally and needs to be reported to the cloud management platform corresponding to the bare metal server for analysis and review by the administrator.

[0083] When agreeing on the progress code rules, the target progress code corresponding to each stage of the smart network card initialization process is determined. When the initialization progress code is greater than or equal to the target progress code, it means that the smart network card has completed the initialization stage corresponding to the target progress code.

[0084] In some embodiments, if the initialization progress code is less than the target progress code, the latest initialization progress code is re-acquired and detected every preset period within a preset waiting time; after the preset waiting time, if the latest initialization progress code is less than the target progress code or does not belong to the preset normal progress code range, an error message is generated and reported to the cloud management platform corresponding to the bare metal server.

[0085] Specifically, the step of re-acquiring and detecting the latest initialization progress code every preset period within a preset waiting time includes: determining whether the latest initialization progress code belongs to a preset normal progress code range; if the latest initialization progress code belongs to the preset normal progress code range, then determining whether the latest initialization progress code is greater than or equal to the target progress code.

[0086] When the initialization progress code obtained by the bare metal server is less than the target progress code, it indicates that the current initialization level of the smart NIC is not yet able to support the bare metal server in executing the preset stage that is about to begin. However, since the initialization progress code being less than the target progress code usually means that the smart NIC is still before the stage corresponding to the target progress code, it is not possible to directly determine that the smart NIC initialization has failed or the bare metal server initialization has failed. Instead, it is necessary to wait for a period of time and then determine whether the smart NIC has entered the initialization stage corresponding to the target progress code. That is, wait for a period of time and then determine the relationship between the latest initialization progress code and the target progress code.

[0087] However, to avoid the bare metal server from continuously waiting, a preset waiting time needs to be agreed upon. During the preset waiting time, the latest initialization progress code is retrieved and checked every preset period. After the preset waiting time, if the latest initialization progress code still does not meet the preset conditions, such as being less than the target progress code or not falling within the preset normal progress code range, an error message is generated and reported to the cloud management platform corresponding to the bare metal server.

[0088] This disclosure provides a method for determining whether the initialization progress code conforms to preset rules, which improves the startup efficiency of bare metal servers and further enhances the startup reliability of bare metal servers.

[0089] Figure 3 This is a schematic diagram illustrating communication between a bare metal server and a smart network interface card (NIC) according to another embodiment of this disclosure. The bare metal server and the smart NIC communicate with each other. The step of obtaining the initialization progress code of the smart NIC when the bare metal server initialization process enters a preset stage among the plurality of initialization stages includes: sending a progress code acquisition command to the smart NIC when the bare metal server initialization process enters the preset stage among the plurality of initialization stages; and receiving feedback information found by the smart NIC according to the progress code acquisition command, wherein the feedback information includes the initialization progress code.

[0090] Specifically, the bare-metal server and the smart network interface card (NIC) communicate with each other via a serial port. A serial port is a device communication protocol on a computer; most computer devices contain two RS232-based serial ports. Serial ports are also a communication protocol for instrumentation equipment. Communication is based on three lines: ground, transmit, and receive. Because serial communication is asynchronous, a port can send data on one line while receiving data on another; the other lines are used for handshaking. The most important parameters for serial communication are baud rate, data bits, stop bits, and parity. These parameters must match between the two communicating ports.

[0091] like Figure 3 As shown, the bare metal server side and the smart network card (DPU side) respectively perform serial port initialization and opening operations. At this time, the parameters of the ports used for serial communication on both sides are matched. The bare metal server side sends a control command to the smart network card side, specifically a progress code acquisition command. The smart network card side searches for the corresponding information according to the control command (i.e., the progress code acquisition command) and sends the feedback information back to the bare metal server side. Finally, the bare metal server performs the corresponding processing according to the initialization progress code contained in the feedback information.

[0092] Figure 4 This is a schematic diagram of full-duplex serial communication provided in an embodiment of this disclosure. Figure 4 As shown, a serial port controller A is arranged on the bare metal server side, and a serial port controller B is arranged on the DPU side. The two serial port controllers communicate with each other through their respective level conversion chips via RS232 ports.

[0093] Figure 5 This is a flowchart illustrating the workflow of a bare-metal server in the DXE stage, as provided in another embodiment of this disclosure. When the preset stage in the above embodiments is the DXE stage, as... Figure 5 As shown, during the DXE phase, the bare metal server reads the initialization progress code thrown by the current smart network card. First, it determines whether the initialization progress code falls within the preset normal progress code range, i.e., whether the initialization progress code is a Normal Code. If yes, it continues to the next step; otherwise, the UEFI BIOS transmits the error information to the Baseboard Management Controller (BMC) via the IPMI Protocol. The BMC then reports this to the cloud management platform, alerting the cloud management platform administrator to check. UEFI stands for Extensible Firmware Interface.

[0094] Furthermore, if the initialization progress code falls within the normal progress code range (i.e., the initialization progress code is a Normal Code), then the system continues to determine whether the smart network interface card (NIC) has instantiated external devices, such as PF (Physical Function) and VF (Virtual Function) devices, by checking whether the initialization progress code reaches the target progress code corresponding to the DXE stage. PF is used for PCI functions that support SR-IOV functionality as defined in the SR-IOV specification. PF contains the SR-IOV function architecture and is used to manage SR-IOV functions. PF is a full-featured PCIe (Peripheral Component Interconnect Express) function, and can be discovered, managed, and processed like any other PCIe device. PF also possesses full configuration resources that can be used to configure or control PCIe devices. VF is a function associated with PF in SR-IOV. VF is a lightweight PCIe function that can share one or more physical resources with physical functions and other VFs associated with the same physical function. VF is only allowed to have configuration resources for its own behavior.

[0095] If the initialization progress code is greater than or equal to the target progress code corresponding to the DXE stage, it means that the smart NIC has instantiated the PF and VF devices, and the bare metal server continues to execute the initialization process, entering the next stage, namely the BDS stage. If the initialization progress code is not greater than the target progress code corresponding to the DXE stage, it means that the smart NIC has not yet instantiated the PF and VF devices, and the bare metal server performs a waiting action, re-acquiring the latest initialization progress code every preset period (e.g., 0.5 seconds) within a preset waiting time, and again judging whether the latest initialization progress code conforms to the preset rules; if it does, it means that the smart NIC has instantiated the PF and VF devices, and the bare metal server continues to execute the initialization process, entering the next stage, namely the BDS stage; if the latest initialization progress code still does not conform to the preset rules after the preset waiting time, it is determined that the wait has timed out, the UEFI BIOS transmits the error information to the BMC through the IPMI Protocol, the BMC reports to the cloud management platform, and reminds the cloud management platform administrator to check.

[0096] Figure 6 This is a flowchart illustrating the workflow of a bare-metal server in the BDS stage, as provided in another embodiment of this disclosure. When the preset stage in the above embodiments is the BDS stage, as... Figure 6As shown, during the BDS phase, the bare metal server reads the initialization progress code thrown by the current smart network card. First, it determines whether the initialization progress code falls within the preset normal progress code range, i.e., whether the initialization progress code is a Normal Code. If yes, it continues to the next step; otherwise, the UEFI BIOS transmits the error information to the BMC via the IPMI Protocol. The BMC then reports this to the cloud management platform, alerting the cloud management platform administrator to check.

[0097] Furthermore, if the initialization progress code falls within the normal range (i.e., the initialization progress code is a Normal Code), the system continues to determine whether the cloud disk is properly mounted by checking if the initialization progress code reaches the target progress code corresponding to the BDS stage. If the initialization progress code is greater than or equal to the target progress code corresponding to the BDS stage, it means that the smart network interface card (NIC) has successfully mounted the cloud disk, and the bare metal server continues the initialization process, entering the next stage, i.e., entering the OS required by the service. If the initialization progress code is not greater than the target progress code corresponding to the BDS stage, it means that the smart NIC has not yet successfully mounted the cloud disk, and the bare metal server performs a waiting action. Within a preset waiting time, it re-acquires the latest initialization progress code every preset period (e.g., 0.5 seconds) and checks again whether the latest initialization progress code conforms to the preset rules. If it does, it means that the smart NIC has successfully mounted the cloud disk, and the bare metal server continues the initialization process, entering the next stage, i.e., entering the OS required by the service. If the latest initialization progress code still does not conform to the preset rules after the preset waiting time has elapsed, it is determined that the wait has timed out. The UEFI BIOS transmits the error information to the BMC via the IPMI Protocol, and the BMC reports it to the cloud management platform, reminding the cloud management platform administrator to check.

[0098] Figure 7 A flowchart of a bare metal server startup method provided in another embodiment of this disclosure.

[0099] like Figure 7 As shown, the method includes the following steps:

[0100] S701. In response to the power-on of the bare metal server, start the bare metal server initialization process and simultaneously start the smart network card initialization process.

[0101] The smart network interface card (NIC) is communicatively connected to the bare metal server, and the bare metal server initialization process includes multiple initialization phases executed in a predetermined order.

[0102] S702. When the bare metal server initialization process enters the DXE stage, the first initialization progress code of the smart network card is obtained.

[0103] S703. Determine whether the first initialization progress code belongs to the preset first normal progress code range. If yes, execute S704; if no, execute S713.

[0104] S704. Determine whether the first initialization progress code is greater than or equal to the first target progress code. If yes, execute S707; if no, execute S705.

[0105] The first target progress code is used to indicate that the smart network card has met the conditions for the bare metal server to perform the DXE stage, that is, to indicate that the smart network card has instantiated the PF and VF devices.

[0106] S705. Reacquire the latest first initialization progress code every first preset cycle.

[0107] S706. Determine whether the waiting time is greater than the first preset waiting time. If yes, execute S713; if no, execute S704.

[0108] S707. The bare metal server initialization process enters the BDS stage and obtains the second initialization progress code of the smart network card.

[0109] S708. Determine whether the second initialization progress code belongs to the preset second normal progress code range. If yes, execute S709; if no, execute S713.

[0110] S709. Determine whether the second initialization progress code is greater than or equal to the second target progress code. If yes, execute S712; if no, execute S710.

[0111] The second target progress code is used to indicate that the smart network card has met the conditions for the bare metal server to perform the BDS stage, that is, to indicate that the smart network card has been mounted with the cloud disk.

[0112] S710: Reacquire the latest second initialization progress code every first preset cycle.

[0113] S711. Determine whether the waiting time is greater than the second preset waiting time. If yes, execute S713; otherwise, execute S708.

[0114] S712. The bare metal server initialization process is completed, and the bare metal server is started.

[0115] S713. Generate error information and report it to the cloud management platform corresponding to the bare metal server.

[0116] This embodiment of the disclosure enables the bare metal server and smart network interface card (NIC) to be initialized and started in parallel. During the initialization process, information interaction is achieved. The initialization progress status of the smart NIC is understood by listening to the initialization progress code of the smart NIC, the corresponding progress is recorded, and corresponding measures are taken to enable the bare metal server to start the OS image deployed in the cloud disk smoothly and securely, while improving the startup efficiency of the bare metal server.

[0117] Figure 8 This is a schematic diagram of the bare metal server booting device provided in this embodiment. The bare metal server booting device can be a bare metal server as described in the above embodiment, or it can be a component or assembly within the bare metal server. The bare metal server booting device provided in this embodiment can execute the processing flow provided in the bare metal server booting method embodiment, such as... Figure 8 As shown, the bare metal server startup device 80 includes: a startup module 81, an acquisition module 82, a first execution module 83, and a second execution module 84. The startup module 81, in response to the power-on of the bare metal server, initiates a bare metal server initialization process and simultaneously initiates a smart network interface card (NIC) initialization process. The smart NIC is communicatively connected to the bare metal server. The bare metal server initialization process includes multiple initialization stages executed in a predetermined order. The acquisition module 82, when the bare metal server initialization process enters a preset stage among the multiple initialization stages, acquires the initialization progress code of the smart NIC. The initialization progress code is used to characterize the execution status of the smart NIC initialization process. The first execution module 83, if the initialization progress code conforms to a preset rule, executes the preset stage. The second execution module 84, continuing to execute the next stage of the preset stage, continues until the bare metal server initialization process is completed, thus completing the startup of the bare metal server.

[0118] Optionally, the first execution module 83 includes a first judgment unit 831, a second judgment unit 832, and an execution unit 833; wherein, the first judgment unit 831 is used to determine whether the initialization progress code belongs to a preset normal progress code range; the second judgment unit 832 is used to determine whether the initialization progress code is greater than or equal to the target progress code if the initialization progress code belongs to the preset normal progress code range; the execution unit 833 is used to determine that the smart network card has met the conditions for the bare metal server to execute the preset stage if the initialization progress code is greater than or equal to the target progress code, and execute the preset stage.

[0119] Optionally, the first execution module 83 further includes a reporting unit 834, which is used to generate error information and report it to the cloud management platform corresponding to the bare metal server if the initialization progress code does not belong to the preset normal progress code range.

[0120] Optionally, the first execution module 83 further includes a detection unit 835, which is used to re-acquire the latest initialization progress code and perform detection every preset period within a preset waiting time if the initialization progress code is less than the target progress code; the reporting unit 834 is also used to generate error information and report it to the cloud management platform corresponding to the bare metal server if the latest initialization progress code is less than the target progress code or does not belong to the preset normal progress code range after a preset waiting time.

[0121] Optionally, the detection unit 835 is further configured to determine whether the latest initialization progress code belongs to a preset normal progress code range; if the latest initialization progress code belongs to a preset normal progress code range, then determine whether the latest initialization progress code is greater than or equal to the target progress code.

[0122] Optionally, the preset stage can be either the DXE stage or the BDS stage.

[0123] Optionally, the acquisition module 82 includes a sending unit 821 and a receiving unit 822; the sending unit 821 is used to send a progress code acquisition command to the smart network card when the bare metal server initialization process enters a preset stage among the multiple initialization stages; the receiving unit 822 is used to receive the feedback information found by the smart network card according to the progress code acquisition command, the feedback information including the initialization progress code.

[0124] Figure 8 The bare metal server boot device shown in the embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and will not be repeated here.

[0125] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. The electronic device can be a bare-metal server as described in the above embodiments. The electronic device provided in this disclosure can execute the processing flow provided in the bare-metal server boot method embodiments, such as... Figure 9 As shown, the electronic device 90 includes: a memory 91, a processor 92, a computer program, and a communication interface 93; wherein the computer program is stored in the memory 91 and is configured to be executed by the processor 92 as described above in the bare metal server startup method.

[0126] In addition, this disclosure also provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the bare metal server boot method described in the above embodiments.

[0127] Furthermore, this disclosure also provides a computer program product, which includes a computer program or instructions that, when executed by a processor, implement the bare metal server startup method described above.

[0128] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0129] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for booting a bare metal server, characterized in that, The method includes: In response to the power-on of the bare metal server, the bare metal server initialization process is started, and the smart network interface card initialization process is started at the same time. The smart network interface card is communicatively connected to the bare metal server. The bare metal server initialization process includes multiple initialization stages executed in a predetermined order. When the bare metal server initialization process enters a preset stage among the multiple initialization stages, the initialization progress code of the smart network card is obtained. The initialization progress code is used to characterize the execution status of the smart network card initialization process. If the initialization progress code conforms to the preset rules, then the preset stage is executed; Continue executing the next stage of the preset stage until the bare metal server initialization process is completed and the bare metal server is started. If the initialization progress code conforms to a preset rule, then the preset stage is executed, including: Determine whether the initialization progress code belongs to the preset normal progress code range; If the initialization progress code falls within the preset normal progress code range, then determine whether the initialization progress code is greater than or equal to the target progress code. If the initialization progress code is greater than or equal to the target progress code, then it is determined that the smart network card has met the conditions for the bare metal server to execute the preset stage, and the preset stage is executed.

2. The method according to claim 1, characterized in that, After determining whether the initialization progress code belongs to the preset normal progress code range, the method further includes: If the initialization progress code does not fall within the preset normal progress code range, an error message is generated and reported to the cloud management platform corresponding to the bare metal server.

3. The method according to claim 1, characterized in that, After determining whether the initialization progress code is greater than the target progress code if the initialization progress code falls within a preset normal progress code range, the method further includes: If the initialization progress code is less than the target progress code, the latest initialization progress code will be re-acquired and detected every preset period within a preset waiting time. After a preset waiting time, if the latest initialization progress code is less than the target progress code or does not belong to the preset normal progress code range, an error message is generated and reported to the cloud management platform corresponding to the bare metal server.

4. The method according to claim 3, characterized in that, The step of re-acquiring the latest initialization progress code and performing detection every preset period within a preset waiting time includes: Determine whether the latest initialization progress code falls within the preset normal progress code range; If the latest initialization progress code falls within the preset normal progress code range, then determine whether the latest initialization progress code is greater than or equal to the target progress code.

5. The method according to claim 1, characterized in that, The preset stage can be either the DXE stage or the BDS stage.

6. The method according to claim 1, characterized in that, When the bare metal server initialization process enters a preset stage among the multiple initialization stages, the initialization progress code of the smart network interface card is obtained, including: When the bare metal server initialization process enters a preset stage among the multiple initialization stages, a progress code acquisition command is sent to the smart network card; The system receives feedback information retrieved by the smart network card based on the progress code acquisition command, the feedback information including the initialization progress code.

7. A bare metal server boot device, characterized in that, include: A startup module is used to start the bare metal server initialization process and the smart network interface card initialization process in response to the power-on of the bare metal server. The smart network interface card is communicatively connected to the bare metal server. The bare metal server initialization process includes multiple initialization stages executed in a predetermined order. The acquisition module is used to acquire the initialization progress code of the smart network card when the bare metal server initialization process enters a preset stage among the multiple initialization stages. The initialization progress code is used to characterize the execution status of the smart network card initialization process. The first execution module is used to execute the preset stage if the initialization progress code conforms to the preset rules; The second execution module is used to continue executing the next stage of the preset stage until the bare metal server initialization process is completed and the bare metal server is started. The first execution module includes a first judgment unit, a second judgment unit, and an execution unit; wherein, the first judgment unit is used to judge whether the initialization progress code belongs to a preset normal progress code range; the second judgment unit is used to judge whether the initialization progress code is greater than or equal to the target progress code if the initialization progress code belongs to the preset normal progress code range; the execution unit is used to determine that the smart network card has met the conditions for the bare metal server to execute the preset stage if the initialization progress code is greater than or equal to the target progress code, and execute the preset stage.

8. An electronic device, characterized in that, include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and configured to be executed by the processor to implement the method as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Method, device and equipment for initializing intelligent network card by server and medium

    CN114143194A

  • Bare metal server implementation method and system based on intelligent network card

    CN114610447A