Installation method, system, device, storage medium and program product of operating system

CN117687639BActive Publication Date: 2026-10-27TENCENT CLOUD COMPUTING (BEIJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211080764.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-05
Publication Date
2026-10-27
Estimated Expiration
2042-09-05

AI Technical Summary

Technical Problem

通过这种方式完成智能网卡的操作系统安装,安装效率低

Benefits of technology

[0017]通过为智能网卡和裸金属物理机配置不同的节点,再根据目标安装方式(如由用户选择安装方式)对应的节点,调用安装单元对智能网卡和裸金属物理机的操作系统进行自动安装,从而提高了智能网卡的操作系统的安装效率。同时,由于支持智能网卡和裸金属物理机的操作系统的独立安装或组合安装,从而提高了操作系统的安装灵活性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117687639B_ABST
    Figure CN117687639B_ABST
Patent Text Reader

Abstract

The application discloses an installation method, system, device, storage medium and program product of an operating system, and belongs to the technical field of computers. The method comprises the following steps: a node management unit defines first node information corresponding to an intelligent network card and second node information corresponding to a bare metal physical machine; in the case that target node information comprises the first node information, a state machine calls a first installation unit to install the operating system of the intelligent network card; in the case that the target node information comprises the second node information, the state machine calls a second installation unit to install the operating system of the bare metal physical machine; and in the case that the target node information comprises the first node information and the second node information, the state machine calls the first installation unit and the second installation unit to respectively install the operating system of the intelligent network card and the bare metal physical machine. According to the application, different nodes are configured for the intelligent network card and the bare metal physical machine, and the operating system of the intelligent network card and the bare metal physical machine is automatically installed according to the nodes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to an operating system installation method, system, device, storage medium, and program product. Background Technology

[0002] Smart network interface cards (NICs), also known as smart network adapters, not only perform the network transmission functions of standard NICs, but also provide a built-in programmable and configurable hardware acceleration engine. Smart NICs can also run operating systems.

[0003] In related technologies, after installing the operating system on the smart network card, the operator inserts it into the bare-metal physical machine, ignoring the smart network card's existence during the operating system installation process. This method of installing the operating system on the smart network card is inefficient. Summary of the Invention

[0004] This application provides an operating system installation method, system, device, storage medium, and program product, which can improve the installation efficiency of smart network cards and the versatility of the smart network card installation method. The technical solution is as follows:

[0005] According to one aspect of the embodiments of this application, an operating system installation method is provided. The method is applied to an operating system installation system, which includes a state machine, a first installation unit, a second installation unit, a node management unit, and a database. The first installation unit is used to install the operating system of a smart network interface card (NIC), and the second installation unit is used to install the operating system of a bare-metal physical machine. The smart NIC is installed on the bare-metal physical machine. The method includes:

[0006] The node management unit defines and manages node information, wherein the node information includes first node information corresponding to the smart network card and second node information corresponding to the bare metal physical machine, and the first node information and the second node information are different;

[0007] The database stores the node information;

[0008] The state machine installs the operating system according to the target node information corresponding to the target installation method, wherein the target installation method refers to the operating system installation method selected by the user; when the target node information includes the first node information, the state machine calls the first installation unit to install the operating system of the smart network card; when the target node information includes the second node information, the state machine calls the second installation unit to install the operating system of the bare metal physical machine; when the target node information includes both the first node information and the second node information, the state machine calls the first installation unit and the second installation unit to install the operating systems of the smart network card and the bare metal physical machine respectively.

[0009] According to one aspect of the embodiments of this application, an operating system installation system is provided, the operating system installation system including a state machine, a first installation unit, a second installation unit, a node management unit, and a database; wherein, the first installation unit is used to install the operating system of a smart network interface card, the second installation unit is used to install the operating system of a bare metal physical machine, and the smart network interface card is installed on the bare metal physical machine;

[0010] The node management is used for unit definition and management of node information, wherein the node information includes first node information corresponding to the smart network card and second node information corresponding to the bare metal physical machine, and the first node information and the second node information are different;

[0011] The database is used to store the node information;

[0012] The state machine is used to install the operating system according to the target node information corresponding to the target installation method, wherein the target installation method refers to the operating system installation method selected by the user; when the target node information includes the first node information, the state machine is used to call the first installation unit to install the operating system of the smart network card; when the target node information includes the second node information, the state machine is used to call the second installation unit to install the operating system of the bare metal physical machine; when the target node information includes both the first node information and the second node information, the state machine is used to call the first installation unit and the second installation unit to install the operating systems of the smart network card and the bare metal physical machine respectively.

[0013] According to one aspect of the embodiments of this application, a computer device is provided, the computer device including a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the above-described operating system installation method.

[0014] According to one aspect of the embodiments of this application, a computer-readable storage medium is provided, wherein a computer program is stored in the storage medium, the computer program being loaded and executed by a processor to implement the above-described operating system installation method.

[0015] According to one aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the aforementioned operating system installation method.

[0016] The technical solution provided in this application can bring the following beneficial effects:

[0017] By configuring different nodes for smart network interface cards (NICs) and bare-metal physical machines, and then calling the installation unit to automatically install the operating systems for both NICs and bare-metal physical machines based on the target installation method (such as user-selected installation method), the installation efficiency of the smart NIC operating system is improved. Simultaneously, because it supports independent or combined installation of the operating systems for smart NICs and bare-metal physical machines, the installation flexibility of the operating system is enhanced.

[0018] In addition, the operating system installation system provided in this application embodiment can automatically install the operating system of smart network cards and bare metal physical machines, and supports independent or combined installation of the operating system of smart network cards and bare metal physical machines. This makes the operating system installation system applicable to any deployment scenario of bare metal physical machines with smart network cards, thereby improving the versatility of the operating system installation system and enabling the operating system installation system to be quickly replicated in different cloud projects (such as private cloud, public cloud, etc.). Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is an architecture diagram of an operating system installation system provided in one embodiment of this application;

[0021] Figure 2 This is a flowchart of an operating system installation method provided in one embodiment of this application;

[0022] Figure 3This is a schematic diagram of the operating system installation process chain provided in one embodiment of this application;

[0023] Figure 4 This is a schematic diagram of the independent installation process of the operating system of a smart network card provided in one embodiment of this application;

[0024] Figure 5 This is a schematic diagram of the independent installation process of the operating system for a bare metal physical machine according to one embodiment of this application;

[0025] Figure 6 This is a schematic diagram of the overall installation of the operating system of the smart network card and the operating system of the bare metal physical machine according to an embodiment of this application;

[0026] Figure 7 This is a schematic diagram of the structure of a computer device provided in one embodiment of this application. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0028] Before describing the embodiments of this application, the relevant terms involved in this application will be explained.

