Response file generation method, operating system deployment method and server

By generating answer file templates and deployment information that match the operating system, and using management controllers and processors to perform batch deployment of operating systems, the problem of answer file differences between different operating systems is solved, and efficient and accurate operating system deployment is achieved.

CN120610718APending Publication Date: 2025-09-09XFUSION DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411524585.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-09-09

AI Technical Summary

Technical Problem

Different operating systems correspond to different response files, so how to achieve batch deployment of operating systems has become an urgent problem that needs to be solved.

Method used

By obtaining the answer file template and deployment information corresponding to the operating system, an answer file matching the operating system is generated, and the management controller and processor are used to perform batch deployment of the operating system, simplifying administrator operations and improving deployment efficiency and accuracy.

Benefits of technology

It realizes batch deployment of operating systems, reduces the coupling between operating system deployment and system images, reduces the workload of operating system adaptation, and improves deployment efficiency and cluster consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120610718A_ABST
    Figure CN120610718A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a response file generation method, an operating system deployment method and a server. The response file generation method comprises the steps that under the condition that a first server completes deployment of an operating system, a response file template and deployment information corresponding to the operating system are obtained, and the deployment information is setting information needed when the operating system is deployed; generating a response file based on the response file template and the deployment information; the response file is used for guiding other servers to deploy the operating system. Namely, the first server can generate the response file corresponding to the operating system through the response file template and the deployment information corresponding to the operating system after the deployment of the operating system is completed, so that the batch deployment of the operating system is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of server technology, and in particular to a response file generation method, an operating system deployment method, and a server. Background Art

[0002] Many scenarios require server placement, such as data centers, where servers are placed in cabinets or racks to centrally process data. Currently, server placement requires deploying the corresponding operating system for all servers in the same batch to save time, costs, and human resources.

[0003] Currently, it's possible to deploy the same operating system simultaneously to servers deployed in the same batch based on an answer file. An answer file is a predefined installation boot file that guides the servers through the operating system installation process. However, different operating systems correspond to different answer files. Generating answer files tailored to each operating system and enabling batch deployment of operating systems is a pressing issue. Summary of the Invention

[0004] The embodiments of the present application provide a response file generation method, an operating system deployment method, and a server for generating a response file corresponding to an operating system to implement batch deployment of the operating system.

[0005] In a first aspect, an embodiment of the present application provides a method for generating a response file, the method comprising:

[0006] When the first server completes operating system deployment, it obtains a corresponding answer file template and deployment information for the operating system. The deployment information contains the configuration information required to deploy the operating system. Based on the answer file template and deployment information, it generates an answer file. The answer file is used to guide other servers in deploying the operating system. Specifically, after the operating system deployment is complete, the first server can use the corresponding answer file template and deployment information to generate an answer file corresponding to the operating system, thereby achieving batch deployment of the operating system.

[0007] In one example, if the operating system is a Windows system, the answer file template corresponding to the Windows operating system is a first answer file template. The first answer file template includes one or more of a system language adding location, a keyboard layout adding location, a time zone information adding location, or a system disk partition adding location. The deployment information includes one or more of the system language, keyboard layout, time zone information, or system disk partition information. The first answer file template is filled in based on the deployment information to obtain an answer file corresponding to the Windows system.

[0008] In another example, if the operating system is a RedHat system, the answer file template corresponding to the RedHat operating system is the second answer file template, and the second answer file template includes one or more of a system language adding location, a keyboard layout adding location, a time zone information adding location, a system disk partition adding location, a first adding location for adding a system deployment software list, or a second adding location for adding a system root password, and the deployment information includes one or more of a system deployment software list, a system root password, a system language, a keyboard layout, a time zone information, or a system disk partition information; the second answer file template is filled in based on the deployment information to obtain an answer file corresponding to the RedHat system.

[0009] In another example, the operating system is a VMware ESXi system, and the answer file template corresponding to the VMware ESXi operating system is a third answer file template. The third answer file template includes a second adding location or a third adding location for adding network configuration information, and the deployment information includes a system root password or network configuration information. The second answer file template is filled in based on the deployment information to obtain a response file corresponding to the VMware ESXi system.

[0010] In another example, hardware driver information and configuration files corresponding to the operating system are obtained; the hardware driver information includes the driver, driver files, and dependencies between the driver and driver files corresponding to the driver device information; and the configuration files include configuration information required during the operating system configuration process. Thus, embodiments of the present application can uniformly generate response files, hardware driver information, and configuration files required for system deployment, regardless of operating system vendor and version, thus achieving high versatility. Furthermore, hardware driver information and configuration files are obtained simultaneously with the generation of the response file, improving acquisition efficiency.

[0011] In the second aspect, an embodiment of the present application provides an operating system deployment method, which is applied to a second server. The second server includes a management controller BMC, a hard disk and a processor. The BMC is connected to the hard disk, and the processor is connected to the hard disk. The BMC receives an operating system deployment task, and the operating system deployment task is used to indicate the deployment target operating system. The operating system deployment task contains a target response file corresponding to the target operating system; the processor starts the deployment operating system from a preset storage area in the hard disk, and deploys the target operating system based on the target response file. Thus, the embodiment of the present application can issue operating system deployment tasks in batches, and each server independently executes the operation of deploying the target operating system based on the target response file. This process not only simplifies the administrator's operation, but also improves the efficiency and accuracy of deployment, and ensures the consistency and stability of the server cluster. Furthermore, when the embodiment of the present application performs operating system deployment, there is no need to perform system mirroring, thereby reducing the coupling between operating system deployment and system mirroring, and when performing operating system deployment, there is no need to perform operating system adaptation, thereby reducing the workload of operating system adaptation and improving the efficiency of operating system adaptation.

