CN114816454A - PXE server deployment method, device and medium - Google Patents

PXE server deployment method, device and medium Download PDF

Info

Publication number
CN114816454A
CN114816454A CN202210467062.8A CN202210467062A CN114816454A CN 114816454 A CN114816454 A CN 114816454A CN 202210467062 A CN202210467062 A CN 202210467062A CN 114816454 A CN114816454 A CN 114816454A
Authority
CN
China
Prior art keywords
file
configuration file
installation configuration
server
uefi
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210467062.8A
Other languages
Chinese (zh)
Inventor
江涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jinan Inspur Data Technology Co Ltd
Original Assignee
Jinan Inspur Data Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jinan Inspur Data Technology Co Ltd filed Critical Jinan Inspur Data Technology Co Ltd
Priority to CN202210467062.8A priority Critical patent/CN114816454A/en
Publication of CN114816454A publication Critical patent/CN114816454A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to the field of computer systems, and discloses a PXE server deployment method, device and medium, which comprise: acquiring a mirror image file of a virtualization system to acquire a file required for installing the virtualization system in a server; and analyzing the mirror image file to obtain a configuration file, an unattended installation configuration file and an installation configuration file, starting a configuration service corresponding to the configuration file, and writing the installation configuration file into the configuration service. And modifying the unattended installation configuration file and the guide menu file according to the types of the mirror image file and the installation configuration file, so that the virtualization system can be guided to be installed in the server. According to the scheme, the uefi installation configuration file and the legacy installation configuration file are both written into the configuration service to build a virtualization system installation environment, and relevant files are modified, so that the virtualization system can be deployed in the uefi starting mode server and the legacy starting mode server.

Description