[0029] 1. HOST host: In this embodiment of the application, the HOST host refers to the host device in a bare metal physical machine with a smart network card, which is different from the host of the smart network card.

[0030] 2. Bare metal physical machine: also known as bare metal server, it is a computing service that combines the performance of elastic cloud server and physical machine, and can provide a dedicated physical server in the cloud.

[0031] 3. OS: Operating System.

[0032] 4. Smart Network Interface Card (NIC): Its core is to use an FPGA (Field-Programmable Gate Array) to assist the CPU (Central Processing Unit) of the bare-metal physical machine in handling network load. Smart NICs can also run an operating system.

[0033] 5. Management terminal: The central control terminal for smart network cards and bare metal physical machine clusters within the operating system installation system.

[0034] 6. Diskless Image: An image that is mounted directly on RAM (Random-Access Memory), such as a diskless image of an operating system.

[0035] 7. DHCP: Dynamic Host Configuration Protocol, which is mainly used for the centralized management and allocation of IP addresses (Internet Protocol Address), enabling hosts in the network environment to dynamically obtain IP addresses, gateway addresses, DNS (Domain Name System) server addresses, etc.

[0036] 8. TFTP: Trivial File Transfer Protocol, is a protocol in the TCP (Transfer Control Protocol) / IP protocol suite used for simple file transfer between clients and servers.

[0037] 9. DNS: A distributed network directory service, mainly used for the conversion between domain names and IP addresses.

[0038] 10. PXE: Preboot Execution Environment. It provides a mechanism for booting a computer using a network interface. This mechanism allows the computer to boot without relying on local data storage devices. Instead, it achieves this by using network protocols such as DHCP and TFTP, as well as concepts such as globally unique identifiers, general network driver interfaces, and universally unique identification codes. It also extends the pre-defined API (Application Programming Interface) through the bare metal physical machine firmware.

[0039] 11. Out-of-band Management: Network management can be divided into two modes: out-of-band management and in-band management. In-band management: Management control information and data information are transmitted using a unified physical channel. For example, both data and management information can be transmitted through the Ethernet port of a network device. Out-of-band management: The core concept of out-of-band management is to transmit management control information and data information through different physical channels; the two are completely independent and do not affect each other.

[0040] Please refer to Figure 1This diagram illustrates the architecture of an operating system installation system according to an embodiment of this application. The operating system installation system may include: a state machine 101, a first installation unit 102, a second installation unit 103, a node management unit 104, a database 105, a shared IP management unit 106, and an out-of-band management unit 107. The operating system installation system can be a distributed architecture system, meaning that the state machine 101, first installation unit 102, second installation unit 103, node management unit 104, database 105, shared IP management unit 106, and out-of-band management unit 107 can be deployed in a distributed manner. The state machine 101, first installation unit 102, second installation unit 103, node management unit 104, database 105, shared IP management unit 106, and out-of-band management unit 107 can be deployed at the management end of the operating system installation system.