[0012] In a specific example, the operating system deployment task also includes: hardware driver information, the hardware driver information includes the driver corresponding to the driver device information, the driver file, and the dependency relationship between the driver and the driver file; the processor adjusts the driver of the target operating system based on the hardware driver information.

[0013] In another specific example, the operating system deployment task further includes: a configuration file, where the configuration file includes configuration information required during configuration of the target operating system; and the processor configures the target operating system based on the configuration file.

[0014] In a third aspect, an embodiment of the present application provides a server, the server comprising: a BMC and a processor;

[0015] BMC and processor coupling;

[0016] BMC is used to complete operating system deployment;

[0017] The processor is configured to execute the response file generation method according to any one of the first aspects.

[0018] In a fourth aspect, an embodiment of the present application provides a server, the server comprising: a BMC, a hard disk, and a processor;

[0019] The BMC is connected to the hard disk, and the processor is connected to the hard disk;

[0020] The BMC is used to receive an operating system deployment task, which is used to indicate the target operating system to be deployed. The operating system deployment task contains a target response file corresponding to the target operating system;

[0021] The processor executes the operating system deployment method as described in any one of the second aspects.

[0022] In a fifth aspect, an embodiment of the present application provides a computer storage medium for storing a computer program. When the computer program is executed, it is used to implement the method provided in any one of the implementation methods of the first aspect to the second aspect of the present application.

[0023] In a sixth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on at least one computing device, enables the at least one computing device to implement the method provided in any one of the embodiments of the first to second aspects of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 An example diagram of a deployment system architecture provided in an embodiment of the present application;

[0025] Figure 2 A schematic diagram of the architecture of another deployment system provided in an embodiment of the present application;

[0026] Figure 3 A schematic diagram of the software architecture of a server provided in an embodiment of the present application;

[0027] Figure 4 A timing diagram of a method for generating a response file provided in an embodiment of the present application;

[0028] Figure 5 A schematic diagram of deploying an operating system provided in an embodiment of the present application;

[0029] Figure 6 A flowchart of a method for obtaining hardware driver information provided in an embodiment of the present application;

[0030] Figure 7A A schematic diagram of an SP main interface provided in an embodiment of the present application;

[0031] Figure 7B A schematic diagram of an operating system deployment interface provided in an embodiment of the present application;

[0032] Figure 8 A timing diagram of a response file generation method provided in an embodiment of the present application;

[0033] Figure 9A A schematic diagram of an interface for generating a response file provided in an embodiment of the present application;

[0034] Figure 9B A schematic diagram of the response file generation interface provided in an embodiment of the present application;

[0035] Figure 10 A schematic diagram of a method for batch deployment of operating systems provided in an embodiment of the present application;

[0036] Figure 11 A flowchart of a specific operating system deployment method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0037] To make the purpose, technical solutions, and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments made by ordinary technicians in this field based on the inspiration of these embodiments fall within the scope of protection of this application.

[0038] First, the terms involved in the embodiments of the present application are explained.

[0039] Answer file: An answer file is a boot file used when installing an operating system. It contains various options and configurations required during the installation process. Based on the answer file, the server can automatically install the operating system. The answer file includes, but is not limited to, installation source information, installation options, network configuration, user account information, disk partitions, and time zone settings.

[0040] Hardware driver information: This refers to the driver device information required for the server's operating system to boot and run as expected, including the corresponding drivers, driver files, and the dependencies between these drivers. Driver files include, but are not limited to, the driver's location, version number, and supported operating system versions. Hardware driver information is critical to ensuring the proper functioning of the server's operating system.

[0041] Configuration files are used for the daily management and maintenance of an installed operating system. These files include, but are not limited to, network configuration information, firewall configuration information, and startup information. They are crucial to ensuring the proper operation of the operating system.

[0042] The following describes the application scenarios of the embodiments of the present application.

[0043] Figure 1 The answer file generation method and operating system deployment method provided in the embodiment of the present application can be applied to Figure 1 The deployment system shown in Figure 1 As shown, the deployment system 100 includes a control platform 110 and a plurality of servers 120 .

[0044] The control platform 110 can run on a server, for example, a general-purpose server, a GPU server, an AI server, a heterogeneous server, etc. Alternatively, the control platform 110 can be composed of a device cluster and application software deployed on the device cluster. The device cluster can be implemented with an independent computing device or a device cluster composed of multiple computing devices. In some possible implementations, the computing device in the device cluster 110 can be a terminal, a computer, or a server. In one example, the server involved in this solution can be used to provide cloud services, which can be a server or a super terminal that can establish a communication connection with other devices and provide computing functions and / or storage functions for other devices. Among them, the server involved in this solution can be a hardware server, or it can be implanted in a virtualized environment. For example, the server involved in this solution can be a virtual machine executed on a hardware server that includes one or more other virtual machines.

[0045] The control platform 110 interacts with multiple servers 120 via a network. The network can be a wired network or a wireless network. For example, a wired network can be a cable network, a fiber optic network, a digital data network (DDN), etc., and a wireless network can be a telecommunications network, an intranet, the Internet, a local area network (LAN), a wide area network (WAN), etc., or any combination thereof. It is understood that the network can use any known network communication protocol to achieve communication between different client layers and gateways, and the above-mentioned network communication protocol can be various wired or wireless communication protocols.

[0046] In an embodiment of the present application, the control platform 110 can control a server that has an operating system installed to generate a response file corresponding to the operating system, or can batch-unmanned deploy operating systems for multiple servers 120 that need to deploy operating systems. The control platform 110 can deploy the same operating system to multiple servers that do not have the system deployed, or it can deploy different operating systems to multiple servers that do not have the system deployed. This embodiment of the present application is not specifically limited.