PXE server deployment method, device and medium
Technical Field
The present application relates to the field of computer systems, and in particular, to a PXE server deployment method, apparatus, and medium.
Background
In the implementation delivery or daily maintenance of the virtualized product, an operating system needs to be installed in a target server frequently, and the number of the target servers is large, even reaching tens of thousands. In order to reduce the time required to install a virtualization system and improve the virtualization system installation efficiency, a Preboot eXecution Environment (PXE) server is generally used to install virtualization systems in batches.
A conventional PXE server can only be used for installing a virtualization system in a legacy mode server, but with the large amount of domestic CPUs put into use, more and more servers are set to a Unified Extensible Firmware Interface (uefi) mode when leaving a factory, which results in that the current PXE server cannot install a virtualization system in these servers, and the uefi mode needs to be manually switched to the legacy mode, which increases excessive time cost and labor cost.
Therefore, how to provide a PXE server capable of installing virtualization systems in batches in both a uefi-mode server and a legacy-mode server is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a PXE server deployment method, a PXE server deployment device and a PXE server deployment medium, so that the aim of installing virtualization systems in batches in both a uefi-mode server and a legacy-mode server is achieved.
In order to solve the above technical problem, the present application provides a PXE server deployment method, including:
acquiring a mirror image file of a virtualization system;
analyzing the mirror image file to obtain an environment configuration file and an unattended installation configuration file, and starting a configuration service corresponding to the environment configuration file;
acquiring an installation configuration file of the image file, and writing the installation configuration file into the configuration service, wherein the installation configuration file comprises a uefi installation configuration file and a legacy installation configuration file, and both the uefi installation configuration file and the legacy installation configuration file comprise a boot file and a boot menu file;
and modifying each unattended installation configuration file and each boot menu file according to the types of the image file and the installation configuration file so as to complete the deployment of the PXE server.
Preferably, the server to be installed is in legacy boot mode, and the acquiring the installation configuration file of the image file includes:
acquiring the legacy boot file, legacy boot menu file and legacy kernel file in the mirror image file;
the server to be installed is in a uefi starting mode, and the obtaining of the installation configuration file of the image file comprises the following steps:
establishing a uefi guide file through grub2-efi-modules, and writing the uefi guide file into a preset storage area;
and acquiring an initial uefi guide menu file from the mirror image file, and modifying the initial uefi guide menu file to acquire the uefi guide menu file.
Preferably, after the step of modifying each unattended installation configuration file and each boot menu file according to the types of the image file and the installation configuration file, the method further includes:
modifying the dynamic host configuration file of the PXE server to declare a legacy boot type and a uefi boot type.
Preferably, after the step of creating the boot menu and the boot file corresponding to the image file, the method further includes:
when detecting the dhcp request sent by the server to be installed, allocating a first IP for the server to be installed;
analyzing the dhcp request to obtain a starting mode of the server to be loaded;
and sending a second IP corresponding to the starting mode to the server to be installed, so that the server to be installed acquires the unattended installation configuration file, the guidance file and the guidance menu file according to the second IP and installs the virtualization system.
Preferably, the sending the second IP corresponding to the start mode to the server to be installed includes:
if the starting mode is the legacy starting mode, the second IP is a storage path of the legacy boot file;
and if the starting mode is the uefi starting mode, the second IP is the storage path of the uefi guide file.
Preferably, the server to be installed is a server which is in the same local area network as the PEX server and is started in a PXE (peripheral component interconnect express) mode.
Preferably, before the step of obtaining the image file of the virtualization system, the method further includes:
and forbidding a firewall system of the server to be installed.
In order to solve the foregoing technical problem, the present application further provides a PXE server deployment apparatus, including:
the first acquisition module is used for acquiring a mirror image file of the virtualization system;
the starting module is used for analyzing the mirror image file to obtain an environment configuration file and an unattended installation configuration file, and starting a configuration service corresponding to the environment configuration file;
the second acquisition module is used for acquiring the installation configuration file of the image file and writing the installation configuration file into the configuration service, wherein the installation configuration file comprises a uefi installation configuration file and a legacy installation configuration file, and both the uefi installation configuration file and the legacy installation configuration file comprise a guide file and a guide menu file;
and the modification module is used for modifying each unattended installation configuration file and each boot menu file according to the types of the image files and the installation configuration files so as to complete the deployment of the PXE server.
In order to solve the foregoing technical problem, the present application further provides a PXE server deployment apparatus, which is characterized by comprising a memory for storing a computer program;
and the processor is used for realizing the steps of the PXE server deployment method when the computer program is executed.
In order to solve the above technical problem, the present application further provides a computer readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps of the PXE server deployment method.
The PXE server deployment method provided by the application comprises the following steps: acquiring a mirror image file of a virtualization system to acquire a file required for installing the virtualization system in a server; analyzing the image file to obtain a configuration file and an unattended installation configuration file, starting a configuration service corresponding to the configuration file, obtaining the installation configuration file of the image file, writing the installation configuration file into the configuration service, wherein the installation configuration file comprises a uefi installation configuration file and a legacy installation configuration file, and both the uefi installation configuration file and the legacy installation configuration file comprise a boot file and a boot menu file, so that a virtual system installation environment is built in the PXE server. And modifying the unattended installation configuration file and the guide menu file according to the types of the mirror image file and the installation configuration file, so that the virtualization system can be guided to be installed in the servers in the uefi mode and the legacy mode. Therefore, according to the technical scheme provided by the application, the installation environment of the virtualization system is built by writing both the uefi installation configuration file and the legacy installation configuration file into the configuration service, and the unattended installation configuration file and the guide menu file in the system are modified, so that the virtualization system can be deployed in the server in the uefi starting mode and the server in the legacy starting mode.
In addition, the application also provides a PXE server deployment device and medium, which correspond to the method and have the same effects as the method.
Drawings
In order to more clearly illustrate the embodiments of the present application, the drawings needed for the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a schematic diagram of an application scenario of a PXE server according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a PXE server deployment method according to an embodiment of the present disclosure;
fig. 3 is a block diagram of a PXE server deployment device according to an embodiment of the present disclosure;
fig. 4 is a block diagram of another PXE server deployment device according to an embodiment of the present disclosure;
the reference numbers are as follows: the system comprises a PXE server 1, a server to be installed, a two-layer switch 3, a first acquisition module 10, a starting module 11, a second acquisition module 12, a modification module 13, a memory 20, a processor 21, a display screen 22, an input/output interface 23, a communication interface 24, a power supply 25, a communication bus 26, a computer program 201, an operating system 202 and data 203.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the present application.
The core of the application is to provide a PXE server deployment method, device and medium.
In an application scenario of delivery or operation and maintenance of a virtualized product, a PXE server is generally required to install a virtualized operating system on a large number of terminal devices in batch, but the existing PXE server can only install the virtualized system in a legacy mode terminal device, so that the terminal device in the uefi mode needs to be manually switched to the legacy mode, which wastes human resources and time. In a specific implementation, a PXE server first obtains an image file of a virtualized system to be installed, analyzes the image file to obtain a configuration file, builds a local yum source in the PXE server, modifies a related configuration file, and starts a related configuration service required by installing the system. And importing installation configuration files such as boot files of a legacy mode and a uefi mode into a configuration service, so as to build a virtual system installation environment in the PXE server, and modifying each unattended installation configuration file and each boot menu file according to the types of the mirror image file and the installation configuration file, so as to complete the deployment of the PXE server. So that the user can conveniently install the virtualization system on the terminal equipment in batch through the PXE server.
Fig. 1 is a schematic view of an application scenario of a PXE server according to an embodiment of the present disclosure, as shown in fig. 1, a PXE server 1 and each server 2 to be installed are located under a same two-layer switch 3, and each server 2 to be installed obtains installation-related files and data through the PXE server 1 to complete installation. The to-be-installed server 2 may be a legacy mode-started device or a uefi mode-started device, and the PXE server 1 may operate in a window system or a Linux system, which is not limited herein.
Fig. 2 is a flowchart of a PXE server deployment method according to an embodiment of the present disclosure, where as shown in fig. 2, the method includes:
s10: and acquiring an image file of the virtualization system.
S11: and analyzing the mirror image file to obtain an environment configuration file and an unattended installation configuration file, and starting a configuration service corresponding to the environment configuration file.
In specific implementation, when a PXE server is deployed, an image file of a to-be-installed virtualization system needs to be acquired, and the image file may be stored in a local storage device or a cloud server; it can be understood that when the image file is stored in the cloud server, version verification and integrity verification are required to be performed on the image file when the image file is acquired, so as to ensure that the image file is usable.
After the image file is determined, the image file is written into a storage device (a local hardware storage device or a cloud hard disk), and the storage device is mounted to the PXE server.
It is understood that the image file may be a window system image file or a Linux system image file.
In specific implementation, a local software package installation management (yum) source is established according to the acquired source File, required files such as Dynamic Host Configuration Protocol (dhcp) service, hypertext Transfer Protocol (htpdd) service, simple File Transfer Protocol (TFTP) service, syslinux, lftp service and the like are downloaded according to a yum source, and the service is started after relevant Configuration of the services is Modified, so that a PXE server installation environment is initially established.
S12: the method comprises the steps of obtaining an installation configuration file of an image file, writing the installation configuration file into a configuration service, wherein the installation configuration file comprises a uefi installation configuration file and a legacy installation configuration file, and both the uefi installation configuration file and the legacy installation configuration file comprise a boot file and a boot menu file.
In a specific implementation, in order to ensure that the PXE server can install the virtualization system in the server to be installed, the installation configuration file needs to be imported into the boot service, so that the server to be installed can obtain the installation configuration file through the boot service, where the legacy installation configuration file and the uefi installation configuration file both include related kernel files, such as a boot file pxelinux.0, a boot menu file isoclinux.cfg, vmlinux.imz and initrd.img, and these files are written into the TFTP service.
However, the installation configuration file and the unattended installation configuration file required by the legacy boot mode can be obtained by analyzing the image file, but the installation configuration file and the unattended installation configuration file in the uefi mode are different and need to be additionally created. In a specific implementation, the grub2-efi-modules are used to create a uefi bootstrap file. In addition, the grub.cfg boot menu file in the image file needs to be copied to the tftpboost directory, and kernel files such as vmlinux, initdrd.img in the image file need to be copied to the tftpboost directory, so as to complete the function of the PXE server boot uefi system.
S13: and modifying each unattended installation configuration file and each boot menu file according to the types of the image file and the installation configuration file so as to complete the deployment of the PXE server.
After the uefi installation configuration file and the legacy installation configuration file are obtained, the corresponding installation configuration file and the unattended installation configuration file need to be modified, so that the PXE server can install the virtualization system in the servers with different starting modes according to the corresponding configuration file.
In specific implementation, a ks file in an image file of a virtualization system is imported into a PXE server, a specified index address in the ks file is modified to be an html address directory of the image file, and a boot menu file is modified to be a boot menu file special for deploying the virtualization system, so that the PXE server can boot normally when the virtualization system is installed.
The embodiment provides a PXE server deployment method, which comprises the following steps: acquiring a mirror image file of a virtualization system to acquire a file required for installing the virtualization system in a server; analyzing the image file to obtain a configuration file and an unattended installation configuration file, starting a configuration service corresponding to the configuration file, obtaining the installation configuration file of the image file, writing the installation configuration file into the configuration service, wherein the installation configuration file comprises a uefi installation configuration file and a legacy installation configuration file, and both the uefi installation configuration file and the legacy installation configuration file comprise a boot file and a boot menu file, so that a virtual system installation environment is built in the PXE server. And modifying the unattended installation configuration file and the guide menu file according to the types of the mirror image file and the installation configuration file, so that the virtualization system can be guided to be installed in the servers in the uefi mode and the legacy mode. Therefore, according to the technical scheme provided by the application, the installation environment of the virtualization system is built by writing both the uefi installation configuration file and the legacy installation configuration file into the configuration service, and the unattended installation configuration file and the guide menu file in the system are modified, so that the virtualization system can be deployed in the server in the uefi starting mode and the server in the legacy starting mode.
In specific implementation, the configuration required by the legacy mode device and the uefi mode device is different between the file and the boot file, the server to be installed is in a legacy startup mode, and obtaining the installation configuration file of the image file includes:
acquiring a legacy boot file, a legacy boot menu file and a legacy kernel file in the mirror image file;
the server to be installed is in a uefi starting mode, and the obtaining of the installation configuration file of the image file comprises the following steps:
establishing a uefi guide file through grub2-efi-modules, and writing the uefi guide file into a preset storage area;
and acquiring an initial uefi guide menu file from the mirror image file, and modifying the initial uefi guide menu file to acquire the uefi guide menu file.
It should be noted that since the uefi boot file does not exist in the image file, in order to ensure that the uefi system is normally started, the relevant file needs to be created through grub 2-efi-modules.
In a specific implementation, a hard disk storing a virtual machine system image file is firstly mounted to a PXE server, yum local sources are built in a PXE server, and then a "yum install-y grub 2-efi-modules" command installation grub2-efi-modules is run in the server. After successful installation, a uefi boot file is created by using grub2-mkstandalone command, named bootx64.efi, and copied to the/var/lib/tftpboot directory. Specifically, the instruction for creating the uefi bootstrap file in the server is as follows: grub2-mkstandalone-d/usr/lib/grub/x 86-64-efi/-O x 86-64-efi-modules ═ tftp net effect linux part _ gpt effect "-o bootx64. efi.
In the embodiment, a uefi boot file is created through grub2-efi-modules, so that the PXE server can boot and install the virtualization system in the to-be-installed server in the uefi mode.
In specific implementation, after obtaining the relevant file of the boot uefi start-up mode device, in order to ensure that the PXE server can correctly boot the installation of the virtualization system, and reduce the time cost and the labor cost wasted by manual switching, after the step of modifying each unattended installation configuration file and each boot menu file according to the types of the image file and the installation configuration file, the method further includes:
the dynamic host configuration file of the PXE server is modified to declare the legacy boot type and the uefi boot type.
In specific implementation, a grub.cfg file corresponding to a uefi starting mode is modified to be in accordance with a guide menu of a virtualization system, and a system disk starting mode in a ks file corresponding to the uefi mode is modified to be uefi. Specifically, when the grub.cfg file is modified, the grub.conf file under EFI/BOOT/path in the image file is copied to/var/lib/tfpboot, then the grub.conf file is modified, the line of the menu 'installation computing node' is found, the parameters of '/images/pxebot/vmlinux' behind linux are changed into '(tftp)/vmlinux', 'images/pxebot/initd.img' are changed into '(tftp)/vmlinux', and the html directory of the image file is specified after the inst.replay parameter is added according to the BIOS.
And when the ks file is modified, copying the ks file from the mirror image file to a/var/www/html directory, and renaming the ks file to be inode. The boot disk fstype in this file is modified to efi and the "/boot/efi" parameter is added after part and the — asprimary parameter is added after size. The remaining parameters are modified according to the ks file of legacy.
After the configuration file is modified, the PXE server boot installation function is built, in order to ensure that the boot function is normally used, the configuration file of the dynamic host computer needs to be modified, and specifically, an option PXE-system-type code 93 is added to an unsigned integer 16; the boot type statement, at the same time, the following script is written, so that the dhcp service can boot the boot file of the corresponding mode:
Figure BDA0003624797700000091
in this embodiment, the dynamic host configuration file, the grub.conf file and the ks file are modified, so that the PXE server can normally execute the work of booting the installation of the virtualization system.
On the basis of the embodiment, in an application scenario of the PXE server batch installation virtualization system after deployment is completed,
when the PXE server detects a dhcp request sent by a server to be installed, a first IP is distributed to the server to be installed; meanwhile, the PXE server analyzes the dhcp request to obtain a starting mode of the server to be installed, and sends a second IP corresponding to the starting mode to the server to be installed according to the starting mode, wherein if the starting mode is a legacy starting mode, the second IP is a storage path of a legacy boot file; and if the starting mode is the uefi starting mode, the second IP is the storage path of the uefi guide file. And the server to be installed acquires the unattended installation configuration file, the guidance file and the guidance menu file according to the second IP and installs the virtualization system. The server to be installed downloads a corresponding ks file from the PXE server according to the boot menu file, and requests the image file of the virtualization system according to the url in the ks file, so that a required software package installation source is downloaded to install the operating system
It should be noted that the server to be installed is a server which is in the same local area network as the PXE server and is started in the "PXE start". In addition, in order to ensure that the boot process operates normally and prevent the installation failure caused by network limitation, on the basis of the above embodiment, operations of disabling the SELinux service of the standby server and the firewall system need to be performed.
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings.
In the foregoing embodiment, a PXE server deployment method is described in detail, and the present application also provides an embodiment corresponding to a PXE server deployment apparatus. It should be noted that the present application describes the embodiments of the apparatus portion from two perspectives, one from the perspective of the function module and the other from the perspective of the hardware.
Fig. 3 is a structural diagram of a PXE server deployment apparatus according to an embodiment of the present application, including:
a first obtaining module 10, configured to obtain an image file of a virtualization system;
the starting module 11 is configured to analyze the image file to obtain an environment configuration file and an unattended installation configuration file, and start a configuration service corresponding to the environment configuration file;
the second obtaining module 12 is configured to obtain an installation configuration file of the image file, and write the installation configuration file into the configuration service, where the installation configuration file includes a uefi installation configuration file and a legacy installation configuration file, and both the uefi installation configuration file and the legacy installation configuration file include a boot file and a boot menu file;
and the modification module 13 is configured to modify each unattended installation configuration file and each boot menu file according to the types of the image file and the installation configuration file, so as to complete deployment of the PXE server.
Since the embodiments of the apparatus portion and the method portion correspond to each other, please refer to the description of the embodiments of the method portion for the embodiments of the apparatus portion, which is not repeated here.
The embodiment provides a PXE server deployment device, which includes: acquiring a mirror image file of a virtualization system to acquire a file required for installing the virtualization system in a server; analyzing the image file to obtain a configuration file and an unattended installation configuration file, starting a configuration service corresponding to the configuration file, obtaining the installation configuration file of the image file, writing the installation configuration file into the configuration service, wherein the installation configuration file comprises a uefi installation configuration file and a legacy installation configuration file, and both the uefi installation configuration file and the legacy installation configuration file comprise a guide file and a guide menu file, so that a virtualized system installation environment is built in the PXE server. And modifying the unattended installation configuration file and the guide menu file according to the types of the mirror image file and the installation configuration file, so that the virtualization system can be guided to be installed in the servers in the uefi mode and the legacy mode. Therefore, according to the technical scheme provided by the application, the installation environment of the virtualization system is built by writing both the uefi installation configuration file and the legacy installation configuration file into the configuration service, and the unattended installation configuration file and the guide menu file in the system are modified, so that the virtualization system can be deployed in the server in the uefi starting mode and the server in the legacy starting mode.
Fig. 4 is a structural diagram of another PXE server deployment apparatus according to an embodiment of the present disclosure, and as shown in fig. 4, the PXE server deployment apparatus includes: a memory 20 for storing a computer program;
the processor 21 is configured to implement the steps of the PXE server deployment method according to the above embodiment when executing a computer program.
The standby server and the PXE server provided by the embodiment may include, but are not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, or the like.
The processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The Processor 21 may be implemented in hardware using at least one of a Digital Signal Processor (DSP), a Field-Programmable Gate Array (FPGA), and a Programmable Logic Array (PLA). The processor 21 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a Graphics Processing Unit (GPU) which is responsible for rendering and drawing the content required to be displayed by the display screen. In some embodiments, the processor 21 may further include an Artificial Intelligence (AI) processor for processing computational operations related to machine learning.
The memory 20 may include one or more computer-readable storage media, which may be non-transitory. Memory 20 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used for storing the following computer program 201, wherein after being loaded and executed by the processor 21, the computer program can implement the relevant steps of the PXE server deployment method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202, data 203, and the like, and the storage manner may be a transient storage manner or a permanent storage manner. Operating system 202 may include, among others, Windows, Unix, Linux, and the like. Data 203 may include, but is not limited to, a uefi boot file, etc.
In some embodiments, the PXE server deploying device may further include a display screen 22, an input/output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
Those skilled in the art will appreciate that the architecture shown in fig. 4 does not constitute a limitation of PXE server deployment apparatus and may include more or fewer components than those shown.
The PXE server deployment apparatus provided in the embodiment of the present application includes a memory and a processor, and when the processor executes a program stored in the memory, the following method can be implemented:
acquiring a mirror image file of a virtualization system;
analyzing the mirror image file to obtain an environment configuration file and an unattended installation configuration file, and starting a configuration service corresponding to the environment configuration file;
acquiring an installation configuration file of the image file, and writing the installation configuration file into a configuration service, wherein the installation configuration file comprises a uefi installation configuration file and a legacy installation configuration file, and both the uefi installation configuration file and the legacy installation configuration file comprise a boot file and a boot menu file;
and modifying each unattended installation configuration file and each boot menu file according to the types of the image file and the installation configuration file so as to complete the deployment of the PXE server.
Finally, the application also provides a corresponding embodiment of the computer readable storage medium. The computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps as set forth in the above-mentioned method embodiments.
It is to be understood that if the method in the above embodiments is implemented in the form of software functional units and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the methods described in the embodiments of the present application, or all or part of the technical solutions. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The PXE server deployment method, apparatus and medium provided by the present application are described in detail above. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A PXE server deployment method is characterized by comprising the following steps:
acquiring a mirror image file of a virtualization system;
analyzing the mirror image file to obtain an environment configuration file and an unattended installation configuration file, and starting a configuration service corresponding to the environment configuration file;
acquiring an installation configuration file of the image file, and writing the installation configuration file into the configuration service, wherein the installation configuration file comprises a uefi installation configuration file and a legacy installation configuration file, and both the uefi installation configuration file and the legacy installation configuration file comprise a boot file and a boot menu file;
and modifying each unattended installation configuration file and each boot menu file according to the types of the image files and the installation configuration files so as to complete the deployment of the PXE server.
2. The PXE server deployment method of claim 1,
the server to be installed is in a legacy boot mode, and the obtaining of the installation configuration file of the image file includes:
acquiring the legacy boot file, legacy boot menu file and legacy kernel file in the mirror image file;
the server to be installed is in a uefi starting mode, and the obtaining of the installation configuration file of the image file comprises the following steps:
establishing a uefi guide file through grub2-efi-modules, and writing the uefi guide file into a preset storage area;
and acquiring an initial uefi guide menu file from the mirror image file, and modifying the initial uefi guide menu file to acquire the uefi guide menu file.
3. The PXE server deployment method according to claim 2, wherein after the step of modifying each of the unattended installation configuration files and each of the boot menu files according to the types of the image file and the installation configuration file, the PXE server deployment method further comprises:
modifying the dynamic host configuration file of the PXE server to declare a legacy boot type and a uefi boot type.
4. The PXE server deployment method according to claim 3, wherein after the step of creating the boot menu and boot file corresponding to the image file, the PXE server deployment method further comprises:
when detecting the dhcp request sent by the server to be installed, allocating a first IP for the server to be installed;
analyzing the dhcp request to obtain a starting mode of the server to be loaded;
and sending a second IP corresponding to the starting mode to the server to be installed, so that the server to be installed acquires the unattended installation configuration file, the guidance file and the guidance menu file according to the second IP and installs the virtualization system.
5. The PXE server deployment method of claim 4, wherein the sending the second IP corresponding to the boot mode to the server to be installed comprises:
if the starting mode is the legacy starting mode, the second IP is a storage path of the legacy boot file;
and if the starting mode is the uefi starting mode, the second IP is the storage path of the uefi guide file.
6. The PXE server deployment method of claim 4, wherein the server to be installed is a server that is in the same local area network as the PEX server and is started in a PXE boot manner.
7. The PXE server deployment method according to any one of claims 2 to 6, wherein before the step of obtaining the image file of the virtualization system, the PXE server deployment method further comprises:
and forbidding a firewall system of the server to be installed.
8. A PXE server deployment apparatus, comprising:
the first acquisition module is used for acquiring a mirror image file of the virtualization system;
the starting module is used for analyzing the mirror image file to obtain an environment configuration file and an unattended installation configuration file, and starting a configuration service corresponding to the environment configuration file;
the second acquisition module is used for acquiring the installation configuration file of the image file and writing the installation configuration file into the configuration service, wherein the installation configuration file comprises a uefi installation configuration file and a legacy installation configuration file, and both the uefi installation configuration file and the legacy installation configuration file comprise a guide file and a guide menu file;
and the modification module is used for modifying each unattended installation configuration file and each boot menu file according to the types of the image files and the installation configuration files so as to complete the deployment of the PXE server.
9. A PXE server deployment apparatus comprising a memory for storing a computer program;
a processor configured to implement the steps of the PXE server deployment method of any one of claims 1-7 when executing the computer program.
10. A computer readable storage medium having stored thereon a computer program that, when executed by a processor, performs the steps of the PXE server deployment method of any of claims 1-7.
CN202210467062.8A 2022-04-29 2022-04-29 PXE server deployment method, device and medium Pending CN114816454A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210467062.8A CN114816454A (en) 2022-04-29 2022-04-29 PXE server deployment method, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210467062.8A CN114816454A (en) 2022-04-29 2022-04-29 PXE server deployment method, device and medium