[0041] State machine 101 is responsible for the flow between preset processes corresponding to the operating system installation system. For example, state machine 101 can transfer processes according to preset processes based on control signals. In one example, state machine 101 is configured with a state machine table, which allows state machine 101 to control the flow of multiple processes; the state machine table includes device identifiers (such as the identifiers of smart network cards and bare metal physical machines), the current process (i.e., the currently executing preset process), the return result of the current process, the next process, and the preset process corresponding to the state machine. State machine 101 can implement process flow functionality through state transition control processes.

[0042] In this embodiment, the preset process corresponding to state machine 101 may include: a node initialization process, a node identification process (i.e., the third process hereinafter), a first process, and a second process. State machine 101 may sequentially transition between the node initialization process, the node identification process, the first process, and the second process. Optionally, state machine 101 may also selectively transition between some processes. For example, state machine 101 may transition only between the node initialization process, the node identification process, and the first process, or it may transition only between the node initialization process, the node identification process, and the second process. This embodiment does not limit this.

[0043] The node initialization process is used to initialize the node information of the device. For example, state machine 101 executes the node initialization process to call node management unit 104 to define both the smart network card and the bare metal physical machine as nodes for management.

[0044] The node identification process is used to identify node information in order to determine the node corresponding to the node information. For example, state machine 101 executes the node identification process to call the node identification unit ( Figure 1(Not shown in the image) The target node information for the target installation method is identified to obtain the node corresponding to the target installation method. The target installation method can refer to the operating system installation method selected by the user. In this embodiment, the operating system installation method can include automatic installation of the operating system of the smart network card, automatic installation of the operating system of the bare metal physical machine, and overall installation of the operating systems of both the smart network card and the bare metal physical machine.

[0045] The first process is used to call the first installation unit 102 to install the operating system of the smart network card. In this embodiment of the application, the first process may include the following sub-processes: network card entering PXE sub-process, FPGA inspection and upgrade sub-process, smart network card unloading electronic process, smart network card loading electronic process, first operating system installation sub-process, first operating system configuring network card sub-process, first operating system restart sub-process, and first network card configuration sub-process.

[0046] The process includes three sub-processes: Network Card Entering PXE Sub-process for entering the PXE process to download and load the diskless images of the kernel and operating system; FPGA Check and Upgrade Sub-process, Smart Network Card Offline Electronic Process, and Smart Network Card Online Electronic Process for upgrading the FPGA; First Operating System Installation Sub-process for installing the operating system; First Operating System Network Card Configuration Sub-process for binding the network card to the smart network interface; First Operating System Reboot Sub-process for rebooting the smart network card; and First Network Card Configuration Sub-process for restricting the ports and services of the smart network card to free up IP addresses for use by the bare metal physical machine and prevent the smart network card and its services from interfering with the host.

[0047] The second process is used to call the second installation unit 103 to install the operating system of the bare metal physical machine (such as the HOST host of the bare metal physical machine). The second process may include the following sub-processes: bare metal physical machine initialization into PXE sub-process, second operating system installation sub-process, second operating system network card configuration sub-process, second operating system restart sub-process, and second network card configuration sub-process.

[0048] The bare-metal physical machine initialization PXE sub-process is used to enter the PXE process to download and load the diskless images of the kernel and operating system. The second operating system installation sub-process is used to perform the operating system installation. The second operating system network card configuration sub-process is used to configure IP addresses for the bare-metal physical machine's network cards. The second network card configuration sub-process is used to release IP addresses for sharing with smart network cards.

[0049] For example, the data structure of the status table can be as follows:

[0050] {Device: <Device Name>, Current Process: <Current Process>, Return Result of Current Process: <Return Result>, Next Process: <Next Process>, All Processes: <All Process Links from Start to End>}.

[0051] The first installation unit 102 is used to install the operating system of the smart network interface card (NIC). Exemplarily, guided by the first process, the first installation unit 102 installs the operating system of the smart NIC. The second installation unit 103 is used to install the operating system of the bare metal physical machine. Exemplarily, guided by the second process, the second installation unit 103 installs the operating system of the bare metal physical machine. The smart NIC is installed on the bare metal physical machine. For example, the server of the operating system installation system can be deployed with multiple bare metal physical machines. Taking bare metal physical machine 108 as an example, a smart NIC 109 can be installed on bare metal physical machine 108, and a HOST host 110 is configured in bare metal physical machine 108. Optionally, during the deployment phase of bare metal physical machine 108, neither the smart NIC 109 nor the HOST host 110 has an operating system installed.

[0052] The node management unit 104 is used to define nodes for smart network interface cards (NICs) and bare metal physical machines, generate node information corresponding to the nodes, and manage the node information. For example, for the bare metal physical machine 108, the node management unit 104 configures a first node for the smart NIC 109 and a second node for the HOST host 110 (i.e., the bare metal physical machine 108). The attributes of the first node and the second node are different, and both can be managed independently out-of-band. The first node information corresponding to the first node is different from the second node information corresponding to the second node. In this embodiment, each device corresponds to one node, and the node can serve as a unique identifier for each device.

[0053] In one example, node information may include: a unique identifier for the smart network card or bare metal physical machine, associated device, machine serial number, manufacturer model, out-of-band IP, out-of-band user, out-of-band password and operating system identifier, as well as the current step, status and time of the current step corresponding to the node.

[0054] The associated device for a smart network interface card (NIC) can be the bare-metal physical machine on which the NIC is installed, and the associated device for the bare-metal physical machine can be the smart NIC installed on that machine. The machine serial number and manufacturer model are the factory identifiers for the corresponding device. The out-of-band IP address, out-of-band user ID, and out-of-band password can be used to power on, power off, and restart the corresponding device.

[0055] For example, the format of node information can be as follows (node ​​is a node):

[0056] {node: <name of the smart network interface or host>,

[0057] attribute: {nodetype: <intelligent online class or HOST host>, peerdevice: <related device>,

[0058] arch: <architecture>, serial: <machine serial number>

[0059] bmcip: <out-of-band IP>, bmcuser: <out-of-band user>, bmcpasswd: <out-of-band password>

[0060] currentqueue: <current step>, currentstate: <state of the current step>, currtime = <time>.

[0061] model: <manufacturer model>, os: <OS to be installed>}}.

[0062] Database 105 is used to store data corresponding to the operating system installation system. For example, database 105 can be used to store and retrieve node information.

[0063] The shared IP management unit 106 is used to configure IPs for smart network interface cards (NICs) and bare-metal physical machines. In one example, the shared IP management unit 106 includes a NIC configuration toolkit and a shared IP allocation policy; wherein, the NIC configuration toolkit includes an FPGA upgrade tool, a smart NIC bonding script, and a bare-metal physical machine NIC configuration tool. The FPGA upgrade tool is used for FPGA upgrades. The smart NIC bonding script is used for configuring the NICs of smart NICs. The bare-metal physical machine NIC configuration tool is used for configuring the NICs of bare-metal physical machines.

[0064] The shared IP allocation policy is used to instruct smart network interface cards (NICs) and bare metal physical machines to share a single IP address. Smart NICs and bare metal physical machines are represented by different fields in the node information.

[0065] For example, the node information of a smart network interface card (NIC) can be:

[0066] {node: <name of the smart network interface>, attribute: {nodetype: smart network interface, ip: <ip>}}.

[0067] The node information of the bare metal physical machine (i.e., HOST) may be:

[0068] {node: <name of the HOST>, attribute: {nodetype: HOST, nicip: <ip>}}.

[0069] The out-of-band management unit 107 is used for power management of the smart network interface card (NIC) and the bare metal physical machine. Exemplarily, the out-of-band management unit 107 can perform power management on the smart NIC and the bare metal physical machine according to an out-of-band management protocol (such as IPMI (Intelligent Platform Management Interface) protocol), including functions such as powering on, powering off, checking power status, and setting up network boot. In this embodiment, the smart NIC and the bare metal physical machine are powered independently and have their own corresponding command sets. The state machine 101 determines whether to execute out-of-band commands from the smart NIC or the bare metal physical machine based on the node.

[0070] Optionally, the operating system installation system may also include a TFTP server, a DHCP server, and an HTTP server. The TFTP server stores the diskless image of the operating system, the DHCP server records the IP address of the TFTP server and the location of the diskless image, and the HTTP server stores the operating system. The diskless image is used to install the operating system on the smart network interface card (NIC) or bare-metal physical machine, and the diskless image can run in memory. The operating system installation system may also include a DNS server. The operating system installation system can use the TFTP server, DHCP server, HTTP server, and DNS server to initiate batch operation commands on all bare-metal physical machines in the bare-metal physical machine cluster.

[0071] In summary, the technical solution provided in this application improves the installation efficiency of the operating system for the smart network interface card (NIC) by configuring different nodes for the smart NIC and the bare metal physical machine, and then calling the installation unit to automatically install the operating system for the smart NIC and the bare metal physical machine according to the node corresponding to the target installation method (such as user-selected installation method). Furthermore, it enhances the installation flexibility of the operating system by supporting independent or combined installation of the operating systems for the smart NIC and the bare metal physical machine.

[0072] In addition, the operating system installation system provided in this application embodiment can automatically install the operating system of smart network cards and bare metal physical machines, and supports independent or combined installation of the operating system of smart network cards and bare metal physical machines. This makes the operating system installation system applicable to any deployment scenario of bare metal physical machines with smart network cards, thereby improving the versatility of the operating system installation system and enabling the operating system installation system to be quickly replicated in different cloud projects (such as private cloud, public cloud, etc.).

[0073] The following are embodiments of the method of this application. For details not described in the embodiments of the method of this application, please refer to the embodiments of the system of this application.

[0074] Please refer to Figure 2 This document illustrates a flowchart of an operating system installation method according to an embodiment of this application. This method can be applied to the operating system installation system described in the above embodiments. The method may include the following steps (201-203):

[0075] Step 201: The node management unit defines and manages node information, which includes first node information corresponding to the smart network card and second node information corresponding to the bare metal physical machine. The first node information and the second node information are different.

[0076] Optionally, the state machine can execute a node initialization process to call the node management unit to define the smart network card as the first node and the bare metal physical machine as the second node, and set the corresponding node information for the first and second nodes respectively, thereby obtaining the first node information and the second node information. The state machine, node management unit, and node information are the same as those described in the above embodiments. For content not described in the embodiments of this application, please refer to the above embodiments, and they will not be repeated here.

[0077] Optionally, the node information can be generated after the user selects the operating system installation method, or it can be generated before the user selects the operating system installation method. This application embodiment does not limit this.

[0078] Since smart network interface cards (NICs) and bare-metal physical machines are defined as different nodes, this application provides three operating system installation methods. (Reference) Figure 3 The first installation method 301 is as follows: the first process is executed in sequence, namely: network card entering PXE subprocess, FPGA check and upgrade subprocess, smart network card offline process, smart network card online process, first operating system installation subprocess, first operating system network card configuration subprocess, first operating system restart subprocess and first network card configuration subprocess, to complete the independent installation of the smart network card's operating system.

[0079] The second installation method 302 involves sequentially executing the following five sub-processes corresponding to the second process: bare-metal physical machine initialization into PXE, second operating system installation, second operating system network card configuration, second operating system reboot, and second network card configuration, to complete the independent installation of the operating system on the bare-metal physical machine. It should be noted that before executing the second installation method, the smart network card's PXE interface needs to be disabled to release IP addresses to the bare-metal physical machine. After executing the second installation method, the smart network card's PXE interface will be re-enabled.

[0080] The third installation method 303 is as follows: First, execute the first process to complete the independent installation of the operating system of the smart network card, and then execute the second process to complete the independent installation of the operating system of the bare metal physical machine, thereby realizing the overall installation of the operating system of the smart network card and the bare metal physical machine.

[0081] Step 202: The database stores node information.

[0082] The node management unit can send the first node information and the second node information to the database for storage, so that they can be used in the subsequent operating system installation process.

[0083] Step 203: The state machine installs the operating system according to the target node information corresponding to the target installation method, wherein the target installation method refers to the operating system installation method selected by the user; if the target node information includes first node information, the state machine calls the first installation unit to install the operating system of the smart network card; if the target node information includes second node information, the state machine calls the second installation unit to install the operating system of the bare metal physical machine; if the target node information includes both first and second node information, the state machine calls the first installation unit and the second installation unit to install the operating systems of the smart network card and the bare metal physical machine, respectively.

[0084] The target installation method can refer to the operating system installation method chosen by the user, developer, designer, etc., and can be any of the three installation methods mentioned above. Target node information refers to the node information corresponding to the nodes required for execution by the target installation method.

[0085] In one example, the operating system installation system also includes a node identification unit, and the preset process corresponding to the state machine includes a third process (i.e., the node identification process mentioned above). The node information identification process can be as follows: the state machine executes the third process to call the node identification unit to identify the target node information and obtain the node corresponding to the target node information; the state machine then installs the operating system based on the node corresponding to the target node information. For example, the state machine can install the operating system based on the device (i.e., a smart network card or a bare metal physical machine) corresponding to the node.

[0086] If the target node information includes the first node information, it indicates that the user has selected the first installation method 301 mentioned above. The state machine executes the first process 401 to call the first installation unit to install the operating system of the smart network card, refer to... Figure 4 The operating system installation process can be as follows:

[0087] 1. Execute the PXE sub-process of the network card: Use the first out-of-band command corresponding to the smart network card to operate the first node, causing the smart network card to enter the PXE process, download and load the kernel and diskless image, and store the kernel and diskless image in the memory system. Optionally, it can be further verified whether to install the operating system on the smart network card.

[0088] 2. Perform FPGA check and upgrade sub-process: If the smart network card supports FPGA, check the FPGA version. If the FPGA needs to be upgraded, download the FPGA upgrade tool and perform the FPGA upgrade; otherwise, do not perform the FPGA upgrade.

[0089] 3. Execute the electronic down-process and electronic up-process of the smart network card: After the FPGA upgrade is completed, power down and power up the smart network card to make the hardware upgrade effective.

[0090] 4. Execute the first operating system installation sub-process: Initiate PXE installation again on the smart network card, download the diskless image of the operating system, and write it to the hard drive.

[0091] 5. Execute the first operating system network card configuration process: obtain the smart network card's binding script (i.e., Bond script) and the IP attributes corresponding to the first node, and configure the Bonding for the smart network card.

[0092] 6. Execute the first operating system restart sub-process: Activate the operating system of the smart network card and complete the installation.

[0093] 7. Execute the first network card configuration sub-process: Write Ebtables (a network packet filtering configuration tool) rules to restrict the operating system ports and services of the smart network card, and disable Eth0 (fiber optic Ethernet interface card). Since the smart network card and the bare metal physical machine share an IP address, this configuration can prevent the smart network card's network card and services from interfering with the bare metal physical machine when the bare metal physical machine initiates a PXE installation.

[0094] If the target node information includes the second node information, it indicates that the user has selected the second installation method 302 mentioned above. The state machine executes the first process 402 to call the second installation unit to install the operating system of the bare metal physical machine, see reference. Figure 5 The operating system installation process can be as follows:

[0095] 1. Execute the bare-metal physical machine initialization PXE sub-process: Use the second out-of-band command corresponding to the bare-metal physical machine to operate the second node, causing the bare-metal physical machine to enter the PXE process, download and load the kernel and diskless image, and store the kernel and diskless image in the memory system. Optionally, it can be further verified whether to install the operating system on the bare-metal physical machine.

[0096] 2. Perform the second operating system installation sub-process: Download the diskless image of the operating system, write it to the hard drive, and then install the operating system on the host of the bare metal physical machine.

[0097] 3. Execute the second operating system network card configuration process: Obtain the network card configuration tool of the HOST host and the IP attributes of the second node, and configure the IP for the network card of the HOST host.

[0098] 4. Execute the second operating system restart sub-process: Activate the operating system of the bare metal physical machine and complete the installation.

[0099] 5. Execute the second network card configuration sub-process: After completing the HOST host health check, since the smart network card and the HOST host share the same IP, Eth0 needs to be enabled for the smart network card.

[0100] Optionally, before executing the second process, the state machine executes the first network card release sub-process to stop the smart network card from entering the PXE network card; after executing the second process, the state machine executes the second network card release sub-process to reopen the smart network card from entering the PXE network card.

[0101] If the target node information includes both the first and second node information, it indicates that the user has selected the third installation method 303. After executing the first process 401, the state machine executes the second process 402. This involves calling the first installation unit to install the operating system of the smart network card, and then calling the second installation unit to install the operating system of the bare metal physical machine. (See reference...) Figure 6 The operating system installation process can be as follows:

[0102] 1. Execute the first process 401 to complete the installation of the operating system for the smart network card and stop Eth0 to release the IP.

[0103] 2. Execute the second process 402 to complete the operating system installation on the bare metal physical machine and enable Eth0 for the smart network card to share the IP.

[0104] The state machine can call the out-of-band management unit to independently power on, power off, and restart the smart network card and the bare metal physical machine based on the out-of-band IP, out-of-band user, and out-of-band password in the node information.

[0105] In summary, the technical solution provided in this application improves the installation efficiency of the operating system for the smart network interface card (NIC) by configuring different nodes for the smart NIC and the bare metal physical machine, and then calling the installation unit to automatically install the operating system for the smart NIC and the bare metal physical machine according to the node corresponding to the target installation method (such as user-selected installation method). Furthermore, it enhances the installation flexibility of the operating system by supporting independent or combined installation of the operating systems for the smart NIC and the bare metal physical machine.

[0106] In addition, the operating system installation system provided in this application embodiment can automatically install the operating system of smart network cards and bare metal physical machines, and supports independent or combined installation of the operating system of smart network cards and bare metal physical machines. This makes the operating system installation system applicable to any deployment scenario of bare metal physical machines with smart network cards, thereby improving the versatility of the operating system installation system and enabling the operating system installation system to be quickly replicated in different cloud projects (such as private cloud, public cloud, etc.).

[0107] Please refer to Figure 7 This illustration shows a schematic diagram of a computer device according to an embodiment of this application. The computer device can be any electronic device with data computing, processing, and storage functions, and can be used to implement the operating system installation method provided in the above embodiments. Specifically, it can include the following:

[0108] The computer device 700 includes a central processing unit (such as a CPU, GPU, or FPGA) 701, a system memory 704 including RAM (Random-Access Memory) 702 and ROM (Read-Only Memory) 703, and a system bus 705 connecting the system memory 704 and the central processing unit 701. The computer device 700 also includes a basic input / output system (I / O system) 706 to facilitate information transfer between various devices within the server, and a large-capacity storage device 707 for storing the operating system 713, application programs 714, and other program modules 715.

[0109] In some embodiments, the basic input / output system 706 includes a display 708 for displaying information and an input device 709 for user input, such as a mouse or keyboard. Both the display 708 and the input device 709 are connected to the central processing unit 701 via an input / output controller 710 connected to the system bus 705. The basic input / output system 706 may also include the input / output controller 710 for receiving and processing input from multiple other devices such as a keyboard, mouse, or electronic stylus. Similarly, the input / output controller 710 also provides output to a display screen, printer, or other types of output devices.

[0110] The mass storage device 707 is connected to the central processing unit 701 via a mass storage controller (not shown) connected to the system bus 705. The mass storage device 707 and its associated computer-readable media provide non-volatile storage for the computer device 700. That is, the mass storage device 707 may include computer-readable media (not shown) such as a hard disk or a CD-ROM (Compact Disc Read-Only Memory) drive.

[0111] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented using any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media include RAM, ROM, EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory or other solid-state storage technologies, CD-ROM, DVD (Digital Video Disc) or other optical storage, magnetic tape cassettes, magnetic tape, disk storage, or other magnetic storage devices. Of course, those skilled in the art will recognize that the computer storage medium is not limited to the above-mentioned types. The system memory 704 and mass storage device 707 described above can be collectively referred to as memory.

[0112] According to embodiments of this application, the computer device 700 can also be connected to a remote computer on a network, such as the Internet, for operation. That is, the computer device 700 can be connected to a network 712 via a network interface unit 711 connected to the system bus 705, or it can use the network interface unit 711 to connect to other types of networks or remote computer systems (not shown).

[0113] The memory also includes a computer program stored in the memory and configured to be executed by one or more processors to implement the above-described operating system installation method.

[0114] In one exemplary embodiment, a computer-readable storage medium is also provided, wherein a computer program is stored therein, which, when executed by a processor, implements the above-described method for installing the operating system.

[0115] Optionally, the computer-readable storage medium may include: ROM (Read-Only Memory), RAM (Random-Access Memory), SSD (Solid State Drives), or optical disc, etc. The random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).