[0047] In addition, the deployment system 100 may further include a first server and multiple second servers, wherein the first server is a server on which an operating system has been installed, and the second server is a server on which an operating system needs to be deployed.

[0048] In an embodiment of the present application, the first server can generate a response file corresponding to the operating system. In addition, the first server can control multiple second servers to deploy the operating system in batches.

[0049] However, different operating systems correspond to different response files. In view of this, an embodiment of the present application provides a response file generation method. After the operating system deployment is completed, a response file corresponding to the operating system can be generated through the response file template and deployment information corresponding to the operating system, thereby realizing batch deployment of the operating system.

[0050] The following describes in detail the response file generation method provided in the embodiment of the present application in conjunction with the accompanying drawings.

[0051] The embodiments of this application are Figure 1 Taking the application scenario shown as an example, the response file generation method provided by the embodiment of the present application is described in detail. For ease of explanation, the control platform 110 in the deployment system 100 controls three servers (server A, server B, and server C) as an example. Server A, server B, and server C deploy the same operating system.

[0052] Example description: Attached Figure 2 This is a schematic diagram of another deployment system architecture provided by an embodiment of the present application. The control platform 110 controls server A, server B, and server C.

[0053] For example, Figure 2 As shown, server A, server B, and server C all include Smart Provisioning (SP), which is used to generate a response file and perform operating system deployment operations.

[0054] For example, Figure 2 As shown, Servers A, B, and C also include system disks, which are used to store the operating systems deployed on the servers. Specifically, during the operating system installation process, the servers store the operating system's core files, boot loader, configuration files, and other files on the system disk. These core files include the operating system kernel, dynamic link libraries, and other necessary files.

[0055] For example, Figure 2 As shown, Server A, Server B, and Server C also include a Baseboard Management Controller (BMC), which is used to provide various interfaces for out-of-band management of the servers. Exemplarily, the BMC includes an Intelligent Baseboard Management Controller (iBMC). The software corresponding to the out-of-band management controller is called out-of-band management software. For ease of description, the software corresponding to the iBMC is referred to as iBMC. Hereinafter, "iBMC" refers to the software corresponding to the iBMC.

[0056] For example, the Figure 3 This is a schematic diagram of the software architecture of a server provided in an embodiment of the present application. The server is any of Server A, Server B, and Server C. The out-of-band management software includes the iBMC and some Service Providers (SPs) that need to be executed on the BMC. The in-band management software includes the SPs that need to be executed on the processor and the operating system (OS).

[0057] It should be noted that the system architecture and application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of the system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0058] The following describes in detail the method for generating a response file provided in the embodiment of the present application.

[0059] In the embodiment of the present application, the control platform 110 controls the designated server to generate a response file before executing batch deployment of the operating system to multiple servers. The designated server can be a server that has already deployed the operating system or a server that has not yet deployed the operating system.

[0060] For example, Figure 2 As shown, if none of Server A, Server B, and Server C have an operating system deployed, the control platform 110 designates Server A (or Server B or Server C) as the server to generate the response file. The control platform 110 controls Server A to generate the response file. The control platform 110 can use the response file generated by Server A to deploy the operating systems of Servers B and C.

[0061] For example, Figure 2 As shown, if the server A has been deployed with an operating system, the control platform 110 designates the server for generating the response file as server A, such as the first server.

[0062] Attachment Figure 4 A timing diagram of a method for generating a response file provided in an embodiment of the present application, which is applied to the attached Figure 3 The server shown in FIG. 1 includes the following steps:

[0063] S410 , the control platform 110 sends control information to server A.

[0064] The control information is used to enable server A to execute the corresponding response file generation method.

[0065] S420: Server A obtains a response file template.

[0066] For example, Figure 2 As shown, server A obtains the answer file template.

[0067] Answer file templates are preconfigured templates used to generate answer files.

[0068] The content of the answer file for different operating systems varies. For example, the answer file for Windows includes the system language, keyboard layout, time zone information, and system disk partition information. Furthermore, the answer file for Windows includes, but is not limited to, input method information, user data, network configuration information (such as IP address, subnet mask, and gateway), and information for setting up synchronous and asynchronous command execution. The answer file for Red Hat includes the system deployment software list, system root password, system language, keyboard layout, time zone information, and system disk partition information. Furthermore, the answer file for Red Hat also includes user accounts, system authorization information, installation mode, system services, and post-installation scripts. The answer file for VMware ESXi includes the system root password and network configuration information. Furthermore, the answer file for VMware ESXi also includes the host name, system pickup information, installation source, system authorization information, installation mode, system services, and more.

[0069] The formats of the response files corresponding to different operating systems are also different. In a specific implementation, the response file corresponding to the Windows system is "unattend.xml" in XML format, the response file corresponding to the VMware ESXi system is "ks.cfg" in cfg format, and the response file corresponding to the RedHat system is "anaconda-ks.cfg" in cfg format.

[0070] In the embodiment of the present application, the control platform 110 may pre-configure response file templates corresponding to different operating systems. Server A obtains the response file template corresponding to the operating system from the control platform 110 according to the deployed operating system.

[0071] For example, the first answer file template for Windows is in XML format and includes a location for adding the system language, a location for adding a keyboard layout, a location for adding time zone information, and a location for adding system partition information. Furthermore, the first answer file template also includes locations for adding input method information, user data, and network configuration information.

[0072] The second answer file template for Red Hat systems is in .cfg format and includes sections for adding the system language, keyboard layout, time zone information, system disk partitions, a first section for adding the system deployment software list, and a second section for adding the system root password. The second answer file template also includes sections for adding user accounts, system authorization information, and installation modes.

[0073] The third answer file template for VMware ESXi is in .cfg format and includes a second location for adding the system root password and a third location for adding network configuration information. It also includes locations for adding the host name, the installation source, and system authorization information.

[0074] After the operating system is deployed, the server obtains the answer file template.

[0075] In one example, when the operating system is not deployed on the server, the server needs to first deploy the operating system, and after the operating system deployment is completed, obtain the answer file template corresponding to the operating system.

[0076] For example, Figure 5 A schematic diagram of an operating system deployment provided in an embodiment of the present application, wherein a user can deploy an operating system through an SP, specifically including steps ①, ②, ③, and ④, which are executed in chronological order.

[0077] ①: The user logs in or accesses the iBMC through a terminal.

[0078] For example, Figure 5 As shown, users can remotely manage the server through the server's iBMC. Specifically, users can remotely access the server's iBMC through a kernel-based virtual machine (KVM) or hypertext markup language (HTML).

[0079] Among them, KVM allows users to remotely control the server through a set of keyboard, monitor and mouse, while HTML allows users to access the server through a web browser.

[0080] ②: The server starts SP.

[0081] After the user logs in to the iBMC, the server starts the iBMC and enters the iBMC startup phase, in which the server's SP is started. For example, in the iBMC startup phase, the user triggers a startup instruction to start the server's SP, for example, the triggering startup instruction is pressing the F6 key.

[0082] ③: The user is guided into the SP main interface.

[0083] Exemplarily, the user finds the startup sequence setting in the boot interface, selects the startup option corresponding to the SP interface, and enters the SP main interface.

[0084] The SP main interface includes an operating system deployment item. The user enters the operating system deployment interface by triggering the operating system deployment item. Figure 7A A schematic diagram of an SP main interface provided in an embodiment of the present application.

[0085] Among them, the SP main interface is provided with operation deployment items. For example, Figure 7A As shown, the SP interface may also include RAID card configuration items and firmware upgrade items.

[0086] ④: The user completes the operating system deployment on the operating system deployment interface.

[0087] After the user triggers the operating system deployment item on the SP main interface, he enters the operating system deployment interface and executes the operating system deployment. Figure 7B A schematic diagram of an operating system deployment interface provided in an embodiment of the present application, wherein the user can select the installation mode, system version, and startup mode, etc. in the operating system deployment interface.

[0088] For example, Figure 7B As shown, the installation mode selected by the user in the operating system deployment interface is the recommended mode. In addition, the user can also select the installation mode as the custom mode.

[0089] For example, Figure 7B As shown in the figure, the user selects the Linux version on the operating system deployment interface. In addition, the user can also select other versions, such as ReHat version, Ubuntu version, Windows version, or VMware version.

[0090] For example, Figure 7B As shown in the figure, the user selects UEFI Boot mode from the BIOS boot mode on the operating system deployment interface. In addition, the user can also select Legacy Boot mode.

[0091] Thus, the operating system deployment is completed.

[0092] The embodiment of the present application may also deploy the operating system in other ways, which are not specifically limited in the embodiment of the present application.

[0093] S430: The server obtains deployment information.

[0094] Deployment information refers to the configuration information required when deploying an operating system. In the embodiment of the present application, deployment information includes but is not limited to the following: a system deployment software list, a system root password, a system name, a system language, a system time zone information, a system password, a system serial number, system disk partition information, and system network configuration information.

[0095] In one example, if the operating system is Red Hat, the deployment information includes information such as the system deployment software list, the system root password, the system language, the keyboard layout, the time zone information, and the system disk partition information. The server can obtain the installation software list using a first preset command. The first preset command is a command preset and set by those skilled in the art as needed, such as the first preset command yum list installed and the rpm-qa command. The system language, keyboard layout, time zone information, and root password can be obtained using a second preset command. For example, the system language can be obtained using the echo $LANG command, the keyboard layout can be obtained using localectl status or cat / etc / default / keyboard, the time zone information can be obtained using timedatectl or cat / etc / timezone, and the root password can be obtained using cat / etc / shadow. The second preset command is a command preset and set by those skilled in the art as needed. The system disk partition information can be obtained using a third preset command. For example, the third preset command includes fdisk -1, lsblk, vgs, pvs, and lvs. fdisk -1 lists all disks and their partition information, while lsblk lists all block devices and their attributes, including disks and partitions. Vgs indicates to list all volume groups, pvs indicates to list all physical volumes, and lvs indicates to list all logical volumes. The third preset command is a command preset and set by those skilled in the art as needed.

[0096] If the operating system is a Windows system, the deployment information includes information such as the system language, keyboard layout, time zone information, and system disk partition information. The server can obtain the system language, keyboard layout, and time zone information through the fourth preset command. For example, the system language is obtained through the et-WinUserLanguageList command, the keyboard layout is obtained through Get-WinUserLanguageList-InputLocale zh-CN, and the time zone information is obtained through (Get-WmiObject Win32_ComputerSystem).TimeZone. Among them, the fourth preset command is a command set by those skilled in the art as needed. The system disk partition information is obtained through the fifth preset command. For example, the fifth preset command is the diskpart command. Among them, the fifth preset command is a command preset and set by those skilled in the art as needed.

[0097] In another example, if the operating system is VMware ESXi, the deployment information includes information such as the system root password and network configuration information. The server can obtain the root password from a preset file and the network configuration information from a first preset path. For example, the preset file can be the etc / shadow file, and the first preset path can be / home / old_os / etc / sysconfig / network-scripts.

[0098] S440: The server obtains a response file based on the response file template and the deployment information.

[0099] After the server obtains the deployment information, it adds the deployment information to the specified location based on the correspondence between the deployment information and the location in the answer file template to obtain the answer file.

[0100] In one example, if the operating system is a Red Hat system, the deployment information includes a system deployment software list, a system root password, a system language, a keyboard layout, time zone information, and system disk partition information. The server adds the system deployment software list to the first add location of the second answer file template, adds the system root password to the second add location of the second answer file template, adds the system language to the system language add location of the second answer file template, adds the keyboard layout to the keyboard layout add location of the second answer file template, adds the time zone information to the time zone information add location of the second answer file template, and adds the system disk partition information to the system disk partition add location of the second answer file template. The server calls the second answer file template after adding the deployment information an answer file.

[0101] Exemplarily, the first adding location is the %packages location, the keyboard layout adding location is the keyboard location, the second adding location is the rootpw location, the system language adding location is the lang location, the time zone information adding location is the timezone location, and the system disk partition adding location is the autopart location.

[0102] The system deployment software list is @^minimal@core chrony net-tools%end, where @^minimal represents a minimal installation and @core includes the packages required for basic system functionality. chrony and net-tools are separate packages for time synchronization and network tools, respectively.

[0103] The system language is lang en_XX, which means the XX language is used. The keyboard layout is keyboard--vckeymap=XX--xlayouts='XX'. Here, keyboard--vckeymap=XX--xlayouts='XX' indicates that the keyboard layout used by the virtual console and Window system is configured, and the keyboard layout uses the XX language.

[0104] The time zone information is timezone AAA, which indicates that the system time zone is set to AAA. The root password is iscrypted$6$Btj921qrvU48QLB3$Octu, which indicates that the root user password is set and encrypted.

[0105] The added answer file includes:

[0106] %packages

[0107] @^minimal

[0108] @core

[0109] chrony

[0110] net-tools

[0111] %end

[0112] lang en_XX

[0113] keyboard--vckeymap=XX--xlayouts='XX'

[0114] timezone–AAA

[0115] rootpw--iscrypted$6$Btj921qrvU48QLB3$Octu

[0116] bootloader--location=mbr--boot-drive=sda

[0117] autopart --type=lvm

[0118] clearpart--all--initlabel--drives=sda

[0119] Among them, bootloader --location=mbr --boot-drive=sda indicates that the boot loader is configured in the master boot record (MBR) and specifies / dev / sda as the startup disk. autopart --type=lvm clears all existing partition tables, and clearpart --all --initlabel --drives=sda reinitializes the disk label and automatically creates LVM-type partitions.

[0120] In one example, if the operating system is a Windows system, and the deployment information includes a system deployment software list, a system root password, system keyboard information, a system language, a system time zone information, and system disk partition information, the server adds the system language to the system language addition location of the first answer file template, adds the keyboard layout to the keyboard layout addition location of the first answer file template, adds the time zone information to the time zone information addition location of the first answer file template, and adds the system disk partition information to the system disk partition addition location of the first answer file template. The first answer file template after the server adds the deployment information is called the answer file corresponding to the Windows operating system.

[0121] In addition, if the deployment information also includes the system password and serial number, the system password and serial number do not need to be added to the answer file, but are configured additionally during the operating system deployment.

[0122] In another example, if the operating system is VMware ESXi, the deployment information includes the system root password and network configuration information. The server adds the system root password to the second add location of the third answer file template and adds the network configuration information to the third add location of the third answer file template. After the server adds the deployment information, the third answer file template is called the answer file for VMware ESXi.

[0123] Therefore, in the embodiment of the present application, a server that has already deployed an operating system can generate a response file corresponding to the operating system through the response file template and deployment information corresponding to the operating system, thereby realizing batch deployment of the operating system.

[0124] Furthermore, in an embodiment of the present application, the server may also obtain hardware driver information.

[0125] Attachment Figure 6 This is a flow chart of a method for obtaining hardware driver information provided in an embodiment of the present application. The execution subject of the method may be a server, and the method specifically includes:

[0126] S610: The server obtains hardware device information.

[0127] Hardware device information refers to the identification information of the server's physical structure, including processors, storage devices, network interface cards, fans and cooling systems, power supply units, etc.

[0128] The server may obtain the server's hardware device information using a preset acquisition method, which may be a preset command or a preset path, etc., and is not specifically limited in the present embodiment.

[0129] For example, if the operating system is a Red Hat system, the server obtains the hardware device information using a first acquisition command. For example, the first acquisition command is the lspci command. If the operating system is a Windows system or a VMware ESXi system, the server obtains the hardware device information using a second acquisition command. For example, the second acquisition command is the devcon command.

[0130] S620: The server obtains driver device information and driver files corresponding to the operating system from the hardware device information.

[0131] The driver device information indicates the identification information of the hardware driver devices that enable the normal operation of the operating system, including but not limited to the following devices: RAID cards, network cards, InfiniBand (IB) cards, Fibre Channel (FC) cards, and Graphics Processing Unit Cards (GPU) cards.

[0132] The hardware device information in the server follows a specific classification specification. Based on the classification specification, the driver device information in the hardware device information can be identified, and the corresponding driver file can be obtained based on the driver device information.

[0133] For example, if the operating system is Red Hat, the server can obtain the network card and network card driver files through the following command:

[0134] [root@localhost~]#grep"0x0200" / sys / bus / pci / devices / * / class

[0135] / sys / bus / pci / devices / 0000:7d:00.0 / class:0x020000

[0136] / sys / bus / pci / devices / 0000:7d:00.1 / class:0x020000

[0137] / sys / bus / pci / devices / 0000:7d:00.2 / class:0x020000

[0138] / sys / bus / pci / devices / 0000:7d:00.3 / class:0x020000

[0139] The device identifier of the network controller is 0x020000, and there are four of them, located at the following Peripheral Component Interconnect (PCI) addresses: 0000:7d:00.0 0000:7d:00.1 0000:7d:00.2 0000:7d:00.3.

[0140] / sys / bus / pci / devices / is a directory containing information about all PCI devices in the system. For example, if the operating system is Windows, the server can obtain the network card and its driver files using the following command: D:\>devcon driverfiles*CC_0200*.

[0141] For example: D:\>devcon driverfiles*CC_0200*

[0142] PCI\VEN_10EC&DEV_8168&SUBSYS_304517AA&REV_06\01000000684CE00000

[0143] Name:Realtek PCIe GbE Family Controller

[0144] Driver installed from C:\WINDOWS\INF\:

[0145] C:\WINDOWS\system32\DRIVERS\rt640x64.sys.

[0146] The device identifier is:

[0147] PCI\VEN_10EC&DEV_8168&SUBSYS_304517AA&REV_06\01000000684CE00000. Device name: Realtek PCIe GbE Family Controller. Driver installation source: C:\WINDOWS\INF. Driver file source: C:\WINDOWS\system32\DRIVERS\rt640x64.sys.

[0148] For example, the command is as follows:

[0149] In another example, if the operating system is VMware ESXi, the server can obtain the network card and the network card driver file by using the following command: exemplarily, the command is localcli hardware pci list -c0x0200.

[0150] S630: The server obtains hardware driver information based on the driver device information and the driver file.

[0151] Hardware driver information includes the driver device information, the corresponding driver, the driver file, and the dependencies between the driver and the driver file. Driver and driver file dependencies refer to the driver files required by the driver at runtime. By understanding these dependencies, you can better configure and install hardware driver devices.

[0152] In an embodiment of the present application, the server obtains a driver corresponding to the hardware device information based on the driver device information.

[0153] For example, if the operating system is Red Hat, the server can use the lspci -sBDF -v command to obtain the driver corresponding to the hardware device based on the driver device information, and use the lsmod command to obtain the driver files that the driver depends on, and obtain the dependency relationship between the driver and the driver files.

[0154] For example, if the operating system is a Windows system, the server extracts all drivers and dependent driver files based on the driver device information and driver files through the information in the inf file, and obtains the dependency relationship between the drivers and the driver files.

[0155] For example, if the operating system is a VMware ESXi system, the driver name in the driver device information is used to query the driver and the dependent driver files, and obtain the dependency relationship between the driver and the driver files.

[0156] Furthermore, when the server generates the response file, it obtains the configuration file.

[0157] The configuration file may be in the form of a file or a command file, which is not specifically limited in the embodiment of the present application.

[0158] In one example, if the operating system is a RedHat system, network configuration information is obtained from the first extraction path, firewall configuration information is obtained from the second extraction path, startup information is obtained from the third extraction path, selinux configuration information is obtained from the fourth extraction path, and other configuration information is obtained from the fifth extraction path.

[0159] The first, second, third, fourth, and fifth extraction paths are paths set by those skilled in the art as needed. For example, the first extraction path is the / etc / sysconfig / network-scripts directory, the second extraction path is the iptables-config, ip6tables-config, and firewalld files in the etc / sysconfig / directory, the third extraction path is the / etc / sysconfig / grub file, the fourth extraction path is the / etc / sysconfig / selinux file, and the fifth extraction path is the / etc / directory.

[0160] In another example, if the operating system is a Windows system, the server obtains the network card configuration information through a first extraction command and obtains the firewall configuration rules through a second extraction command.

[0161] The first extraction command and the second extraction command are extraction commands set by those skilled in the art as needed. For example, the first extraction command includes commands such as ipconfig, tracert, arp, route, and netstat, and the second extraction command is a netsh command.

[0162] In another example, if the system is a VMware ESXi system, the server obtains the firewall configuration file from the sixth extraction path, obtains the network configuration information through the third extraction command, and obtains other configuration information through the fourth extraction command.

[0163] The sixth extraction path and the third and fourth extraction commands are configured as needed by those skilled in the art. For example, the sixth extraction path is the / etc / vmware / firewall directory. The third extraction command includes esxcfg-vswitch, esxcfg-vmknic, and the localcli command to obtain network configuration information. The fourth extraction command is the localcli command.

[0164] The above-mentioned method of generating a response file and extracting hardware driver information and configuration files can be implemented based on an automated script.

[0165] In addition, when generating the response file, the server may also generate other information required for deploying the operating system, which is not specifically limited in the embodiments of the present application.

[0166] Therefore, the embodiments of the present application can generate a response file, hardware driver information, and configuration files required for system deployment in a unified manner, regardless of the operating system manufacturer and version, with strong versatility. Furthermore, hardware driver information and configuration files can be obtained while generating the response file, thereby improving acquisition efficiency.

[0167] In addition, the control platform 110 can also generate a response file, hardware driver information and configuration file through the system disk mounted on the server. Figure 8 ~Attachment Figure 10 Provide detailed explanation.

[0168] Attachment Figure 8 This is a timing diagram of a response file generation method provided in an embodiment of the present application. The method includes:

[0169] S810. The server enters the response file generation interface.

[0170] The answer file generation interface is used to trigger the server to generate an answer file. This interface includes an answer file template selection option and a system disk mount operation option. The server can use the system disk mount operation option to obtain deployment information. The answer file template selection option allows you to select the answer file template corresponding to the operating system.

[0171] For example, Figure 9A This is a schematic diagram of an interface for entering a response file generation interface provided by an embodiment of the present application. The specific steps are: ⑤→⑥→⑦→⑧. Among them, ⑤ and Figure 5 ① is the same as ⑥ Figure 5 ② is the same as ⑦ Figure 5 The same as ③. I will not elaborate on it here.

[0172] ⑧: The server enters the response file generation interface.

[0173] Exemplarily, the SP main interface includes a response file generation item. The user enters the response file generation interface by triggering the response file generation item. Exemplarily, as shown in FIG7 , the SP main interface may also include a response file generation item. After the user triggers the response file generation item on the SP main interface, the response file generation interface is entered. Figure 9B This is a schematic diagram of the response file generation interface provided by the embodiment of the present application. The response file generation interface includes a response file template selection item and a system disk mount operation item. For example, Figure 9B As shown, users can select system disk A as the mount ( Figure 9B Schematically), system disk A is the disk where the operating system is installed. Users can use the corresponding response file module, Figure 9B Shows the corresponding answer file template if the operating system is Window system.

[0174] S820. Obtain a response file template.

[0175] S830, mount the system disk.

[0176] For example, the user selects the system disk where the operating system is located, and mounts the system disk to the target location using a mount command. For example, the mount command is a mout command, and the mount location is the / home / old_os directory.

[0177] Among them, steps S820 and S830 can be performed simultaneously, or S820 can be performed first and then S830, or S830 can be performed first and then S820. The embodiment of this application is not specifically limited.

[0178] S840. Obtain deployment information through the mounted system disk.

[0179] For example, if the operating system is Red Hat, the server obtains the system deployment software list from the system disk through the rpm command, extracts the system language from the / home / old_os / etc / locale.conf file, extracts the system keyboard from the / home / old_os / etc / locale.conf file, obtains the system time zone information from ll / etc / localtime, and obtains the system root password from the / home / old_os / etc / shadow file.

[0180] S850: Generate a response file based on the response file template and the deployment information.

[0181] Furthermore, the server generates a response file, or after generating a response file and extracting hardware driver information or configuration information, sends the information to the control platform 110 for storage to perform operating system deployment.

[0182] For example, after the SP obtains the response file, hardware driver information, and configuration file, it can send the information to the SP portion of the out-of-band management software via the Peripheral Component Interconnect Express (PCIe) or the Intelligent Platform Management Interface (IPMI). The response file, hardware driver information, and configuration file of the SP portion of the out-of-band management software are then exported through the iBMC and stored in the control platform 110. Centrally storing response files, hardware driver information, and configuration files from different servers on a single platform facilitates unified management and maintenance. Users can access relevant information for all servers through a single control platform 110, eliminating the need to log in to each server individually for management.

[0183] Furthermore, the embodiment of the present application also provides a method for batch deployment of operating systems, wherein the control platform 110 deploys the operating systems of multiple servers using the response file generated in the above manner.

[0184] For ease of description, the server generating the response file is referred to as the first server, and the server to be deployed with the operating system is referred to as the second server. The control platform 110 can batch deploy the operating system to multiple second servers based on the response file generated by the first server.

[0185] Exemplarily, the control platform 110 may also extract hardware driver information based on the first server, and update the driver of the target operating system for multiple second servers after the operating system is deployed.

[0186] Exemplarily, the control platform 110 may also update the configuration of the operating system for multiple second servers after the operating system is deployed based on the configuration file extracted by the first server.

[0187] Since the operating system is deployed in the same way on multiple second servers, the following description will be made using one second server as an example. Figure 10 A schematic diagram of a method for batch deployment of operating systems provided in an embodiment of the present application, the method includes the following contents:

[0188] S1001: The control platform 110 sends an operating system deployment task to the server.

[0189] An operating system deployment task instructs a server to deploy a target operating system. The task includes a target response file corresponding to the target operating system. This target response file is generated using the response file generation method described above.

[0190] In addition, the operating system deployment task may also include hardware driver information and / or configuration files.

[0191] The control platform 110 can send the operating system deployment task to the server through the network interface. Furthermore, to ensure the security of task transmission, a secure communication protocol can be used to send the operating system deployment task.

[0192] In an embodiment of the present application, the BMC of the server receives the operating system deployment task, and saves the target response file, and / or hardware driver information, and / or configuration file received in the operating system deployment task to a preset storage area of ​​the hard disk.

[0193] The preset storage area refers to a storage space divided in the hard disk for storing deployment information, and / or hardware driver information, and / or configuration files and other information related to the deployment of the operating system. In addition, the preset storage area is also used to store installation environment information.

[0194] S1002: The processor of the server starts to deploy the operating system from the preset storage area in the hard disk, and deploys the target operating system based on the target response document.

[0195] The processor loads the installation environment information from the preset storage area of ​​the hard disk and starts to deploy the operating system. In addition, the processor also obtains the target response file from the preset storage area and deploys the operating system based on the target response file.

[0196] Furthermore, the processor may further adjust the driver of the target operating system based on the hardware driver information in the preset storage area and may also configure the target operating system based on the configuration file in the preset storage area.

[0197] Attachment Figure 11 A flowchart of a specific operating system deployment method provided in an embodiment of the present application. The server to be deployed includes an iBMC and an SP. The method specifically includes the following steps:

[0198] a: The control platform 110 sends an operating system deployment task to the iBMC of the server.

[0199] b: The iBMC caches the operating system deployment task in the cache area of ​​the hard disk.

[0200] c: iBMC starts the SP.

[0201] The SP identifies installation information such as a target response file, hardware driver information, and / or configuration file corresponding to the operating system deployment task.

[0202] d: The SP stores the installation information in the preset storage area of ​​the hard disk.

[0203] The SP initiates the installation operation from the preset storage area.

[0204] e: After the SP is started, the target operating system deployment is completed.