Publications (1)

Publication Number Publication Date
CN114816454A true CN114816454A (en) 2022-07-29

Family

ID=82509581

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210467062.8A Pending CN114816454A (en) 2022-04-29 2022-04-29 PXE server deployment method, device and medium

Country Status (1)

Country Link
CN (1) CN114816454A (en)

Similar Documents

Publication Publication Date Title
US20040034765A1 (en) Method and apparatus for booting a computer system
EP3518099B1 (en) Installation of operating system
US11016785B2 (en) Method and system for mirror image package preparation and application operation
CN111966423B (en) Method and equipment for realizing memory operating system
CN110737479A (en) method for starting operating system without disk, server and readable storage medium
CN103297504A (en) Method for quickly deploying operating systems in physical bare computers in cloud data center
CN106897093A (en) A kind of dispositions method and device of windows operating systems
CN113741914B (en) Operating system installation mechanism
CN105117268A (en) Installing method and system for automatically installing linux systems
US20210240545A1 (en) Information Handling System And Method To Automatically Synchronize Operating System And Boot Firmware Languages
CN103049295A (en) Network installation method for Linux operating systems with godson platforms
CN112486522A (en) Deployment method and device of OpenStack bare machine with intelligent network card
CN105183528A (en) Server bios upgrading method and system
WO2022199335A1 (en) Method, apparatus and device for controlling firmware upgrade of server component, and storage medium
CN110515671B (en) Initialization method, initialization device, terminal device and readable storage medium
US9411602B2 (en) Techniques for booting an information processing system
US20200349009A1 (en) Information Handling System And Method To Restore System Firmware To A Selected Restore Point
WO2016177261A1 (en) Method and device for online upgrading module based on kernel virtual machine
CN116841629A (en) Network card function configuration method, device and medium thereof
CN113746673B (en) Method, device, equipment and medium for deploying bare metal server ipxe
US20230185580A1 (en) Single node deployment of container platform
CN114816454A (en) PXE server deployment method, device and medium
CN106557354B (en) Method for setting attribute parameters of private image and computer equipment
CN113419814B (en) Virtual machine creating method, device, equipment and storage medium in cloud platform
CN115269021A (en) Operation processing method, device and medium for network card

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination