Installation method and device and computer equipment
By creating virtual network card devices on smart network card, the automatic installation of the host and network card operating system of the elastic bare metal server is achieved, solving the problems of low batch installation efficiency and increased cost, improving installation efficiency and reducing deployment costs.
Patent Information
- Application Number
- CN202510684416.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2025-08-15
AI Technical Summary
In the prior art, the batch installation efficiency of elastic bare metal servers is inefficient, and the deployment cost increases due to the increase in service port speed.
By creating virtual network card devices on the smart network card, using virtual network card devices and service management ports to capture and identify PXE messages, the automatic installation of the host and network card operating system is achieved, and the cost increase caused by using the service port alone is avoided.
Improve the batch installation efficiency of elastic bare metal servers, reduce the need for manual intervention, and reduce the overall deployment cost.
Smart Images

Figure CN120498990A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an installation method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] Key cloud-based services and high-performance computing require high computing power and security. Bare metal servers offer the high performance and security of physical machines while also possessing the elasticity of virtual machines, leading to their increasing adoption. Elastic bare metal servers, in particular, with Smart NICs, offer higher computing power and greater flexibility than standard bare metal servers. For example, the hardware offload functionality of Smart NICs can offload fixed processing logic from the server CPU to the NIC, thereby improving server processing performance.
[0003] Because different integrators have varying requirements for host and SmartNIC operating system versions, server vendors must pre-install the specified operating system version based on customer orders. Existing, established network installations typically utilize gigabit networks, and in related technologies, the host uses its own gigabit management port to install the host operating system. However, for Elastic Bare Metal Servers, this management port is not used in actual business operations and must be removed before shipment, reducing the efficiency of batch installation. Summary of the Invention
[0004] Based on this, it is necessary to provide an installation method, device, computer equipment, computer-readable storage medium and computer program product that can improve the efficiency of batch installation of elastic bare metal servers in response to the above technical problems.
[0005] In a first aspect, the present application provides an installation method for a smart network card in an elastic bare metal server, comprising:
[0006] Creating a virtual network card device on the smart network card; the host in the elastic bare metal server is used to send a first PXE message through the virtual network card device, and the first PXE message is used to request the target host installation resources from the first PXE server;
[0007] Capturing the first PXE message forwarded by the virtual network card device, and sending the first PXE message to the first PXE server through the service management port of the smart network card;
[0008] A second PXE message sent to the host is identified from the PXE message received by the service management port, and the second PXE message is sent to the host through the virtual network card device, so that the host performs installation based on the second PXE message.
[0009] In one embodiment, the method further comprises:
[0010] Capture a third PXE message and send the third PXE message to the second PXE server through the service management port of the smart network card; the third PXE message is used to request the target network card installation resources from the second PXE server.
[0011] In one embodiment, creating a virtual network card device on the smart network card includes:
[0012] Adding rule data for capturing PXE messages on the data plane of the smart network card; the rule data includes the identifier of the virtual network card device;
[0013] A power-on flag of the host is set, so that the host performs installation based on the second PXE message when the power-on flag is set.
[0014] In one embodiment, capturing the first PXE message forwarded by the virtual network card device and sending the first PXE message to the first PXE server through the service management port of the smart network card includes:
[0015] Based on the rule data, capturing the first PXE message forwarded by the virtual network card device;
[0016] The first PXE message is added with an identifier of the first virtual local area network, and the first PXE message is sent to the first PXE server through the service management port of the smart network card; the service management port and the first PXE server are connected through the first virtual local area network.
[0017] In one embodiment, identifying a second PXE message sent to the host from the PXE message received from the service management port, and sending the second PXE message to the host through the virtual network card device includes:
[0018] Identifying, from the PXE message received by the service management port, a second PXE message including an identifier of the first virtual local area network;
[0019] The identifier of the first virtual local area network in the second PXE message is deleted, and the second PXE message is sent to the host through the virtual network card device.
[0020] In one embodiment, the method further comprises:
[0021] A fourth PXE message including an identifier of a second virtual local area network is identified from the PXE message received by the service management port, so that the smart network card is installed based on the fourth PXE message; and the service management port is connected to the second PXE server through the second virtual local area network.
[0022] In one embodiment, the method further includes: identifying a second PXE message sent to the host from the PXE message received from the service management port, and sending the second PXE message to the host through the virtual network card device, and then:
[0023] In response to receiving a first instruction from the console, the virtual network card device and the rule data are deleted; the console is used to send the first instruction to the smart network card when the host installation is completed.
[0024] In one embodiment, creating a virtual network card device on the smart network card includes:
[0025] In response to receiving a second instruction from the console, a virtual network card device is created on the smart network card; the console is used to send the second instruction to the smart network card when the installation of the smart network card is completed.
[0026] In a second aspect, the present application further provides an installation device, comprising:
[0027] A virtual network card device creation module is configured to create a virtual network card device on the smart network card; the host in the elastic bare metal server is configured to send a first PXE message through the virtual network card device, and the first PXE message is configured to request target host installation resources from the first PXE server;
[0028] a message sending module, configured to capture the first PXE message forwarded by the virtual network card device, and send the first PXE message to the first PXE server through the service management port of the smart network card;
[0029] The message receiving module is configured to identify a second PXE message sent to the host from the PXE message received by the service management port, and send the second PXE message to the host through the virtual network card device, so that the host performs installation based on the second PXE message.
[0030] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above methods when executing the computer program.
[0031] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any of the above-described methods when the computer program is executed by a processor.
[0032] In a fifth aspect, the present application also provides a computer program product, comprising a computer program, which implements the steps of any of the above methods when executed by a processor.
[0033] The above-mentioned installation method, apparatus, computer equipment, computer-readable storage medium, and computer program product create a virtual network card device on the smart network card as a virtual interface for host PXE communication, distinguish PXE messages from the host, and send them to the host PXE server via the business management port of the smart network card; distinguish PXE messages sent to the host via the business management port of the smart network card, and send them to the host via the virtual network card device. This enables automatic installation of the host and network card operating system through the business management port of the smart network card. It is suitable for batch installation of elastic bare metal servers, improves the efficiency of batch installation of hosts, and solves the problem of increased costs caused by installing hosts through the business port alone. Furthermore, after the virtual network card device is created and the PXE capture rules are ready, the smart network card sets the host's power-on flag, ensuring that the host only starts PXE installation after the flag is set, solving the problem of inefficiency caused by manual intervention in batch installation of elastic bare metal servers. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.
[0035] Figure 1 A diagram showing an application environment of an installation method in an embodiment;
[0036] Figure 2 A schematic flow chart of an installation method according to an embodiment;
[0037] Figure 3 A schematic flow chart of an installation method according to another embodiment;
[0038] Figure 4 Schematic diagram of the process of step S104 in one embodiment;
[0039] Figure 5 Schematic diagram of the process of step S106 in one embodiment;
[0040] Figure 6 Schematic diagram of a flow chart of an installation method in another embodiment;
[0041] Figure 7 A schematic flow chart of an installation method in yet another embodiment;
[0042] Figure 8 It is a structural block diagram of an installation device in one embodiment;
[0043] Figure 9 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0045] In an Elastic Bare Metal Server (EBMS), both the host and the Smart NIC must be installed with a specific operating system. To facilitate mass installation, the Preboot Execution Environment (PXE) technology is typically used to load the operating system from a remote server via the NIC. PXE is a mechanism for booting computers using a NIC. In related technologies, a Smart NIC can install the NIC operating system through its Gigabit management port or service port. While host OS installation can be achieved through the host's Gigabit management port, users of an EBS actually access the host OS through the service port. Removing this management port significantly impacts mass installation efficiency. Installing the host OS through the Smart NIC's service port requires that the PXE server NIC, switch ports, and other supporting equipment all support 25 Gbps or higher, as service port speeds are currently 25 Gbps or higher. This significantly increases overall deployment costs.
[0046] Based on this, the embodiment of the present application provides an installation method that can be applied to Figure 1In the application environment shown, an elastic bare metal server is a bare metal server with a smart NIC. The smart NIC has an independent CPU, memory, a gigabit management port (or other service management port), and an operating system. The smart NIC can load the NIC PXE client. A host PXE agent can be introduced on the smart NIC. The host PXE agent can be used to: create a virtual NIC device on the smart NIC; capture the first PXE message forwarded by the virtual NIC device and send the first PXE message to the first PXE server through the smart NIC's service management port; identify the second PXE message destined for the host from the PXE message received through the service management port and send the second PXE message to the host through the virtual NIC device. The host PXE agent can also be used to: add PXE message capture rule data to the data plane of the smart NIC; and set the host's power-on flag. The first PXE server can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server providing cloud computing services.
[0047] In an exemplary embodiment, Figure 2 As shown, a method for installing a machine is provided, which is applied to Figure 1 The smart network card in FIG. 1 is used as an example to illustrate the method, which includes the following steps S102 to S106. In which:
[0048] In step S102, a virtual network card device is created on the smart network card; the host in the elastic bare metal server is used to send a first PXE message through the virtual network card device, and the first PXE message is used to request the target host installation resources from the first PXE server.
[0049] Exemplarily, the host PXE agent program running on the smart network card can control the data plane of the smart network card to generate a virtual network card device, so that the host can be installed through the virtual network card device.
[0050] Among them, the virtual network card device can be a virtio-net device. The first PXE server can be used to store host installation resources. The target host installation resource can be a host operating system specified by the operation console. After determining that the installation of the smart network card is complete and the necessary host PXE environment is prepared, the host can install the system through the virtio-net device. In one possible implementation, the host PXE agent program can set the host's power-on flag after establishing a communication channel between the virtio-net device and the service management port of the smart network card. In response to the power-on flag being set, the host can send a first PXE message through the virtual network card device.
[0051] Step S104: Capture the first PXE message forwarded by the virtual network card device, and send the first PXE message to the first PXE server through the service management port of the smart network card.
[0052] For example, the host PXE agent can intercept all messages destined for the virtual network card (NIC) and filter out a first PXE message from the NIC. The first PXE message is sent to the first PXE server via the service management port of the smart NIC, so that the first PXE server responds to the first PXE message and sends a second PXE message to the host. The second PXE message can include installed resources on the target host.
[0053] Among them, the service management port can be a gigabit management port, corresponding to a gigabit installed network. It is understandable that the service management port can also correspond to other levels of installed networks, and this embodiment of the application does not limit this.
[0054] Step S106 : Identify a second PXE message sent to the host from the PXE message received from the service management port, and send the second PXE message to the host through the virtual network card device, so that the host performs installation based on the second PXE message.
[0055] Illustratively, the host PXE agent program can intercept all messages in the virtual network card inlet direction and filter out messages sent to the host, so that the host receives the second message through the virtual network card device and performs installation based on the target host installation resources contained in the second PXE message.
[0056] In the above installation method, a virtual network card device is created on the smart network card as a virtual interface for host PXE communication, and the PXE messages from the host are distinguished and sent to the host PXE server through the business management port of the smart network card; the PXE messages sent to the host through the business management port of the smart network card are distinguished and sent to the host through the virtual network card device. This method can realize the automatic installation of the host and network card operating system through the business management port of the smart network card. It is suitable for the batch installation of elastic bare metal servers, improves the efficiency of batch installation of hosts, and solves the problem of increased costs caused by the separate business port installation of hosts.
[0057] In an exemplary embodiment, Figure 3 As shown, the above installation method may further include:
[0058] Step S1031: Add rule data for capturing PXE messages on the data plane of the smart network card; the rule data includes an identifier of the virtual network card device.
[0059] For example, the host PXE agent can control the data plane of the SmartNIC, add rule data for capturing PXE messages, and ensure that the rule for capturing PXE messages has the highest priority. Specifically, the rule data can include matching item data and action data. The matching item data can include the identifier and protocol type of the virtual NIC device, and the action data can be used to indicate the object that processes the PXE message. The rules for capturing PXE messages can be found in Table 1.
[0060] Table 1
[0061]
[0062] Step S1032: Setting a power-on flag of the host, so that the host performs installation based on the second PXE message when the power-on flag is set.
[0063] For example, after the Elastic Bare Metal Server is powered on, the host can cyclically check the host's power-on flag until it is set. The host PXE client then loads. The host PXE client then sends a first PXE message and receives a second PXE message through the virtual network card (VNIC) to complete the installation of the host operating system. Specifically, the host power-on flag can be implemented based on a pre-defined register or other hardware on the host.
[0064] In this embodiment, after the virtual network card device is created and the PXE capture rules are ready, the smart network card sets the host's power-on flag, ensuring that the host only starts PXE installation after the flag is set. This solves the inefficiency problem caused by the manual intervention required for batch installation of elastic bare metal.
[0065] In an exemplary embodiment, Figure 4 As shown, the above step S104 may include:
[0066] Step S1041: based on the rule data, capture the first PXE message forwarded by the virtual network card device.
[0067] Step S1042: Add the first virtual local area network identifier to the first PXE message, and send the first PXE message to the first PXE server through the service management port of the smart network card; the service management port and the first PXE server are connected through the first virtual local area network.
[0068] Please continue to refer to Figure 1The Elastic Bare Metal Server's Smart NIC, the first PXE server (host PXE server), and the second PXE server (network card PXE server) can form a gigabit network using their respective gigabit network cards. By configuring a gigabit switch, the host PXE server is located in the first virtual LAN (VLAN-h) to provide PXE services for the Elastic Bare Metal Server's hosts. The network card PXE server is located in the second virtual LAN (VLAN-s) to provide PXE services for the Elastic Bare Metal Server's Smart NIC. The first and second PXE servers can be deployed on the same physical machine or on different machines.
[0069] In one possible implementation, the host PXE agent can identify the first PXE message from the installed virtio-net device (e.g. Figure 1 The first PXE message is sent out from the gigabit management port of the smart network card after adding a VLAN tag "VLAN-h" (that is, the identifier of the first virtual local area network) to the message.
[0070] Furthermore, if Figure 5 As shown, the above step S106 may include:
[0071] Step S1061: Identify a second PXE message containing an identifier of a first virtual local area network from the PXE message received from the service management port.
[0072] Step S1062: Delete the identifier of the first virtual local area network in the second PXE message, and send the second PXE message to the host through the virtual network card device.
[0073] The identifier of the first virtual local area network in the second PXE message may be added by the first PXE server or a switch (eg, a gigabit switch).
[0074] In one possible implementation, the host PXE agent can identify the second PXE message from the gigabit management port, which contains the VLAN tag "VLAN-h" and whose destination MAC address (Media Access Control Address) is the installed virtio-net device, and strip the VLAN tag "VLAN-h" from the second PXE message before sending it to the installed virtio-net device.
[0075] Optionally, the smart network card may be further configured to send a third PXE message. The installation method may further include:
[0076] Step S108: Capture a third PXE message and send the third PXE message to the second PXE server through the service management port of the smart network card; the third PXE message is used to request the target network card installation resources from the second PXE server.
[0077] The service management port is connected to the second PXE server via a second virtual local area network, and the second PXE server can be used to store network card installation resources.
[0078] Exemplarily, the third PXE message sent by the network card PXE client can be captured; the second virtual LAN identifier is added to the third PXE message, and the third PXE message is sent to the second PXE server through the service management port of the smart network card; the service management port and the second PXE server are connected through the second virtual LAN.
[0079] In a possible implementation, if a third PXE message (such as Figure 1 The third PXE message can be sent out from the Gigabit management port of the smart network card after adding the VLAN tag "VLAN-s" (that is, the identifier of the second virtual LAN).
[0080] It should be noted that the embodiment of the present application does not limit the order of step S104 and step S108.
[0081] Step S110: Identify a fourth PXE message sent to the smart network card from the PXE message received from the service management port, so that the smart network card is installed based on the fourth PXE message.
[0082] Furthermore, the above step S110 may include:
[0083] Step S1101: Identify a fourth PXE message containing an identifier of a second virtual local area network from PXE messages received from a service management port, so that the smart network card is installed based on the fourth PXE message.
[0084] Illustratively, a fourth PXE message including the identifier of the second virtual local area network may be identified from the PXE messages received from the service management port; and the identifier of the second virtual local area network in the fourth PXE message may be deleted.
[0085] The identifier of the second virtual local area network in the fourth PXE message may be added by the second PXE server or a switch (eg, a gigabit switch).
[0086] In one possible implementation, if a packet from a gigabit management port containing a VLAN tag "VLAN-s" is identified, the VLAN tag "VLAN-s" can be stripped off and the packet is sent to the network card operating system (OS) protocol stack for processing.
[0087] It should be noted that the embodiment of the present application does not limit the order of step S106 and step S110.
[0088] In this embodiment, VLAN isolation can be used to reuse the service management port of the smart network card, so that the host and the smart network card can obtain installed resources through the service management port without interfering with each other, and VLAN tags can be used to distinguish multi-channel messages.
[0089] In an exemplary embodiment, the above installation method may further include:
[0090] Step S107: In response to receiving the first instruction from the console, the virtual network card device and rule data are deleted; the console is used to send the first instruction to the smart network card when the host installation is completed.
[0091] For example, after the console determines that host installation is complete (for example, by determining whether a preset username can log in), it can issue a first instruction to the SmartNIC (for example, automatically issuing the first instruction via Telnet), causing the SmartNIC to shut down the host PXE agent, delete the installed virtio-net device, and remove the PXE message capture rule data added to the SmartNIC's data plane. The console can be a terminal or a server.
[0092] In an exemplary embodiment, the above S102 may include:
[0093] Step S1021: In response to receiving the second instruction from the console, a virtual network card device is created on the smart network card; the console is used to send the second instruction to the smart network card when the installation of the smart network card is completed.
[0094] Please continue to refer to Figure 1 After the EBS is powered on, the Smart NIC can communicate with the NIC PXE server via VLAN-s through the NIC PXE client to complete the installation of the Smart NIC operating system.
[0095] Exemplarily, after the console determines that the smart network card is installed and started (for example, it can be determined based on whether a preset user name can be used to log in), it can determine whether to continue installing the host based on the configuration of the console; if so, a second instruction can be sent to the smart network card (for example, the second instruction can be automatically sent using telnet) to enable the smart network card to enable the host PXE agent program, and the host PXE agent program takes over all messages at the data link layer and controls the generation of a virtual network card device.
[0096] In an exemplary embodiment, the above installation method may include:
[0097] In step S102, a virtual network card device is created on the smart network card; the host in the elastic bare metal server is used to send a first PXE message through the virtual network card device, and the first PXE message is used to request the target host installation resources from the first PXE server.
[0098] Optionally, step S102 may include step S1021.
[0099] Step S1021: In response to receiving the second instruction from the console, a virtual network card device is created on the smart network card; the console is used to send the second instruction to the smart network card when the installation of the smart network card is completed.
[0100] Specifically, please refer to Figure 6 , you can enable the host PXE agent on the smart network card to generate an installed virtio-net device.
[0101] Step S1031: Add rule data for capturing PXE messages on the data plane of the smart network card; the rule data includes an identifier of the virtual network card device.
[0102] Step S1032: Setting a power-on flag of the host, so that the host performs installation based on the second PXE message when the power-on flag is set.
[0103] Please continue to refer to Figure 6 , you can add rules for capturing PXE messages on the data plane and set the host power-on flag.
[0104] In one possible implementation, Figure 7 As shown, another installation method is provided, which is applied to the host in the elastic bare metal server. The method includes: powering on the host; reading the host power-on mark; determining whether the power-on mark is set; if so, installing the host by installing the virtio-net device; if not, executing the step of reading the host power-on mark again.
[0105] Step S104: Capture the first PXE message forwarded by the virtual network card device, and send the first PXE message to the first PXE server through the service management port of the smart network card.
[0106] Optionally, step S104 may include the following steps S1041 and S1042, wherein:
[0107] Step S1041: based on the rule data, capture the first PXE message forwarded by the virtual network card device.
[0108] Step S1042: Add the first virtual local area network identifier to the first PXE message, and send the first PXE message to the first PXE server through the service management port of the smart network card; the service management port and the first PXE server are connected through the first virtual local area network.
[0109] Please continue to refer to Figure 6 , it can receive the installation message of virtio-net, add VLAN-h and send it out from the network card management port.
[0110] Step S106 : Identify a second PXE message sent to the host from the PXE message received from the service management port, and send the second PXE message to the host through the virtual network card device, so that the host performs installation based on the second PXE message.
[0111] Optionally, step S106 may include the following steps S1061 and S1062, wherein:
[0112] Step S1061: Identify a second PXE message containing an identifier of a first virtual local area network from the PXE message received from the service management port.
[0113] Step S1062: Delete the identifier of the first virtual local area network in the second PXE message, and send the second PXE message to the host through the virtual network card device.
[0114] Please continue to refer to Figure 6 , it can receive messages from the network card's gigabit management port; determine whether the destination MAC address is the installed virtio-net device; if so, strip the VLAN tag and send it to the installed virtio-net device; if not, send it to the network card OS protocol stack.
[0115] Step S107: In response to receiving the first instruction from the console, the virtual network card device and rule data are deleted; the console is used to send the first instruction to the smart network card when the host installation is completed.
[0116] Please continue to refer to Figure 6After stripping the VLAN tag and sending it to the installation virtio-net device, it can be determined whether the installation is complete. If so, the host PXE agent program is shut down on the smart network card, the installation virtio-net device is deleted, the data plane rule for capturing PXE messages is deleted, and the installation is completed. If not, the steps of receiving the installation message from the installation virtio-net and adding VLAN-h are performed again, and then sending it out from the network card management port are performed.
[0117] In summary, the above installation method creates a virtual network card device on the smart network card as a virtual interface for host PXE communication, distinguishes PXE messages from the host, and sends them to the host PXE server via the smart network card's service management port. Furthermore, by distinguishing PXE messages sent to the host via the smart network card's service management port and sending them to the host via the virtual network card device, the host and network card operating system can be automatically installed through the smart network card's service management port. This method is suitable for batch installation of elastic bare metal servers, improves the efficiency of batch host installation, and solves the problem of increased costs caused by installing hosts through a separate service port. Furthermore, after the virtual network card device is created and the PXE capture rules are in place, the smart network card sets the host's power-on flag, ensuring that the host only begins PXE installation after the flag is set. This solves the inefficiency caused by the need for manual intervention in batch installation of elastic bare metal servers.
[0118] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0119] Based on the same inventive concept, embodiments of the present application further provide an installation device for implementing the aforementioned installation method. The implementation solution provided by this device is similar to the implementation solution described in the aforementioned method. Therefore, the specific limitations of one or more installation device embodiments provided below can be found in the above-mentioned limitations of the installation method and will not be repeated here.
[0120] In an exemplary embodiment, Figure 8As shown, a device 300 for installing a computer is provided, comprising: a virtual network card device creation module 301, a message sending module 302, and a message receiving module 303, wherein:
[0121] A virtual network card device creation module 301 is configured to create a virtual network card device on the smart network card; a host in the elastic bare metal server is configured to send a first PXE message through the virtual network card device, and the first PXE message is configured to request target host installation resources from the first PXE server;
[0122] The message sending module 302 is used to capture the first PXE message forwarded by the virtual network card device and send the first PXE message to the first PXE server through the service management port of the smart network card;
[0123] The message receiving module 303 is configured to identify a second PXE message sent to the host from the PXE message received from the service management port, and send the second PXE message to the host through the virtual network card device, so that the host performs installation based on the second PXE message.
[0124] In an exemplary embodiment, the message sending module 302 is further configured to:
[0125] The third PXE message is captured and sent to the second PXE server through the service management port of the smart network card; the third PXE message is used to request the target network card installation resources from the second PXE server.
[0126] In an exemplary embodiment, the installation device 300 further includes a flag setting module configured to:
[0127] Add rule data for capturing PXE messages on the data plane of the smart network card; the rule data includes the identifier of the virtual network card device;
[0128] A power-on flag of the host is set, so that the host performs computer installation based on the second PXE message when the power-on flag is set.
[0129] In an exemplary embodiment, the message sending module 302 is further configured to:
[0130] Based on the rule data, capture the first PXE message forwarded by the virtual network card device;
[0131] The first virtual local area network identifier is added to the first PXE message, and the first PXE message is sent to the first PXE server through the service management port of the smart network card; the service management port and the first PXE server are connected through the first virtual local area network.
[0132] In an exemplary embodiment, the message receiving module 303 is further configured to:
[0133] Identifying, from the PXE message received from the service management port, a second PXE message including the address of the identifier of the first virtual local area network;
[0134] The identifier of the first virtual local area network in the second PXE message is deleted, and the second PXE message is sent to the host through the virtual network card device.
[0135] In an exemplary embodiment, the message receiving module 303 is further configured to:
[0136] A fourth PXE message containing the identifier of the second virtual local area network is identified from the PXE message received from the service management port, so that the smart network card is installed based on the fourth PXE message; the service management port and the second PXE server are connected through the second virtual local area network.
[0137] In an exemplary embodiment, the installation device 300 further includes a deletion module configured to:
[0138] In response to receiving the first instruction from the console, the virtual network card device and rule data are deleted; the console is used to send the first instruction to the smart network card when the host installation is completed.
[0139] In an exemplary embodiment, the virtual network card device creation module 301 is further configured to:
[0140] In response to receiving the second instruction from the console, a virtual network card device is created on the smart network card; the console is used to send the second instruction to the smart network card when the installation of the smart network card is completed.
[0141] Each module in the aforementioned device may be implemented in whole or in part through software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0142] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 9As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device (including the service management port) is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method of installation is implemented.
[0143] Those skilled in the art will understand that Figure 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0144] In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.
[0145] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0146] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0147] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.
[0148] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0149] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A method for installing a machine, characterized in that: The method for applying a smart network card to an elastic bare metal server includes: Creating a virtual network card device on the smart network card; the host in the elastic bare metal server is used to send a first PXE message through the virtual network card device, and the first PXE message is used to request the target host installation resources from the first PXE server; Capturing the first PXE message forwarded by the virtual network card device, and sending the first PXE message to the first PXE server through the service management port of the smart network card; A second PXE message sent to the host is identified from the PXE message received by the service management port, and the second PXE message is sent to the host through the virtual network card device, so that the host performs installation based on the second PXE message.
2. The method according to claim 1, characterized in that The method further comprises: Capture a third PXE message and send the third PXE message to the second PXE server through the service management port of the smart network card; the third PXE message is used to request the target network card installation resources from the second PXE server.
3. The method according to claim 1 or 2, characterized in that Creating a virtual network card device on the smart network card includes: Adding rule data for capturing PXE messages on the data plane of the smart network card; the rule data includes the identifier of the virtual network card device; A power-on flag of the host is set, so that the host performs installation based on the second PXE message when the power-on flag is set.
4. The method according to claim 3, characterized in that The capturing of the first PXE message forwarded by the virtual network card device and sending the first PXE message to the first PXE server through the service management port of the smart network card includes: Based on the rule data, capturing the first PXE message forwarded by the virtual network card device; The first PXE message is added with an identifier of the first virtual local area network, and the first PXE message is sent to the first PXE server through the service management port of the smart network card; the service management port and the first PXE server are connected through the first virtual local area network.
5. The method according to claim 4, characterized in that The method further includes: identifying a second PXE message sent to the host from the PXE message received from the service management port, and sending the second PXE message to the host through the virtual network card device, including: Identifying, from the PXE message received by the service management port, a second PXE message including an identifier of the first virtual local area network; The identifier of the first virtual local area network in the second PXE message is deleted, and the second PXE message is sent to the host through the virtual network card device.
6. The method according to claim 5, characterized in that The method further comprises: A fourth PXE message including an identifier of a second virtual local area network is identified from the PXE message received by the service management port, so that the smart network card is installed based on the fourth PXE message; and the service management port is connected to the second PXE server through the second virtual local area network.
7. The method according to claim 3, characterized in that The method further includes: identifying a second PXE message sent to the host in the PXE message received from the service management port, and sending the second PXE message to the host through the virtual network card device, and then: In response to receiving a first instruction from the console, the virtual network card device and the rule data are deleted; the console is used to send the first instruction to the smart network card when the host installation is completed.
8. The method according to claim 1, characterized in that The step of creating a virtual network card device on the smart network card includes: In response to receiving a second instruction from the console, a virtual network card device is created on the smart network card; the console is used to send the second instruction to the smart network card when the installation of the smart network card is completed.
9. A mounting device, characterized in that: A smart network card (NIC) used in an elastic bare metal server (EBMS) includes: A virtual network card device creation module is configured to create a virtual network card device on the smart network card; the host in the elastic bare metal server is configured to send a first PXE message through the virtual network card device, and the first PXE message is configured to request target host installation resources from the first PXE server; a message sending module, configured to capture the first PXE message forwarded by the virtual network card device, and send the first PXE message to the first PXE server through the service management port of the smart network card; The message receiving module is configured to identify a second PXE message sent to the host from the PXE message received by the service management port, and send the second PXE message to the host through the virtual network card device, so that the host performs installation based on the second PXE message.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.