[0205] Specifically, the SP deploys the target operating system based on the target response file, and loads and upgrades the driver based on the hardware driver information.

[0206] f: After the target operating system is installed, it restarts and completes the configuration update of the target operating system based on the configuration file.

[0207] g: The target operating system feeds back the system installation and driver installation results to the control platform 110 .

[0208] In summary, the control platform 110 can issue operating system deployment tasks in batches, and each server independently executes the operation of deploying the target operating system based on the target response file. This process not only simplifies the administrator's operation, but also improves the efficiency and accuracy of deployment, ensuring the consistency and stability of the server cluster. Furthermore, when the embodiment of the present application performs operating system deployment, there is no need to perform system mirroring, thereby reducing the coupling between operating system deployment and system mirroring, and when performing operating system deployment, there is no need to perform operating system adaptation, thereby reducing the workload of operating system adaptation and improving the efficiency of operating system adaptation.

[0209] It should be noted that in the embodiments of the present application, when deploying the operating system and generating the response file, the control platform 110 can control the corresponding server to execute, or the first server in the deployment system can directly generate the response file. In this case, the first server no longer receives control instructions from the control platform 110, but directly obtains the response file template and deployment information, and generates the response file based on the response file template and deployment information.

[0210] When the second server deploys the operating system, it no longer receives the operating system deployment task issued by the control platform 110. Instead, it receives the operating system deployment task sent by the first server and deploys the operating system. Since the other specific implementation steps are consistent with the above-mentioned method of the first server generating the response file and the second server deploying the operating system under the control of the control platform, they are not discussed here.

[0211] The present application also provides a computer program product including instructions. The computer program product may be software or a program product including instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on a computing device, the computing device executes the above-described response file generation method or operating system deployment method.

[0212] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center that contains one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the above-mentioned response file generation method or operating system deployment method.

[0213] The descriptions of the processes or structures corresponding to the above figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.

[0214] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for generating a response file, characterized in that: Applied to the first server, the method includes: When the first server completes the deployment of the operating system, obtaining a response file template and deployment information corresponding to the operating system, the deployment information being setting information required for deploying the operating system; Based on the answer file template and the deployment information, an answer file corresponding to the operating system is generated; the answer file is used to guide other servers to deploy the operating system.

2. The method according to claim 1, characterized in that If the operating system is a Windows system, the answer file template corresponding to the Windows operating system is a first answer file template, the first answer file template includes one or more of a system language addition location, a keyboard layout addition location, a time zone information addition location, or a system disk partition addition location, and the deployment information includes one or more of the system language, keyboard layout, time zone information, or system disk partition information; Generating the response file based on the response file template and the deployment information includes: The first response file template is filled based on the deployment information to obtain a response file corresponding to the Windows system.

3. The method according to claim 1, characterized in that If the operating system is a Red Hat system, the answer file template corresponding to the Red Hat operating system is a second answer file template, the second answer file template includes one or more of a system language addition location, a keyboard layout addition location, a time zone information addition location, a system disk partition addition location, a first addition location for adding a system deployment software list, or a second addition location for adding a system root password, and the deployment information includes one or more of a system deployment software list, a system root password, a system language, a keyboard layout, time zone information, or system disk partition information; Generating the response file based on the response file template and the deployment information includes: The second response file template is filled based on the deployment information to obtain a response file corresponding to the Red Hat system.

4. The method according to claim 1, wherein The operating system is a VMware ESXi system, the answer file template corresponding to the VMware ESXi operating system is a third answer file template, the third answer file template includes a second adding location or a third adding location for adding network configuration information, and the deployment information includes a system root password or network configuration information; Generating the response file based on the response file template and the deployment information includes: The second response file template is filled based on the deployment information to obtain a response file corresponding to the VMware ESXi system.

5. The method according to claim 1, wherein The method further comprises: Obtaining hardware driver information and configuration files corresponding to the operating system; The hardware driver information includes the driver program, driver file, and dependency relationship between the driver program and the driver file corresponding to the driver device information; and the configuration file includes the configuration information required during the configuration process of the operating system.

6. An operating system deployment method, characterized in that: Applied to a second server, the second server includes a management controller (BMC), a hard disk, and a processor, the BMC is connected to the hard disk, and the processor is connected to the hard disk, including: The BMC receives an operating system deployment task, where the operating system deployment task is used to indicate the deployment of a target operating system, and the operating system deployment task includes a target response file corresponding to the target operating system; The processor starts a deployment operating system from a preset storage area in the hard disk, and deploys the target operating system based on the target response file.

7. The configuration method according to claim 6, characterized in that: The operating system deployment task also includes: hardware driver information, the hardware driver information including a driver corresponding to the driver device information, a driver file, and a dependency relationship between the driver and the driver file; The method further comprises: The processor performs driver adjustment on the target operating system based on the hardware driver information.

8. The configuration method according to claim 6 or 7, characterized in that: The operating system deployment task further includes: a configuration file, wherein the configuration file includes configuration information required during the configuration process of the target operating system; The method further includes: the processor configuring the target operating system based on the configuration file.

9. A server, characterized in that: The server includes: a BMC and a processor; The BMC is coupled to the processor; The BMC is used to complete the operating system deployment; The processor is configured to execute the response file generation method according to any one of claims 1 to 5.

10. A server, characterized in that: The server includes: a BMC, a hard disk and a processor; The BMC is connected to the hard disk, and the processor is connected to the hard disk; The BMC is used to receive an operating system deployment task, where the operating system deployment task is used to indicate the deployment of a target operating system, and the operating system deployment task includes a target response file corresponding to the target operating system; The processor executes the operating system deployment method according to any one of claims 6 to 8.