A multi-system PXE installation method and device
By automatically generating PXE configuration files and automatically downloading the OS on multiple servers through an automated control device, the inefficiency caused by manual OS selection in existing technologies is solved, and efficient parallelization of multi-system PXE installation is achieved.
Patent Information
- Application Number
- CN202211372584.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-03
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2042-11-03
AI Technical Summary
When performing multi-system PXE installations on multiple servers, existing technologies require manual monitoring of the installation status of each server and selection of the system, resulting in low efficiency and difficulty in achieving high parallelism.
The system uses an automated control device to identify the target client group, generate a PXE configuration file, and instruct the server to complete the OS installation based on the server address. This avoids the need for users to select the OS from the system selection menu, as the PXE server automatically downloads and installs the OS.
It enables the coordination of OS installation progress across multiple servers without manual intervention, improving installation efficiency and achieving a high degree of time parallelism.
Smart Images

Figure CN115827072B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the computer technical field, and particularly relates to a multi-system PXE installation method and device. BACKGROUND
[0002] The installation methods of an operational system (OS) mainly include optical disc installation, universal serial bus flash disk (UFD) installation, image mounting installation and network boot installation. The optical disc installation, the UFD installation and the image mounting installation depend on the local data storage device and / or the local installed system of the computer to be installed with the OS. The network boot installation adopts a network boot technology to boot the computer from the network instead of the local data storage device, and can be used for routers, diskless workstations and the like. The preboot execution environment (PXE) network boot installation, referred to as PXE installation, enables the computer to start installing the system through the network according to a specific network protocol, and downloads the OS placed in the remote end to the local end for running through the network without depending on the local data storage device or the local installed system. The PXE installation also defines a mechanism for starting the computer using the network interface.
[0003] In the prior art, the scenarios of installing multiple OSs through the PXE installation, such as blade machines, high-density computer clusters, server racks and high-performance servers, face the demand that the OSs to be installed by the multiple servers may not be consistent, and thus manual monitoring of the installation on each server and manual selection of the required system to be installed are needed, which leads to manual intervention and low efficiency.
[0004] In summary, the problem to be solved at present is how to improve the efficiency of the multi-system PXE installation on multiple servers and avoid manual intervention. SUMMARY
[0005] Embodiments of the present application provide a multi-system PXE installation method and device, which are used to solve the problems in the prior art.
[0006] In a first aspect, the present application provides a method for installing an operating system (OS) by a pre-boot execution environment (PXE), which comprises: determining a target client group, wherein the target client group comprises at least one server without an installed OS, and the at least one server without an installed OS has the same OS to be installed; instructing a PXE server to generate a PXE configuration file, wherein the PXE configuration file comprises a configuration file of the OS to be installed of the servers in the target client group; obtaining addresses of the servers in the target client group; and instructing the servers in the target client group to complete OS installation according to the addresses.
[0007] By the first aspect of the present application, the problem that a user needs to select an OS to be installed on a system selection menu and then download the corresponding OS from a PXE server to a local computer for running according to the selected OS is avoided, so that the challenge of manual intervention and monitoring is overcome, and the installation progress of each computer (server) included in a PXE client can be coordinated, and thus high parallelization in time arrangement is achieved.
[0008] In a possible implementation manner of the first aspect of the present application, before the target client group is determined, the method comprises: obtaining installation information of all servers without an installed OS, wherein the installation information comprises a type and a version of the OS; determining at least two client groups according to the installation information, wherein each client group comprises at least one server without an installed OS, and the at least one server without an installed OS has the same type and version of the OS to be installed; and the determination of the target client group specifically comprises: determining the target client group from the at least two client groups.
[0009] In a possible implementation manner of the first aspect of the present application, the determination of the at least two client groups according to the installation information further comprises: determining installation time lengths of the OSs according to the installation information; determining installation sequences of the at least two client groups according to the installation time lengths, wherein the installation sequence of a client group with a longer installation time length of the OS is superior to that of a client group with a shorter installation time length of the OS; and the determination of the target client group from the at least two client groups specifically comprises: determining the target client group from the at least two client groups according to the installation sequences.
[0010] In a possible implementation manner of the first aspect of the present application, the obtaining of the installation information of all servers without an installed OS specifically comprises: obtaining the installation information of each server from all servers without an installed OS.
[0011] In a possible implementation manner of the first aspect of the present application, the obtaining of the installation information of all servers without an installed OS specifically comprises: obtaining the installation information of each server from a memory of a device running the method.
[0012] In a possible implementation of the first aspect of the present application, the installation information further includes an IP, a username and a password of the server.
[0013] In a possible implementation of the first aspect of the present application, the instructing the PXE server to generate the PXE configuration file specifically includes: sending an instruction to the PXE server, the instruction being used to instruct the PXE server to update a menu file in the PXE configuration file as a system menu file of an OS to be installed of a server in the target client group.
[0014] In a possible implementation of the first aspect of the present application, the obtaining the address of the server in the target client group to be installed with the OS specifically includes: obtaining machine addresses of all servers in the target client group through an out-of-band management protocol interface.
[0015] In a possible implementation of the first aspect of the present application, the instructing the server in the target client group to complete the OS installation according to the address specifically includes: sending an instruction to the server in the target client group according to the address, the instruction being used to instruct the server in the target client group to complete the OS installation; obtaining first information of the server in the target client group, the first information being used to identify whether the server in the target client group obtains the PXE configuration file; when all servers in the target client group have the PXE configuration file, the method further includes: determining a second client group, the second client group including at least one server to be installed with an OS, and the at least one server to be installed with the OS having the same OS to be installed; instructing the PXE server to generate a second PXE configuration file, the second PXE configuration file including configuration files of the OS to be installed of the server in the second client group; obtaining addresses of the servers in the second client group; and instructing the servers in the second client group to complete the OS installation according to the addresses.
[0016] In a possible implementation of the first aspect of the present application, the sending the instruction to the server in the target client group according to the address specifically includes: sending the instruction to the server in the target client group through an intelligent platform management interface (IPMI) command.
[0017] In a second aspect, the present application provides an automatic control device. The automatic control device is communicatively connected with a PXE server and a PXE client, and is configured to: determine a target client group, the target client group comprising at least one server without an operating system (OS) installed, and the at least one server without an OS installed having a same OS to be installed; instruct the PXE server to generate a PXE configuration file, the PXE configuration file comprising a configuration file of the OS to be installed of the servers in the target client group; acquire addresses of the servers in the target client group; and instruct the servers in the target client group to complete OS installation according to the addresses.
[0018] According to the second aspect of the present application, the problem that the OS to be installed is selected by a user on a system selection menu and then downloaded from the PXE server to a local device for running according to the selected OS is avoided, so that the challenge of manual intervention and monitoring is overcome, and the installation progress of each computer (server) included in the PXE client can be coordinated, and thus high parallelization in time arrangement is achieved.
[0019] In a possible implementation of the second aspect of the present application, before the target client group is determined, the automatic control device is further configured to: acquire installation information of all servers without an OS installed, the installation information comprising a type and a version of the OS; determine at least two client groups according to the installation information, each of the client groups comprising at least one server without an OS installed, and the at least one server without an OS installed having a same type and version of the OS to be installed; and determine the target client group from the at least two client groups.
[0020] In a possible implementation of the second aspect of the present application, the at least two client groups are determined according to the installation information, and the method further comprises: determining installation time lengths of the OS according to the installation information; determining installation sequences of the at least two client groups according to the installation time lengths, the installation sequence of a client group with a longer installation time length of the OS being superior to the installation sequence of a client group with a shorter installation time length of the OS; and determining the target client group from the at least two client groups according to the installation sequences.
[0021] In a possible implementation of the second aspect of the present application, the installation information of all servers without an OS installed is acquired, and the method further comprises: acquiring the installation information of each server from all servers without an OS installed.
[0022] In a possible implementation of the second aspect of the present application, the installation information of all servers without an OS installed is acquired, and the method further comprises: acquiring the installation information of each server from a memory of a device running the method.
[0023] In a possible implementation of the second aspect of the present application, the installation information further includes an IP, a username and a password of the server.
[0024] In a possible implementation of the second aspect of the present application, the instructing the PXE server to generate the PXE configuration file specifically includes: sending an instruction to the PXE server, the instruction being used to instruct the PXE server to update a menu file in the PXE configuration file to a system menu file of an OS to be installed of a server in the target client group.
[0025] In a possible implementation of the second aspect of the present application, the obtaining the address of the server in the target client group to be installed with the OS specifically includes: obtaining machine addresses of all servers in the target client group through an out-of-band management protocol interface.
[0026] In a possible implementation of the second aspect of the present application, the instructing the server in the target client group to complete the OS installation according to the address specifically includes: sending an instruction to the server in the target client group according to the address, the instruction being used to instruct the server in the target client group to complete the OS installation; obtaining first information of the server in the target client group, the first information being used to identify whether the server in the target client group obtains the PXE configuration file; when all the servers in the target client group have the PXE configuration file, the method further includes: determining a second client group, the second client group including at least one server to be installed with an OS, and the at least one server to be installed with the OS having the same OS to be installed; instructing the PXE server to generate a second PXE configuration file, the second PXE configuration file including configuration files of the OS to be installed of the servers in the second client group; obtaining addresses of the servers in the second client group; and instructing the servers in the second client group to complete the OS installation according to the addresses.
[0027] In a possible implementation of the second aspect of the present application, the sending the instruction to the server in the target client group according to the address specifically includes: sending the instruction to the server in the target client group through an intelligent platform management interface (IPMI) command.
[0028] In a third aspect, the present application provides a method for installing an operating system (OS) by a pre-boot execution environment (PXE). The method is applied to a PXE system, which comprises an automatic control device, a PXE server and a PXE client, wherein the PXE client comprises at least two servers. The method comprises the following steps: the automatic control device determines a first target client group, wherein the first target client group comprises at least one server without an installed OS, and the at least one server without an installed OS has the same OS to be installed; the automatic control device generates a PXE configuration file of the server, wherein the updated PXE configuration file comprises a configuration file of the OS to be installed of the server in the first target client group; the automatic control device acquires an address of the server in the first target client group; the automatic control device sends an instruction to the server in the first target client group according to the address, wherein the instruction is used to instruct the server in the first target client group to complete the installation of the OS by PXE; the server in the first target client group receives the instruction of the automatic control device; the server in the first target client group acquires the PXE configuration file from the server; and the server in the first target client group installs the OS according to the configuration file. After all the servers in the first target client group acquire the PXE configuration file, the automatic control device determines a second target client group, wherein the second target client group comprises at least one server without an installed OS, and the at least one server without an installed OS has the same OS to be installed; and the automatic control device updates the PXE configuration file of the server, wherein the updated PXE configuration file comprises a configuration file of the OS to be installed of the server in the second target client group.
[0029] In a possible implementation, the server in the first target client group installs the OS according to the configuration file, specifically comprising: the server in the first target client group performs an OS installation execution step; and the step of acquiring the PXE configuration file by all the servers in the first target client group is specifically performed in the process of the server in the first target client group performing the OS installation execution step.
[0030] In a possible implementation, the server in the first target client group performs the OS installation execution step, specifically comprising: S605-607.
[0031] In a possible implementation, the PXE server comprises a dynamic host configuration protocol (DHCP) service module, a trivial file transfer protocol (TFTP) service module and a file transfer protocol (FTP) service module, and the server in the first target client group acquires the PXE configuration file from the server, specifically comprising: steps S622-624.
[0032] In a possible implementation, after the automatic control device updates the server-side PXE configuration file, the method further includes: the automatic control device acquires the address of the server in the second target client group; and the automatic control device sends an instruction to the server in the second target client group according to the address, where the instruction is used to instruct the server in the second target client group to complete OS installation through PXE.
[0033] In a possible implementation, updating the PXE configuration file specifically includes: controlling the PXE server, and updating a menu file in the PXE configuration file to a system menu file of an OS to be installed by the server in the target client group.
[0034] In a possible implementation, the machine address of all servers in the target client group is acquired through an out-of-band management protocol interface.
[0035] In a possible implementation, the PXE start is performed on all servers in the target client group through an intelligent platform management interface (IPMI) command.
[0036] In a fourth aspect, an embodiment of the present application further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method according to any one of the implementation manners of any one of the preceding aspects when executing the computer program.
[0037] In a fifth aspect, an embodiment of the present application further provides a computer readable storage medium, which stores computer instructions, and the computer instructions make the computer device execute the method according to any one of the implementation manners of any one of the preceding aspects when the computer instructions are executed on the computer device.
[0038] In a sixth aspect, an embodiment of the present application further provides a computer program product, characterized by instructions stored in a computer readable storage medium, and the instructions make the computer device execute the method according to any one of the implementation manners of any one of the preceding aspects when the instructions are executed on the computer device. BRIEF DESCRIPTION OF DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0040] Figure 1 A schematic diagram of a PXE installation system provided by an embodiment of the present application;
[0041] Figure 2 A schematic diagram of a PXE installation method between a PXE server and a PXE client is provided for the embodiment of the present application.
[0042] Figure 3 A schematic diagram of a system selection menu is provided for the embodiment of the present application.
[0043] Figure 4 A schematic diagram of a multi-system PXE installation system is provided for the embodiment of the present application.
[0044] Figure 5 A schematic diagram of a PXE installation method is provided for the embodiment of the present application.
[0045] Figure 6 A schematic diagram of a PXE installation method is provided for the embodiment of the present application.
[0046] Figure 7 A schematic diagram of a PXE installation method is provided for the embodiment of the present application.
[0047] Figure 8 A schematic diagram of a PXE installation step is provided for the embodiment of the present application.
[0048] Figure 9 A PXE installation method is provided for the embodiment of the present application.
[0049] Figure 10 A schematic diagram of a computing device is provided for the embodiment of the present application. DETAILED DESCRIPTION
[0050] The embodiments of the present application will be described in further detail below with reference to the drawings.
[0051] It should be understood that in the description of the present application, "at least one" means one or more than one, and "multiple" means two or more than two. In addition, the words "first", "second", and the like, unless otherwise specified, are only used for the purpose of distinguishing the description, and cannot be understood as indicating or implying relative importance, nor indicating or implying sequence.
[0052] Figure 1 A schematic diagram of a PXE installation system is provided for the embodiment of the present application. As shown in the figure, the PXE installation system includes a PXE server and a PXE client. Figure 1As shown, PXE client 104 refers to at least one computer that needs to install one or more OSs, and PXE client 104 can refer to all computers that need to install OSs collectively. In the application scenarios of data center, workstations, etc., the computers that need to install OSs can be servers, and thus PXE client 104 can also refer to all servers that need to install OSs collectively. Here, the same OS refers to the same type and version of OS, and the same type but different versions of OSs, such as version A of M system and version B of M system, are also regarded as two OSs. PXE server 102 refers to a PXE server needed for PXE installation of the computers (servers) of PXE client 104.
[0053] With reference to the accompanying drawings further, Figure 1 PXE server 102 provides respective PXE installations for the computers (servers) included in PXE client 104. Specifically, a computer (server) of PXE client 104 initiates the entire PXE installation process through a client program, which is initiated in the boot ROM of the network card of the computer (server). Here, the boot ROM refers to a read-only memory (ROM) or write-protected flash memory embedded in a chip, which is used to execute the first code when power is turned on or reset, and thus is used for a remote boot system (RPL) including broadcasting of a boot request signal and establishing a connection to download boot data, etc. After the client program is initiated in the boot ROM of the network card of the computer (server) and completes the download of boot data, the control right is transferred from the boot ROM of the network card to a specific area in the memory. The Basic Input / Output System (BIOS) of the computer (server) calls the client program into the memory to execute and load the boot data, and then displays a system selection menu on the display terminal (e.g., a display) of the computer (server). After a user selects an OS to be installed on the system selection menu, the selected OS is used to guide the corresponding OS pre-uploaded or installed in PXE server 102 to run in the memory of the computer (server), and thus subsequent PXE installation is performed. Figure 1The PXE server 102 is used to provide the PXE installation for each computer (server) included in the PXE client 104. The PXE installation process is described in detail as follows. Figure 1 The PXE server 102 is used to provide the PXE installation for each computer (server) included in the PXE client 104. The PXE installation process is described in detail as follows. Figure 2 The PXE server 102 is used to provide the PXE installation for each computer (server) included in the PXE client 104. The PXE installation process is described in detail as follows.
[0054] Please refer to Figure 2 , Figure 2 The PXE server 102 is used to provide the PXE installation for each computer (server) included in the PXE client 104. The PXE installation process is described in detail as follows. Figure 2 The PXE server 201 provides the PXE installation for the PXE client 202. The PXE server 201 includes a DHCP service 204, a TFTP service 206 and an FTP service 208. The details of the services or protocols with the same names can be found in the references Figure 1 , which are not repeated here. Figure 2 The PXE installation process is shown in FIG. 2, which starts from step S210 and ends at step S228. Specifically, the PXE installation process includes the following steps.
[0055] Step S210: The PXE client requests an IP address from the DHCP service, and the DHCP service returns the IP address and the PXE file location.
[0056] After step S210, step S212 is executed.
[0057] Step S212: The PXE client requests prelinux.0 from the TFTP service, and the TFTP service sends prelinux.0.
[0058] After step S212, step S214 is executed.
[0059] Step S214: The PXE client runs prelinux.0. Thus, PXE client 202 starts the network card boot service by running the network card boot file.
[0060] After step S214, step S216 is executed.
[0061] Step S216: The PXE client requests the configuration prelinux.cfg from the TFTP service, and the TFTP service sends the configuration prelinux.cfg.
[0062] After step S216, step S218 is executed.
[0063] Step S218: The PXE client executes prelinux.cfg. Executing prelinux.cfg, the PXE configuration file, means that instructions are needed for subsequent OS kernel booting; therefore, the type and version of the OS to be installed need to be determined. Thus, in application scenarios where a single PXE server provides PXE installation for multiple servers and multiple systems, such as… Figure 1 The diagram illustrates how multiple computers (servers) containing PXE clients 104 are booted using the same PXE server 102. For example, a PXE server... Figure 2 Multiple operating systems are pre-uploaded or installed on the PXE server 201. If the OS to be installed is not the default OS installed on the computer (server), a system selection menu will be displayed, and the OS to be installed will be manually selected. This also means that the PXE server 201 needs to monitor the selection made after the system selection menu appears. Figure 3 This is a schematic diagram of a system selection menu provided in an embodiment of this application. Figure 3 As shown, the PXE boot menu 302 includes three options: Option 1, Install Operating System 310; Option 2, Install Operating System 320; and Option 3, Install Operating System 330. After obtaining prelinux.cfg, which is the PXE configuration file, the PXE client executes prelinux.cfg in step S218. At this time, the system selection menu is displayed, for example... Figure 3The PXE boot menu 302 is shown. If the user does not have any operation after the waiting time, for example, ten minutes, the default automatic execution option 1 to install the operating system 310 can be set. However, if the user needs to install other operating systems, for example, install the operating system 320, it needs to be manually selected before the waiting time expires. For example, it is assumed that Figure 3 The operating system 310 in the PXE boot menu 302 shown is CentOS 7.8, the operating system 320 is Redhat 8.0, and the operating system 330 is Ubuntu 20.04. Assuming that the user wants to install CentOS 7.8 which is automatically installed by default, no operation is needed after the system selection menu such as the PXE boot menu 302 is displayed; however, assuming that the user wants to install Redhat 8.0, it needs to be selected by using a keyboard, a mouse, a gesture capture device, or any suitable input device to select the installation of Redhat 8.0 for subsequent PXE installation. Therefore, when prelinux.cfg, that is, the PXE configuration file, is executed in step S218, the OS to be installed needs to be determined before booting the subsequent OS kernel. If the user selects the OS to be installed on the system selection menu and then downloads the corresponding OS from the PXE server 201 to the local according to the selected OS, it will bring challenges in manual intervention and monitoring, and it is also difficult to coordinate the installation progress of each computer (server) included in the PXE client 202, so it is also difficult to achieve high parallelization in time arrangement.
[0064] After step S218, step S220 is executed.
[0065] Step S220: The PXE client requests vmlinuz from the TFTP service, and the TFTP service sends vmlinuz.
[0066] After step S220, step S222 is executed.
[0067] Step S222: The PXE client requests initrd.img from the TFTP service, and the TFTP service sends initrd.img.
[0068] After step S222, step S224 is executed.
[0069] Step S224: The PXE client starts the linux kernel. From step S212 to step S222, files such as PXE boot files, menu files, kernel and drivers of the OS to be installed, etc. are obtained through the TFTP service, including prelinux.0, the network card boot file obtained through the TFTP service in step S212, prelinux.cfg, the PXE configuration file obtained through the TFTP service in step S216, vmlinuz, the executable kernel file obtained through the TFTP service in step S220, and initrd.img, the standardized memory simulation disk image obtained through the TFTP service in step S222. In step S224, the linux kernel is started to formally start the boot of the OS kernel. The linux kernel is the kernel of the Linux system, which is used to provide necessary hardware interaction and service support. Main modules or components of the linux kernel include storage management, process management, file system, device management and drivers, etc.
[0070] After step S224, step S226 is performed.
[0071] Step S226: The PXE client requests ks.cfg and the OS image from the FTP service, and the FTP service sends the ks.cfg and the OS image. As mentioned above, the FTP service is specially used for file transfer, and is suitable for cases where a large amount of programs and information needs to be accessed and obtained. Therefore, the PXE server 201 provides the FTP service so that the PXE client 202 can obtain large files such as the OS image to be installed and the automated installation system, etc. Here, ks.cfg is the automatic configuration file of the automated installation (KickStart) system, which includes typical installation options and installation parameter configurations, etc. The OS image is the image file of the OS to be installed.
[0072] After step S226, step S228 is performed.
[0073] Step S228: The PXE client executes and completes the OS installation. It can be seen that, depending on the OS to be installed determined in step S218 (when the PXE client executes prelinux.cfg, the PXE configuration file), the subsequently obtained vmlinuz (executable kernel file) and initrd.img (standardized memory-simulated disk image) are all based on the determined OS. Furthermore, the ks.cfg (automatic configuration file for the KickStart system) and OS image obtained via FTP service are also based on the determined OS. In other words, when prelinux.cfg (the PXE configuration file) is executed in step S218, the OS to be installed needs to be determined before starting the subsequent OS kernel boot. If the user selects the OS to be installed from the system selection menu and then downloads the corresponding OS from the PXE server 201 to run locally, it presents challenges in terms of manual intervention and monitoring, and makes it difficult to coordinate the installation progress of the various computers (servers) included in the PXE client 202, thus making it difficult to achieve high parallelism in the time schedule.
[0074] The specific documents mentioned in the embodiments of this application and their corresponding Chinese names and explanations are summarized in Table 1.
[0075] Table 1
[0076]
[0077] Figure 4 This is a schematic diagram of a multi-system PXE installation system provided in an embodiment of this application. Figure 4As shown, a method for pre-boot execution environment (PXE) installing an operating system (OS), the method is applied to a PXE installation system, the PXE system includes an automatic control device, a PXE server and a PXE client, the PXE client includes at least two servers, the method includes: the automatic control device determines a first target client group, the first target client group includes at least one server without an installed OS, and the at least one server without an installed OS has the same OS to be installed; the automatic control device updates a PXE configuration file of the server end, the updated PXE configuration file includes a configuration file of the OS to be installed of the server in the first target client group; the automatic control device acquires an address of the server in the first target client group; the automatic control device sends an instruction to the server in the first target client group according to the address, the instruction is used to instruct the server in the first target client group to complete OS installation through PXE; the server in the first target client group receives the instruction of the automatic control device; the server in the first target client group acquires the PXE configuration file from the server end; the server in the first target client group installs the OS according to the configuration file; wherein after all the servers in the first target client group acquire the PXE configuration file: the automatic control device determines a second target client group, the second target client group includes at least one server without an installed OS, and the at least one server without an installed OS has the same OS to be installed; the automatic control device updates the PXE configuration file of the server end, the updated PXE configuration file includes a configuration file of the OS to be installed of the server in the second target client group. The PXE server 102 and the PXE client 104 are included. The PXE server 102 and the PXE client 104 perform PXE installation based on the same PXE network protocol and through a PXE network 106.
[0078] As Figure 4As shown, the PXE installation system includes a PXE server 402, a PXE client 404, a PXE network 406, an automatic control device 401 and a management network 408. The PXE server 402 and the PXE client 404 are based on the same PXE network protocol and perform PXE installation through the PXE network 406. Specifically, the PXE client 404 represents at least one computer to be installed with one or more OSs, and the PXE client 404 can be used as a collective term for all computers to be installed with OSs. In application scenarios such as data centers, workstations, etc., the computers to be installed with OSs can be servers, and thus the PXE client 404 can also be used as a collective term for all servers to be installed with OSs. Here, the same OS refers to the same type and version of OS, and OSs of the same type but different versions, such as version A of M system and version B of M system, are also regarded as two OSs. The PXE server 402 refers to a PXE server required for PXE installation of the computers (servers) of the PXE client 404. The at least one computer included in the PXE client 404 can be divided into at least one client group, and these client groups can be distinguished by different client group numbers. Each client group refers to a collection of computers (servers) installed with a specific OS. Figure 4The PXE client 404 includes a client group 410, a client group 412, a client group 414, and a client group 416, as exemplarily shown in FIG. 4. The client group 410, the client group 412, the client group 414, and the client group 416 each correspond to an OS to be installed and each has at least one computer (server). For example, the client group 410 has three servers to install CentOS 7.8, the client group 412 has two servers to install Redhat 8.0, and the client group 414 has five servers to install Ubuntu 20.04. It should be understood that the PXE client 404 can include any number of computers (servers) and any number of client groups. The PXE server 402 performs PXE installation for the PXE client 404 through a PXE network 406. The PXE network 406 refers to a network for network boot installation of an OS. The PXE network 406 supports a specific network protocol and a specific network interface. The PXE network 406 and the supported network protocol enable the computers (servers) of the PXE client 404 to perform PXE installation through the PXE network 406, so that the computers (servers) can download the OS placed on the PXE server 402 through the PXE network 406 to run locally without relying on local data storage devices or locally installed systems of the computers (servers). The PXE server 402 includes a Dynamic Host Configuration Protocol (DHCP) service, a Trivial File Transfer Protocol (TFTP) service, and a File Transfer Protocol (FTP) service.
[0079] It should be understood that the client program described above is started in the boot ROM of the network card of the computer (server), where the network card should be understood broadly as a device that supports PXE installation and provides the necessary network communication functions and network interfaces of the computer (server) of the PXE client 104, and can be a network interface card, a network interface controller (NIC), a network interface controller, a network adapter, a LAN adapter, or any other device, which is not limited here. The multi-system PXE installation method and device provided by the embodiments of the present application are suitable for application scenarios where multiple OSs are to be installed, such as blade servers, high-density computer clusters, server racks, high-performance servers, and the like.
[0080] Continuing to refer to Figure 4As mentioned above, the PXE server 402 includes a DHCP service, a TFTP service, and an FTP service. These service modules or protocols included in the PXE server 402 support specific network protocols to provide individual PXE installations for the computers (servers) included in the PXE client 404 through the PXE server 402. Specifically, the DHCP service is used to automatically obtain an Internet Protocol Address (IP address) during the PXE installation process, for example, the PXE client 404 requests an IP address through the DHCP service and receives a returned IP address. The DHCP service and related network protocols allow the PXE server 402 to control IP address resources and manage assigned network parameters, and allow the computers of the PXE client 404 to automatically obtain assigned IP addresses and subnet masks, etc. when logging into the PXE server 402. The TFTP service is used to obtain PXE boot files, menu files, kernels and drivers of an OS to be installed, etc. during the PXE installation process. The TFTP service is used to provide file transfer services between the computers of the PXE client 404 and the PXE server 402. The TFTP service is generally based on a transport protocol optimized for small file transfers, such as the User Datagram Protocol (UDP). The TFTP service has a small code footprint and implements the functionality of obtaining or writing files from the PXE server 402, and is suitable for use in file transfer services that are not complex and have small transfer overheads. Therefore, the PXE server 402 provides the TFTP service to allow the PXE client 404 to obtain small files, such as PXE boot files, menu files, kernels and drivers of an OS to be installed, etc. The FTP service is used to obtain OS images and KickStart system configuration files during the PXE installation process. The FTP service is specifically used for file transfers, and is suitable for situations that require access to and obtaining of large programs and information. Therefore, the PXE server 402 provides the FTP service to allow the PXE client 404 to obtain large files, such as OS images to be installed and KickStart systems, etc. Referring back to Figure 4 , the PXE client 404 and the DHCP service, the TFTP service, and the FTP service therein are implemented through three different servers or modules.
[0081] Referring back to Figure 4The automatic control device 401 connects with the PXE client 404 through the management network 408, which is used for the automatic control device 401 to acquire or manage the OS information to be installed of each client group in the PXE client 404. The automatic control device 401 also accesses the PXE network 406 and monitors and controls the PXE installation process through the PXE network 406. Through the automatic control device 401, the problem that the user selects the OS to be installed on the system selection menu and then downloads the corresponding OS from the PXE server to the local according to the selected OS can be avoided, so that the challenge of manual intervention and monitoring is overcome, and the installation progress of each computer (server) included in the PXE client can be coordinated, and the time arrangement can be highly parallelized. This will be described in detail below. In addition, the automatic control device 401 can be a separate device, or can be in any suitable form of a computer, a processor, software, firmware, etc.
[0082] Figure 5 A PXE installation method provided by the embodiment of the present application is shown in the schematic diagram, which can be applied to the automatic control device 401 in the PXE installation system shown in Figure 4 The software logic running method of the automatic control device includes the following steps, as shown in Figure 5
[0083] Step S502: The automatic control device acquires input information, including the information of the OS to be installed of each server in the PXE client.
[0084] In step S502, the installation information of each server. Optionally, the installation information can also include the authorization information of the management IP, the username and the password of each server.
[0085] It should be noted that the automatic control device 401 can acquire the installation information of each server from the PXE client 404 through the management network 408. Optionally, the installation information of each server in the PXE client 404 can also be preset in the memory of the automatic control device 401.
[0086] Step S504: The automatic control device determines the target client group.
[0087] At step S504, the plurality of servers can be divided into a plurality of customer groups according to the input information. Each customer group refers to a set of servers installed with the same OS (including the same version). Then a target customer group is determined, which can be any one of the customer groups without installed OS or the first one in a specific order. The specific order can be any suitable order, for example, determined according to the installation time of the OS, the number of servers in the customer group or any other reference factor. Exemplarily, the customer groups can be arranged according to the installation time of the OS, and the customer group corresponding to the OS with the longest installation time is taken as the target customer group.
[0088] At step S506, the automatic control device updates the PXE configuration file. At step S506, the PXE configuration file refers to prelinux.cfg, which is used to store the network installation configuration of the client and provides instructions for PXE installation configuration after being downloaded to the local through the TFTP service. Specifically, the automatic control device instructs the PXE server to update the menu file in the PXE configuration file to the system menu file of the to-be-installed OS of the target customer group.
[0089] At step S508, the automatic control device obtains the addresses of all servers of the target customer group.
[0090] At step S508, the automatic control device can obtain the machine addresses of all servers of the target customer group and the machine addresses of all servers of other customer groups through the redfish interface or other interfaces supporting out-of-band management protocols.
[0091] At step S510, the automatic control device instructs all servers in the target customer group to perform PXE installation startup.
[0092] At step S510, the automatic control device can use the Intelligent Platform Management Interface (IPMI) command to make all servers in the target customer group perform PXE startup. The IPMI command is a linux system provided for monitoring the physical characteristics of the server and remotely controlling the power supply of the server host. After the automatic control device instructs the server to perform PXE installation startup at step S510, all servers of the target customer group start PXE installation of the to-be-installed OS.
[0093] At step S512, when the automatic control device monitors that all servers of the target customer group have obtained the PXE configuration file, the automatic control device determines whether there is still a customer group without installed OS, and if so, repeats steps S504 to S512, otherwise, step S514 is executed.
[0094] The automatic control device can determine whether the machine addresses of all servers in the target client group have completed acquiring the PXE configuration file by tcpdump intercepting code stream.
[0095] Optionally, the automatic control device can further determine whether the target client group is the last client group in the specific order, and if so, repeat steps S504 to S512, otherwise execute step S514.
[0096] Step S514: Monitor the PXE installation of the plurality of servers.
[0097] In step S514, the plurality of client groups are arranged in a specific order, the first client group is the client group arranged at the head of the specific order, and the last client group is the client group arranged at the end of the specific order. Therefore, in step S514, it is determined whether each of the plurality of client groups has been traversed, if not, step S508 is executed, that is, the machine addresses of all servers of the next client group of the target client group just traversed are acquired. If the traversal is completed, it means that each of the plurality of client groups has been PXE started, because there is no client group without installed OS, so the PXE installation of the plurality of servers can be monitored, and the intervention of the automatic control device is introduced.
[0098] By the multi-system PXE installation method provided in the present application, after the automatic control device monitors that all servers of the target client group have acquired the PXE configuration file, the PXE server is controlled and the menu file in the PXE configuration file is updated to the system menu file of the to-be-installed OS of the next client group of the target client group. In this way, after the update is completed, the PXE installation process of the next client group can be started without waiting for the PXE installation of the target client group to be completed. This means that the above-mentioned problem of selecting the to-be-installed OS on the system selection menu by the user and then downloading the corresponding OS from the PXE server to the local according to the selected OS is avoided, thereby overcoming the challenge of manual intervention and monitoring, and making it possible to coordinate the installation progress of each computer (server) included in the PXE client, and further achieving high parallelization in time arrangement.
[0099] Figure 6 A schematic diagram of a PXE installation method provided in an embodiment of the present application, which can be applied to the PXE client 604 in the PXE installation system as shown in Figure 4 The PXE installation steps of the client group 610 in the PXE client 604 are schematically shown in Figure 6 In the PXE installation steps, the PXE client 604 is connected to the PXE server 602 through the network 606, and the PXE client 604 is connected to the PXE server 602 through the network 606. Figure 6 In the PXE installation steps, the PXE client 604 is connected to the PXE server 602 through the network 606, and the PXE client 604 is connected to the PXE server 602 through the network 606. Figure 5The PXE installation method shown, the PXE client 604 includes the client group 610 to the client group 616, and the client group 610 to the client group 616 is sequentially arranged from top to bottom, and the client group 612 group is the next target client group relative to the client group 610 group. Figure 6 It should be understood that the PXE installation between the various client groups in the PXE client 604 can be in any suitable order.
[0100] Continuing to refer to Figure 6 The PXE installation steps of the client group 610 in the PXE client 604 to complete the OS installation start from S621 and end at S627. The installation steps S621 to S627 of the client group 610 in the PXE client 604 are as follows:
[0101] The PXE installation step S621 of the client group 610: receiving the PXE start instruction of the automatic control device. The client group 610 performs the OS installation. It should be noted that for the convenience of description, the present application uses the client group to represent all servers in the client group, for example: the client group performs the PXE start, which means all servers in the client group perform the PXE start. Specifically, the client group can receive the PXE start instruction of the automatic control device 601 through the management network and the intelligent platform management interface (IPMI) command. After receiving the PXE start instruction of the automatic control device, the PXE start is performed on all servers in the client group 610.
[0102] It should be noted that before the client group 610 performs step S621, the automatic control device can perform steps S504 to S508; before the automatic control device performs steps S504 to S510, the automatic control device can also perform step S502.
[0103] The PXE installation step S622 of the client group 610: the client group 610 obtains the IP address and the PXE file location. Wherein all servers in the client group 610 obtain the IP address and the PXE file location through the DHCP service of the PXE server 602, and the installation step S622 corresponds to Figure 2S210 (PXE client requests IP address from DHCP service, and DHCP service returns IP address and PXE file location). In one possible implementation, the servers or PXE clients of the client group 610 request IP address from the DHCP service, and the DHCP service returns IP address and PXE file location. The DHCP service and related network protocols enable the PXE server to control IP address resources and manage allocation of network parameters, and enable the PXE client computer to automatically obtain assigned IP address and subnet mask, etc. when logging into the PXE server. The PXE server controls IP address resources through the DHCP service, the PXE client requests IP address from the DHCP service, and the DHCP service returns IP address and PXE file location.
[0104] PXE installation step S623 of the client group 610: the client group 610 obtains and executes the network card boot file. In this step, all servers in the client group 610 obtain and execute prelinux.0 and prelinux.cfg through the TFTP service of the PXE server 602. Installation step S623 corresponds to steps S212-S218 of the PXE installation method of the PXE server 602. Figure 2 S212 (PXE client requests prelinux.0 from TFTP service, and TFTP service sends prelinux.0), step S214 (PXE client runs prelinux.0), step S216 (PXE client requests configuration prelinux.cfg from TFTP service, and TFTP service sends configuration prelinux.cfg), and step S218 (PXE client executes prelinux.cfg). In one possible implementation, the PXE server provides TFTP service to provide simple file transfer service with less overhead for the PXE client, to obtain files such as PXE boot file, menu file, kernel and driver of the OS to be installed, etc. Here, prelinux.0 is obtained through the TFTP service. prelinux.0 refers to the network card boot file, which is downloaded to the local through the TFTP service to provide network card boot service and boot subsequent files including PXE configuration file to implement network boot. prelinux.0 provides necessary network support to provide network card boot service.
[0105] PXE installation step S624 of the client group 610: acquire and execute the PXE configuration file. In step S604, the prelinux.cfg, i.e., the PXE configuration file, is executed, which means that it is necessary to indicate how to proceed with the subsequent OS kernel boot, and thus it is necessary to determine the type and version of the OS to be installed. In a possible implementation, the PXE server provides a TFTP service to provide a simple file transfer service with less overhead for the PXE client, so as to acquire files such as PXE boot files, menu files, kernels and drivers of the OS to be installed, etc. Here, the prelinux.cfg, which is the PXE configuration file, is acquired through the TFTP service, and is used to store the network boot installation configuration of the client, and provides instructions for PXE installation configuration after being downloaded locally through the TFTP service. The PXE configuration file is also used to indicate how to proceed with the subsequent OS kernel boot, which means that the object of the OS kernel boot must be the OS to be installed by the PXE client. As mentioned above, after the BIOS calls the client program into the memory for execution, the subsequent PXE installation must correspond to the OS to be installed, that is, the OS to be installed must be determined at least before the OS placed on the PXE server is booted through the PXE network to run locally. Here, the prelinux.0, i.e., the network card boot file, and the prelinux.cfg, i.e., the PXE configuration file, acquired before the OS kernel boot in the PXE installation process, can be understood as the PXE boot file acquired through the TFTP service, which provides necessary network card boot service and network boot installation configuration so that the subsequent PXE installation can be smoothly carried out.
[0106] PXE installation step S625 of the client group 610: the client group 610 acquires the executable kernel file. All servers in the client group 610 acquire the vmlinuz through the TFTP service of the PXE server 602, and step S625 corresponds to step S220 of the PXE installation mode Figure 2 (PXE client requests vmlinuz from TFTP service, and TFTP service sends vmlinuz). In a possible implementation, the PXE server provides a TFTP service to provide a simple file transfer service with less overhead for the PXE client, so as to acquire files such as PXE boot files, menu files, kernels and drivers of the OS to be installed, etc. Here, the vmlinuz is acquired through the TFTP service. The vmlinuz is an executable kernel file (virtual memory linuz, vmlinuz), which is an executable kernel file obtained by compressing an uncompressed kernel file, and is used to decompress the kernel therein and perform kernel boot, and further provide underlying support to load and run modules, services, etc.
[0107] PXE installation step S626 of the client group 610: The client group 610 acquires the disk file. In this step, all servers in the client group 610 acquire the initrd.img through the TFTP service of the PXE server 602, and the installation step S626 corresponds to the step S222 (the PXE client requests the initrd.img from the TFTP service, and the TFTP service sends the initrd.img) of the PXE installation mode. Figure 2 In one possible implementation, the PXE server provides the TFTP service to provide a simple file transfer service with less overhead for the PXE client to acquire files such as the PXE boot file, the menu file, the kernel and the driver of the OS to be installed, etc. Here, the initrd.img is acquired through the TFTP service, and the initrd.img is a standardized memory-emulated disk image. As mentioned above, the vmlinuz, i.e. the executable kernel file, provides the underlying support to load and run various modules, services, etc. after being loaded into the memory. When the vmlinuz does not support the interface of the local data storage such as the local hard disk, it is costly to compile a new kernel file or change the default support mode of the kernel. In order to solve the compatibility problem between the kernel support provided by the vmlinuz and the local data storage of the PXE client, a part of the memory can be emulated as a disk for access, and the emulated disk supported by the vmlinuz, i.e. the executable kernel file, can be simulated as a file system recognized by the standard kernel file. By loading the simulated disk in the memory, the overhead of recompiling the kernel file can be avoided, and the memory-emulated disk file can be customized including the configuration and operation therein. The disk file obtained by loading in the memory to cooperate with the vmlinuz, i.e. the executable kernel file, is the initrd.img, i.e. the standardized memory-emulated disk image.
[0108] PXE installation step S627 of the client group 610: All servers in the client group 610 acquire the automated installation file and the OS image. In this step, all servers in the client group 610 acquire the ks.cfg and the OS image through the FTP service of the PXE server 602, and the installation step S627 corresponds to the step S223 (the PXE client requests the ks.cfg from the FTP service, and the FTP service sends the ks.cfg) of the PXE installation mode. Figure 2The PXE installation method involves steps S224 (the PXE client starts the Linux kernel), S226 (the PXE client requests ks.cfg and the OS image from the FTP service, and the FTP service sends ks.cfg and the OS image), and S228 (the PXE client executes and completes the OS installation). For example, the Linux kernel is the kernel of the Linux system, used to provide necessary hardware interaction and service support. The main modules or components of the Linux kernel include storage management, process management, file system, device management, and drivers. ks.cfg is the automatic configuration file for the Kickstarter system, which includes typical installation options and parameter configurations. The OS image is the image file of the OS to be installed.
[0109] Combination Figure 2 and Figure 6 As can be seen, when prelinux.cfg, i.e., the PXE configuration file, is executed in step S218, the OS to be installed needs to be determined before starting the subsequent OS kernel boot. However, if the user selects the OS to be installed from the system selection menu and then downloads the corresponding OS from the PXE server 201 to run locally, it will bring challenges in terms of manual intervention and monitoring, and it will be difficult to coordinate the installation progress of the various computers (servers) included in the PXE client 202, thus making it difficult to achieve a high degree of parallelism in the time scheduling. To address this issue, the PXE installation method provided in this application, once it is determined that all servers in the target client group have obtained the prelinux.cfg file (i.e., the PXE configuration file), that is, after the target client group executes step S604, the automatic control device 601 can update the configuration file of the PXE server 602 to the configuration file of the system required for the next client group to install. Specifically, the automatic control device 601 executes steps S504 and S506, and after the update is complete, it can start the PXE installation process for the next client group without waiting for the target client group's PXE installation to complete. That is, the automatic control device 601 executes step S508. Therefore, with... Figure 6 For example, customer group 612 is the next customer group after customer group 610. After customer group 610 executes step S604, the automatic control device 601 controls the PXE server 602 to update the configuration file to the configuration file of the system required for customer group 612, and after the update is complete, starts the PXE installation for customer group 612. The following section will explain... Figure 7 Further details.
[0110] Please see Figure 7 , Figure 7 This is a schematic diagram of a PXE installation method provided in an embodiment of this application, which can be applied to... Figure 4The PXE installation system shown in FIG. 6A is similar to the PXE installation system shown in FIG. 5A. The client 604 in the PXE installation system shown in FIG. 6A is similar to the client 504 in the PXE installation system shown in FIG. 5A. Figure 7 As shown, the client group 612 is the next client group of the client group 610, and the client group 614 is the next client group of the client group 612. Therefore, after the client group 612 performs the step S604, the automatic control device 601 controls the PXE server 602 to update the configuration file for the client group 614 to the configuration file for the installation system required by the client group 614 and to start the PXE installation of the client group 614 after the update is completed. The PXE installation step S631 to the PXE installation step S637 of the client group 612 in the PXE client 604 are performed in sequence as follows:
[0111] The PXE installation step S631 of the client group 612 is similar to the step S621: receiving the PXE boot instruction of the automatic control device. After receiving the PXE boot instruction of the automatic control device, all servers in the client group 612 are PXE booted. Figure 6
[0112] The PXE installation step S632 of the client group 612 is similar to the step S622: the client group 612 acquires an IP address and a PXE file location. Figure 6
[0113] The PXE installation step S633 of the client group 612 is similar to the step S623: the client group 612 acquires and executes a network card boot file. Figure 6
[0114] The PXE installation step S634 of the client group 612 is similar to the step S624: acquiring and executing a PXE configuration file. Figure 6
[0115] The PXE installation step S635 of the client group 612 is similar to the step S625: the client group 612 acquires an executable kernel file. Figure 6
[0116] The PXE installation step S636 of the client group 612 is similar to the step S626: the client group 612 acquires a disk file. Figure 6
[0117] The PXE installation step S637 of the client group 612 is similar to the step S627: all servers in the client group 612 acquire an automatic installation file and an OS image. Figure 6
[0118] In summary, the PXE installation method provided in this application allows each target client group's PXE was to obtain its configuration file. After this, the automatic control device 601 updates the configuration of the PXE server 602 to the configuration file of the system required for the next client group within the target client group. Once the update is complete, the PXE installation process for the next client group can begin without waiting for the target client group's PXE installation to finish. This method can coordinate the installation progress of each computer (server) included in the PXE client, thereby reducing the OS installation time for all servers within the PXE client. The following is a related explanation... Figure 8 Further details.
[0119] Figure 8 This is a schematic diagram illustrating a PXE installation procedure provided in an embodiment of this application. Figure 8 As shown, the PXE installation steps for customer group 610 are presented sequentially from step S621 to step S627. The horizontal axis represents the timing of the installation steps, with timing T0 corresponding to... Figure 5 In step S508, timings T1 to T7 respectively correspond to Figure 6 Steps S621 to S627 are shown in the table below. The PXE installation steps for customer group 612 are listed sequentially as PXE installation steps S631 to S637, with the horizontal axis representing the installation steps, and time sequence T0' corresponding to... Figure 5 In step S508, timings T1' to T7' respectively correspond to Figure 7 Steps S631 to S637 are described in the table. The PXE installation steps for client group 614 correspond to timings T0” to T7 in chronological order (it should be understood that the steps corresponding to timings T0” to T7” for client group 614 can be referred to in the PXE installation steps S621 to S627 for client group 610, and will not be repeated here). The intervals between the installation steps in the PXE installation process for each client group may vary depending on factors such as the version and type of the OS to be installed, and the network connection status. For example, the time taken from timings T1 to T5 includes the time from machine power-on to PXE startup, totaling approximately 3 minutes, while the time taken from timings T5 to T6 includes the installation of various system components and services, totaling between 15 and 30 minutes. Figure 8As shown in the figure, the time T0' corresponding to the PXE installation step of the client group 612 is after the time T3 corresponding to the PXE installation step of the client group 610, and between the two, the menu file is updated to the system menu file required for the installation of the client group 612. Since the time taken from the time T0 corresponding to the PXE installation step of the client group 610 to the time T3 corresponding to the PXE installation step of the client group 610 is obviously shorter than the time taken from the time T5 corresponding to the PXE installation step of the client group 610 to the time T6 corresponding to the PXE installation step of the client group 610, by setting the start time node of the PXE installation of the client group 612, i.e. the time T0' corresponding to the PXE installation step of the client group 612, after the time T3 corresponding to the PXE installation step of the client group 610, the parallelism between the time arrangement from the time T5 corresponding to the PXE installation step of the client group 610 to the time T6 corresponding to the PXE installation step of the client group 610 and the time arrangement from the time T5' corresponding to the PXE installation step of the client group 612 to the time T6' corresponding to the PXE installation step of the client group 612 is facilitated. Similarly, the time T0" corresponding to the PXE installation step of the client group 614 is after the time T3' corresponding to the PXE installation step of the client group 612, and between the two, the menu file is updated to the system menu file required for the installation of the client group 614. Therefore, the parallelism between the time arrangement from the time T5' corresponding to the PXE installation step of the client group 612 to the time T6' corresponding to the PXE installation step of the client group 612 and the time arrangement from the time T5" corresponding to the PXE installation step of the client group 614 to the time T6" corresponding to the PXE installation step of the client group 614 is also facilitated. In addition, Figure 8 It is also shown that the completion time of the PXE installation of all servers and all systems of the client group 610, the client group 612 and the client group 614 is equal to the time T0 corresponding to the PXE installation step of the client group 610 to the time T6 corresponding to the PXE installation step of the client group 614, and therefore, by coordinating the installation progress of each computer (server) included in the PXE client and further achieving high parallelization in the time arrangement, the overall system installation efficiency is effectively improved (the total time from the start of the PXE installation of the first server to the end of the PXE installation of the last server is shortened).
[0120] According to the above, the steps corresponding to the time sequence T2 to T4 corresponding to the client group PXE installation step can be referred to as a configuration file acquisition step, including steps S602 to S604; the steps corresponding to the time sequence T5 to T7 corresponding to the client group PXE installation step can be referred to as an OS installation execution step, including steps S605 to S607. Therefore, as shown in Figure 9 The present application provides a PXE installation method, which can be applied to the PXE installation system as shown in Figure 4 The method comprises the following steps:
[0121] S901: The automatic control device 401 determines a first target client group. Specifically, the method can refer to step S504. It should be noted that before step S901 is performed, the automatic control device 401 can also acquire the installation information of all servers in the PXE client 404, specifically, it can refer to step S502.
[0122] S902: The automatic control device 401 updates the PXE configuration file. Specifically, the method can refer to step S506.
[0123] S903: The automatic control device 401 acquires the machine address of all servers of the first target client group. Specifically, the method can refer to step S508.
[0124] S904: The automatic control device 401 instructs all servers in the first target client group to start PXE installation. Specifically, the method can refer to step S510.
[0125] S905: The first target client group receives the instruction of the automatic control device 401 and executes the OS installation. Specifically, the method can refer to step S621.
[0126] S906: The first target client group executes the configuration file acquisition step. Specifically, the method can refer to steps S622 to S624, and it should be noted that the PXE configuration file acquired in step S624 is the PXE configuration file updated by the automatic control device 401 in step S902.
[0127] S907: When the automatic control device 401 monitors that all servers of the first target client group have acquired the PXE configuration file, the automatic control device 401 judges whether there is still a client group that has not installed the OS, if there is, the automatic control device 401 repeats steps S901 to S904, otherwise, step S908 is executed. Specifically, the method can refer to step S516.
[0128] It should be noted that, in order to distinguish, if there is still a client group without installing the OS, the automatic control device 401 is referred to as a second target client group again for repeating the steps S901 to S904.
[0129] S908: The first target client group performs an OS installation execution step. Specifically, the method can refer to steps S625 to S627.
[0130] It should be noted that, in the process of the first target client group performing S908, the second target client group can start to perform steps S905, S906 and S908.
[0131] S909: After all the client groups in the PXE client 604 are installed with the OS system, that is, after all the target client groups perform S905, S906 and S908, the automatic control device 401 ends the PXE installation method.
[0132] Referring to Figure 10 , Figure 10 is a structural schematic diagram of a computing device provided by an embodiment of the present application. The computing device 1000 includes one or more processors 1010, a communication interface 1020 and a memory 1030. The processor 1010, the communication interface 1020 and the memory 1030 are connected to each other through a bus 1040. Optionally, the computing device 1000 can further include an input / output interface 1050 connected with an input / output device for receiving a parameter set by a user and the like. The computing device 1000 can be used to implement part or all of the functions of the device embodiment or the system embodiment in the above-described embodiments of the present application; the processor 1010 can also be used to implement part or all of the operation steps of the method embodiment in the above-described embodiments of the present application. The processor can be used to implement the method shown in Figure 5 , at this time, the computing device can be an automatic control device in a PXE system, or the processor can be used to implement the method shown in Figure 4 or Figure 6 , at this time, the computing device can be a PXE client. Figure 7 Figure 4 For example, the specific implementation of the computing device 1000 performing various operations can refer to the specific details in the above embodiments, such as the processor 1010 being configured to perform part or all of the steps in the above method embodiments or part or all of the operations in the above method embodiments. For another example, in the embodiments of the present application, the computing device 1000 can be configured to implement part or all of the functions of one or more components in the above apparatus embodiments, and in addition, the communication interface 1020 can be specifically configured to perform communication functions necessary for implementing the functions of these apparatuses, components, etc., and the processor 1010 can be specifically configured to perform processing functions necessary for implementing the functions of these apparatuses, components, etc. It should be understood that, Figure 10 The computing device 1000 can include one or more processors 1010, and the plurality of processors 1010 can cooperatively provide processing capability in a parallel connection manner, a serial connection manner, a serial-parallel connection manner, or any connection manner, or the plurality of processors 1010 can constitute a processor sequence or a processor array, or the plurality of processors 1010 can be divided into a main processor and an auxiliary processor, or the plurality of processors 1010 can have different architectures, such as using a heterogeneous computing architecture. In addition, Figure 10 The computing device 1000 shown in the figure, the related structural description and functional description are exemplary and non-limiting. In some exemplary embodiments, the computing device 1000 can include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or have a different arrangement of components. Figure 10
[0133] The processor 1010 can have various specific implementations. For example, the processor 1010 can include one or more combinations of central processing units (CPUs), graphics processing units (GPUs), neural-network processing units (NPUs), tensor processing units (TPUs), data processing units (DPUs), and the like. The processor 1010 can also be a single-core processor or a multi-core processor. The processor 1010 can be a combination of a CPU and a hardware chip. The hardware chip can be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. The processor 1010 can also be implemented by a logic device with built-in processing logic, such as an FPGA or a digital signal processor (DSP). The communication interface 1020 can be a wired interface or a wireless interface, and is configured to communicate with other modules or devices. The wired interface can be an Ethernet interface, a local interconnect network (LIN), or the like. The wireless interface can be a cellular network interface or a wireless local area network interface, or the like.
[0134] The memory 1030 can be a nonvolatile memory, e.g., read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically EPROM (EEPROM), or flash memory. The memory 1030 can also be a volatile memory, which can be a random access memory (RAM) used as an external cache. By way of example, and not limitation, many forms of RAM can be used, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM). The memory 1030 can also be used for storing programs codes and data to be executed by the processor 1010 to facilitate the processor 1010 to perform some or all of the operations described above for the method embodiments or perform other operations described above for the device embodiments. Further, the computing device 1000 can include more or less components, different configurations of components, or different arrangements of components than shown in the exemplary display. Figure 10 More or less components can be provided in the display, or arranged differently.
[0135] The bus 1040 can be a peripheral component interconnect express (PCIe) bus, or an extended industry standard architecture (EISA) bus, a unified bus (Ubus or UB), a compute express link (CXL), a cache coherent interconnect for accelerators (CCIX), or the like. The bus 1040 can be divided into an address bus, a data bus, a control bus, and the like. The bus 1040 can include a power bus, a control bus, and a status signal bus in addition to the data bus. However, for the sake of clarity, Figure 10 Only one thick line is used to represent the bus in the figure, but it does not mean that there is only one bus or only one type of bus.
[0136] The method and device provided by the embodiments of the present application are based on the same inventive concept, and the embodiments, implementation manners, examples, or implementation manners of the method and device are similar in terms of the principles of solving problems. Therefore, the embodiments, implementation manners, examples, or implementation manners of the method and device can be referred to each other, and the repeated parts will not be described herein. The embodiments of the present application further provide a system, which includes a plurality of computing devices. The structure of each computing device can refer to the structure of the computing device described above. The functions or operations that can be implemented by the system can refer to the specific implementation steps in the above method embodiments and / or the specific functions described in the above device embodiments, which will not be described herein.
[0137] The embodiments of the present application further provide a computer readable storage medium, which stores computer instructions. When the computer instructions run on a computer device (such as one or more processors), the method steps in the above method embodiments can be implemented. The specific implementation of the processor of the computer readable storage medium in executing the above method steps can refer to the specific operations described in the above method embodiments and / or the specific functions described in the above device embodiments, which will not be described herein.
[0138] Those skilled in the art will appreciate that embodiments of the present application can be readily used as a method, apparatus, or computer program product. Embodiments of the present application can be implemented in hardware, software, firmware, or any combination thereof. Embodiments of the present application can be implemented in software and / or firmware to operate on a computer or other programmable processing device, which can be a general purpose computer, a special purpose computer, a computer network, or other programmable processing device to produce a machine, such that the computer program product, when loaded and / or executed on the computer or other programmable processing device, can implement processes or functions described herein. Such computer program product can be a computer- readable storage medium having computer readable program code embodied therein, which causes a computer to function in a particular manner, such that the computer
[0139] The computer program instructions can also be loaded onto a computer, other programmable processing device, or network device to cause a series of operations to be performed on the computer, other programmable processing device, or network device to produce a computer implemented process such that the instructions which execute on the computer or other programmable processing device implement the functions / acts specified in the flowchart and / or block diagram block or blocks. Figure 1 The flowchart and / or block diagram in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each flowchart and / or block diagram can represent a method, module, and / or portion of code which comprises one or more executable instructions implemented in computer readable program code to be executed by a processor system, such as a general purpose computer, special purpose computer, embedded processor, or Figure 1 The flowchart and / or block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each flowchart and / or block diagram can represent a method, module, and / or portion of code which comprises one or more executable instructions implemented in computer readable program code to be executed by a processor system, such as a general purpose computer, special purpose computer, embedded processor, or Figure 1one or more processes and / or functions specified in the flow block or blocks Figure 1 These computer program instructions can also be loaded into computer or other programmable data processing devices, so that a series of operation steps are performed on the computer or other programmable data processing devices to generate computer-implemented processes, so that the instructions executed on the computer or other programmable devices provide processes for implementing the flow Figure 1 one or more processes and / or functions specified in the flow block or blocks Figure 1 one or more processes and / or functions specified in the flow block or blocks
[0140] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments. Obviously, those skilled in the art can make various modifications and variations to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. The steps in the method of the embodiments of the present application can be adjusted, combined or deleted according to actual needs; the modules in the system of the embodiments of the present application can be divided, combined or deleted according to actual needs. If these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and the equivalent technologies thereof, the present application also intends to include these modifications and variations.
Claims
1. A method for a pre-boot execution environment (PXE) to install an operating system (OS), the method comprising: The method comprises: obtaining installation information of all servers without OS, the installation information comprising type and version of OS; determining at least two client groups according to the installation information, each of the client groups comprising at least one server without OS, and the at least one server without OS having the same type and version of OS to be installed; determining a target client group from the at least two client groups, the target client group comprising at least one server without OS, and the at least one server without OS having the same OS to be installed; instructing a PXE server to generate a PXE configuration file, the PXE configuration file comprising configuration file of the OS to be installed of the servers in the target client group; obtaining addresses of the servers in the target client group; instructing the servers in the target client group to complete OS installation according to the addresses.
2. The method of claim 1, wherein, The method further comprises: determining installation time of OS according to the installation information; determining installation sequence of the at least two client groups according to the installation time, the installation sequence of the client group with longer installation time of OS being superior to the installation sequence of the client group with shorter installation time of OS. The method further comprises: determining the target client group from the at least two client groups according to the installation sequence.
3. The method according to claim 1 or 2, characterized in that, The method further comprises: obtaining installation information of each server from all servers without OS.
4. The method according to claim 1 or 2, characterized in that, The method further comprises: obtaining installation information of each server from a memory of a device running the method.
5. The method according to any one of claims 1 to 4, characterized in that, The installation information further comprises IP, username and password of the servers.
6. The method according to any one of claims 1 to 5, characterized in that, The method further comprises: sending an instruction to the PXE server, the instruction being used to instruct the PXE server to update a menu file in the PXE configuration file into a system menu file of the OS to be installed of the servers in the target client group.
7. The method according to any one of claims 1 to 6, characterized in that, The method further comprises: obtaining machine addresses of all servers in the target client group through an out-of-band management protocol interface.
8. The method according to any one of claims 1 to 7, characterized in that, The method further comprises: sending an instruction to the servers in the target client group according to the addresses, the instruction being used to instruct the servers in the target client group to complete OS installation; obtaining first information of the servers in the target client group, the first information being used to identify whether the servers in the target client group have obtained the PXE configuration file; when all servers in the target client group have the PXE configuration file, the method further comprises: determining a second client group, the second client group comprising at least one server without OS, and the at least one server without OS having the same OS to be installed. indicating the PXE server to generate a second PXE configuration file, the second PXE configuration file comprising a configuration file of an OS to be installed on a server in the second client group; obtaining an address of the server in the second client group; instructing the server in the second client group to complete the OS installation according to the address.
9. The method of claim 8, wherein, The step of instructing the server in the target client group according to the address, specifically comprises: sending an instruction to the server in the target client group through an intelligent platform management interface (IPMI) command.
10. An automatic control device characterized by comprising: The automatic control device is communicatively connected with a PXE server and a PXE client, and the automatic control device is configured to: obtain installation information of all servers without an OS, the installation information comprising a type and a version of the OS; determine at least two client groups according to the installation information, each of the client groups comprising at least one server without an OS, and the at least one server without an OS having the same type and version of the OS to be installed; determine a target client group from the at least two client groups, the target client group comprising at least one server without an OS, and the at least one server without an OS having the same OS to be installed; instruct the PXE server to generate a PXE configuration file, the PXE configuration file comprising a configuration file of an OS to be installed on a server in the target client group; obtain an address of the server in the target client group; instruct the server in the target client group to complete the OS installation according to the address.
11. The automatic control device according to claim 10, wherein The step of determining at least two client groups according to the installation information, further comprises: determining an installation duration of the OS according to the installation information; determining an installation sequence of the at least two client groups according to the installation duration, the installation sequence of a client group with a longer installation duration of the OS being superior to that of a client group with a shorter installation duration of the OS; The step of determining the target client group from the at least two client groups, specifically comprises: determining the target client group from the at least two client groups according to the installation sequence.
12. The automatic control device according to claim 10 or 11, characterized by The step of obtaining the installation information of all servers without an OS, specifically comprises: obtaining the installation information of each server from all servers without an OS.
13. The automatic control device according to claim 10 or 11, characterized by The step of obtaining the installation information of all servers without an OS, specifically comprises: obtaining the installation information of each server from a memory of the device.
14. The automatic control device according to any one of claims 10 to 13, characterized by, The installation information further comprises an IP, a username and a password of the server.
15. The automatic control device according to any one of claims 10 to 14, characterized by The step of instructing the PXE server to generate a PXE configuration file, specifically comprises: sending an instruction to the PXE server, the instruction being used to instruct the PXE server to update a menu file in the PXE configuration file to a system menu file of an OS to be installed on a server in the target client group.
16. The automatic control device according to any one of claims 10 to 15, characterized by The step of obtaining the address of the server in the target client group of the OS to be installed, specifically comprises: obtaining machine addresses of all servers in the target client group through an out-of-band management protocol interface.
17. The automatic control device according to any one of claims 10 to 16, characterized by The step of instructing the server in the target client group to complete the OS installation according to the address, specifically comprises: sending an instruction to the servers in the target client group according to the addresses, the instruction being used to instruct the servers in the target client group to complete OS installation; obtaining first information of the servers in the target client group, the first information being used to identify whether the servers in the target client group obtain the PXE configuration file; when all the servers in the target client group have the PXE configuration file, the device further comprises: determining a second client group, the second client group comprising at least one server without installed OS, and the at least one server without installed OS having the same OS to be installed; instructing the PXE server to generate a second PXE configuration file, the second PXE configuration file comprising the configuration file of the OS to be installed of the servers in the second client group; obtaining addresses of the servers in the second client group; instructing the servers in the second client group to complete OS installation according to the addresses.
18. The automatic control device according to claim 17, wherein The sending of the instruction to the servers in the target client group according to the addresses specifically comprises: sending the instruction to the servers in the target client group through an intelligent platform management interface (IPMI) command.
19. A method of a pre-boot execution environment (PXE) installing an operating system (OS), the method comprising: The method is applied to a PXE system, the PXE system comprising an automatic control device, a PXE server and a PXE client, the PXE client comprising at least two servers, and the method comprising: The automatic control device obtains installation information of all the servers without installed OS, the installation information comprising the type and version of the OS; The automatic control device determines at least two client groups according to the installation information, each of the client groups comprising at least one server without installed OS, and the at least one server without installed OS having the same type and version of the OS to be installed; The automatic control device determines a first target client group from the at least two client groups, the first target client group comprising at least one server without installed OS, and the at least one server without installed OS having the same OS to be installed; The automatic control device generates a PXE configuration file of the server, the PXE configuration file comprising the configuration file of the OS to be installed of the servers in the first target client group; The automatic control device obtains addresses of the servers in the first target client group; The automatic control device sends an instruction to the servers in the first target client group according to the addresses, the instruction being used to instruct the servers in the first target client group to complete OS installation through PXE; The servers in the first target client group receive the instruction of the automatic control device; The servers in the first target client group obtain the PXE configuration file from the server; The servers in the first target client group install the OS according to the configuration file; When all the servers in the first target client group obtain the PXE configuration file, the automatic control device determines a second target client group, the second target client group comprising at least one server without installed OS, and the at least one server without installed OS having the same OS to be installed; The automatic control device updates the server-side PXE configuration file, and the updated PXE configuration file includes the configuration file of the OS to be installed in the server in the second target customer group.
Citation Information
Patent Citations
Method and system for operating system remote installation on basis of PXE
CN103744695A
PXE based linux operating system installation method and system
CN105094929A