[0116] In one exemplary embodiment, a computer program product or computer program is also provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the above-described operating system installation method.

[0117] It should be noted that all information (including but not limited to object device information, object personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application have been authorized by the object or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the operating system, smart network card, and bare metal physical machine involved in this application were all obtained under full authorization.

[0118] It should be understood that "multiple" as used herein refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. Furthermore, the step numbers described herein are merely illustrative of one possible execution order. In some other embodiments, the steps may not be executed in the order shown in the figures, such as two steps with different numbers being executed simultaneously, or two steps with different numbers being executed in the reverse order of the figures. This application does not limit this.

[0119] The above description is merely an exemplary embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.< / ip> < / ip>

Claims

1. A method for installing an operating system, characterized in that, The method is applied to an operating system installation system, which is a distributed architecture system. The operating system installation system includes a state machine, a first installation unit, a second installation unit, a node management unit, and a database. The first installation unit is used to install the operating system for the smart network interface card (NIC), and the second installation unit is used to install the operating system for the bare-metal physical machine. The smart NIC is installed on the bare-metal physical machine. The method includes: The node management unit defines and manages node information, wherein the node information includes first node information corresponding to the smart network card and second node information corresponding to the bare metal physical machine. The first node information and the second node information are different. The smart network card and the bare metal physical machine share an Internet Protocol IP address. The smart network card and the bare metal physical machine are represented by different fields in the node information. The database stores the node information; The state machine installs the operating system according to the target node information corresponding to the target installation method, wherein the target installation method refers to the operating system installation method selected by the user. The preset process corresponding to the state machine includes a first process and a second process. When the target node information includes the first node information, the state machine executes the first process to call the first installation unit to install the operating system of the smart network card. When the target node information includes the second node information, the state machine executes the second process to call the second installation unit to install the operating system of the bare metal physical machine. When the target node information includes both the first node information and the second node information, the state machine executes the second process after executing the first process to call the first installation unit to complete the installation of the operating system of the smart network card, and then call the second installation unit to install the operating system of the bare metal physical machine.

2. The method according to claim 1, characterized in that, The first process includes: network card entering the pre-boot execution environment PXE sub-process, field programmable gate array (FPGA) inspection and upgrade sub-process, smart network card offline process, smart network card online process, first operating system installation sub-process, first operating system network card configuration sub-process, first operating system restart sub-process, and first network card configuration sub-process; The second process includes: the bare metal physical machine initialization into PXE subprocess, the second operating system installation subprocess, the second operating system network card configuration subprocess, the second operating system restart subprocess, and the second network card configuration subprocess.

3. The method according to claim 2, characterized in that, Before the state machine executes the second process to call the second installation unit to install the operating system of the bare metal physical machine, it further includes: The state machine executes the first network card release sub-process to stop the smart network card from entering the PXE network card; After the state machine executes the second process to call the second installation unit to install the operating system of the bare metal physical machine, it further includes: The state machine executes the second network card release sub-process to reopen the smart network card into the PXE network interface.

4. The method according to claim 1, characterized in that, The operating system installation system further includes a node identification unit, and the preset process corresponding to the state machine further includes a third process; the state machine installs the operating system according to the target node information corresponding to the target installation method, including: The state machine executes the third process to call the node identification unit to identify the target node information and obtain the node corresponding to the target node information; The state machine installs the operating system based on the node corresponding to the target node information.

5. The method according to claim 1, characterized in that, The operating system installation system also includes a Simple File Transfer Protocol (TFTP) server, a Dynamic Host Configuration Protocol (DHCP) server, and a Hypertext Transfer Protocol (HTTP) server. The TFTP server stores a diskless image of the operating system, the DHCP server records the IP address of the TFTP server and the location of the diskless image, and the HTTP server stores the operating system. The diskless image is used to install the operating system of the smart network card or the bare metal physical machine.

6. The method according to claim 1, characterized in that, The operating system installation system also includes a shared IP management unit, which includes a network card configuration toolkit and a shared IP allocation policy. The network card configuration toolkit includes an FPGA upgrade tool, a binding script for the smart network card, and a network card configuration tool for the bare metal physical machine. The shared IP allocation policy is used to instruct the smart network card and the bare metal physical machine to share a single IP address.

7. The method according to any one of claims 1 to 6, characterized in that, The node information includes: the unique identifier of the smart network card or the bare metal physical machine, the associated device, the machine serial number, the manufacturer model, the out-of-band IP, the out-of-band user, the out-of-band password and the operating system identifier, as well as the current step, the status and time of the current step corresponding to the node.

8. The method according to any one of claims 1 to 6, characterized in that, The method further includes: The state machine calls the out-of-band management unit to independently power on, power off, and restart the smart network card and the bare metal physical machine based on the out-of-band IP, out-of-band user, and out-of-band password in the node information.

9. The method according to any one of claims 1 to 6, characterized in that, The state machine is configured with a state machine table, and the state machine table controls the flow of multiple processes according to the state machine table; The state machine table includes the device identifier, the current process, the return result of the current process, the next process, and the preset process corresponding to the state machine.

10. An operating system installation system, characterized in that, The operating system installation system is a distributed architecture system, which includes a state machine, a first installation unit, a second installation unit, a node management unit, and a database; wherein, the first installation unit is used to install the operating system of the smart network card, the second installation unit is used to install the operating system of the bare metal physical machine, and the smart network card is installed on the bare metal physical machine; The node management is used for unit definition and management of node information. The node information includes first node information corresponding to the smart network card and second node information corresponding to the bare metal physical machine. The first node information and the second node information are different. The smart network card and the bare metal physical machine share an Internet Protocol IP. The smart network card and the bare metal physical machine are represented by different fields in the node information. The database is used to store the node information; The state machine is used to install the operating system according to the target node information corresponding to the target installation method, wherein the target installation method refers to the operating system installation method selected by the user. The preset process corresponding to the state machine includes a first process and a second process. When the target node information includes the first node information, the state machine is used to execute the first process to call the first installation unit to install the operating system of the smart network card. When the target node information includes the second node information, the state machine is used to execute the second process to call the second installation unit to install the operating system of the bare metal physical machine. When the target node information includes both the first node information and the second node information, the state machine is used to execute the second process after executing the first process to call the second installation unit to install the operating system of the bare metal physical machine after the first installation unit has completed the installation of the operating system of the smart network card.

11. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program that is loaded and executed by the processor to implement the method for installing the operating system as described in any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which is loaded and executed by a processor to implement the method for installing the operating system as described in any one of claims 1 to 9.

13. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium, and a processor reads from and executes the computer instructions to implement the method for installing the operating system as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Automatic server cluster deploying method and device

    CN104219099A

  • Method and system for automatically installing OS through cooperation of host and intelligent network card under Linux

    CN113918179A