CN112486508B - Deployment method of operating system, server and computer storage medium - Google Patents

Deployment method of operating system, server and computer storage medium Download PDF

Info

Publication number
CN112486508B
CN112486508B CN201910867337.5A CN201910867337A CN112486508B CN 112486508 B CN112486508 B CN 112486508B CN 201910867337 A CN201910867337 A CN 201910867337A CN 112486508 B CN112486508 B CN 112486508B
Authority
CN
China
Prior art keywords
operating system
deployment
image
server
mirror image
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.)
Active
Application number
CN201910867337.5A
Other languages
Chinese (zh)
Other versions
CN112486508A (en
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.)
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software 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 China Mobile Communications Group Co Ltd, China Mobile Suzhou Software Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201910867337.5A priority Critical patent/CN112486508B/en
Publication of CN112486508A publication Critical patent/CN112486508A/en
Application granted granted Critical
Publication of CN112486508B publication Critical patent/CN112486508B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The embodiment of the invention discloses a deployment method of an operating system, a server and a computer storage medium, wherein the method comprises the following steps: mounting the Virtual media to a mounting point of a deployment server, wherein the mounting point is used for guiding a deployment mirror image; sending a starting instruction to a target server, wherein the starting instruction is used for guiding the target server to load the deployment mirror image into the deployment server and starting an agent in the deployment mirror image; mounting an operating system mirror image needing to be installed on the target server; and performing installation operation of the operating system mirror image according to the type of the operating system mirror image needing to be installed, so as to realize uniform installation of various operating systems for the server of the enterprise.

Description

Deployment method of operating system, server and computer storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a deployment method of an operating system, a server, and a computer storage medium.
Background
The operating system is a computer program for managing and controlling the interaction between computer hardware and software resources, and is directly operated on a computer bare computer consisting of a plurality of hardware, and any software which is not the operating system needs to access the hardware resources through the operating system. The operating system is an interface for interaction between a user and hardware, is also an interface between software and hardware, and bears the standard work of computer hardware management, software and data resource scheduling and allocation, human-computer interaction interface improvement and other hardware and software access, and better provides hardware resources for the user and the software. Compared with a computer without an operating system, the pure hardware access mode of the computer with the operating system has the advantages of strong expansibility, more reasonable resource allocation, high interactive experience quality and the like, and the operating system is software which is necessary to the computer at present.
Generally, each operating system has a default installation tool or process, and a user can manually complete installation of the operating system according to an operation document of the operating system. At present, an operating system commonly used by enterprises and personal users is an x86 architecture operating system, the x86 architecture operating system comprises a Windows operating system and a Linux operating system, and the Windows operating system and the Linux operating system have a relatively comprehensive internet ecological chain and a perfect back-end maintenance group. In addition, the x86 architecture server is different from a Personal Computer (PC) service Computer, is a server commonly used by current enterprise public users, and has certain challenges for deploying an operating system for an enterprise server, on one hand, because the requirements of the server on a Windows operating system and a Linux operating system cannot be unified; on the other hand, the operating logics of the Windows operating system and the Linux operating system are different, i.e. the operating logics cannot be unified. Under the circumstance, how to uniformly install the operating system for the server of the enterprise becomes an urgent problem to be solved.
Disclosure of Invention
In view of this, embodiments of the present invention provide a deployment method of an operating system, a server, and a computer storage medium to solve at least one problem in the prior art, and uniformly install various types of operating systems for servers of an enterprise.
In order to achieve the above purpose, the technical solution of the embodiment of the present invention is implemented as follows:
in a first aspect, an embodiment of the present invention provides a data processing method, where the method includes:
mounting the Virtual media to a mounting point of a deployment server, wherein the mounting point is used for guiding a deployment mirror image;
sending a starting instruction to a target server, wherein the starting instruction is used for guiding the target server to load the deployment mirror image into the deployment server and starting an agent in the deployment mirror image;
mounting an operating system mirror image needing to be installed on the target server;
and performing installation operation of the operating system image according to the type of the operating system image needing to be installed.
In the above technical solution, the performing, according to the type of the os image to be installed, an installation operation of the os image includes:
the agent monitors an operating system image needing to be installed on the target server and determines whether the operating system image needing to be installed is an ISO format image;
if the operating system mirror image needing to be installed is determined to be an ISO format mirror image, the installation operation of the ISO format mirror image is carried out;
and if the operating system image needing to be installed is determined to be a non-ISO format image, injecting the operating system image needing to be installed into a disk of the target server.
In the above technical solution, the performing an installation operation of an ISO format mirror includes:
and the agent sends a preset instruction to the ISO format mirror image installation component, wherein the preset instruction is used for guiding the ISO format mirror image installation component to install the ISO format mirror image.
In the above technical solution, before mounting an operating system image to be installed on the target server, the method further includes:
and receiving a load completion instruction, and unloading the deployment mirror mounted by the Virtual media, wherein the load completion instruction is used for indicating that the target server has completed loading the deployment mirror.
In the above technical solution, before the mounting the Virtual media to the mount point of the deployment server, the method further includes:
receiving a deployment request, the deployment request including an operating system type;
and acquiring the relevant information of the operating system according to the type of the operating system.
In the above technical solution, the information related to the operating system includes an address of a disk installed in the operating system;
the mounting the Virtual media to the mounting point of the deployment server includes:
determining whether an address of the operating system installation disk exists;
and if the address of the operating system installation disk exists, mounting the Virtual media to a mounting point of a deployment server.
In a second aspect, an embodiment of the present invention provides a deployment server for an operating system, where the server includes:
the system comprises a first mounting unit, a second mounting unit and a third mounting unit, wherein the first mounting unit is used for mounting a Virtual media to a mounting point of a deployment server, and the mounting point is used for guiding a deployment mirror image;
a sending unit, configured to send a start instruction to a target server, where the start instruction is used to guide the target server to load the deployment image into the deployment server, and start an agent in the deployment image;
the second mounting unit is used for mounting the operating system mirror image to be installed on the target server;
and the processing unit is used for carrying out corresponding installation operation of the operating system image according to the type of the operating system image needing to be installed.
In the above technical solution, the processing unit is specifically configured to monitor an operating system image that needs to be installed on the target server by the agent, determine whether the operating system image that needs to be installed is an ISO format image, and obtain a first determination result;
determining the operating system mirror image needing to be installed as an ISO format mirror image according to the first judgment result, and performing installation operation of the ISO format mirror image;
and determining that the operating system image needing to be installed is a non-ISO format image according to the first judgment result, and injecting the operating system image needing to be installed into a disk of the target server.
In a third aspect, an embodiment of the present invention provides a server, where the server includes a network interface, a memory, and a processor;
wherein the network interface is configured to implement connection communication between the components;
the memory configured to store a computer program operable on the processor;
the processor is configured to perform the method of the first aspect when running the computer program.
In a fourth aspect, an embodiment of the present invention provides a computer storage medium storing a computer program, which when executed by at least one processor implements any one of the methods of the first aspect.
According to the deployment method of the operating system, the server and the computer storage medium provided by the embodiment of the invention, the Virtual media is mounted to the mounting point of the deployment server, the starting instruction is sent to the target server, the target server is guided by the starting instruction to load the deployment mirror image into the deployment server, and the agent in the deployment mirror image is started; mounting an operating system mirror image needing to be installed on the target server; and according to the type of the operating system image to be installed, carrying out installation operation of the operating system image, namely mounting the Virtual media and the operating system image to be installed, and according to the type of the operating system image to be installed, carrying out installation operation of the operating system image, so as to realize unified installation of various types of operating systems for the servers of enterprises.
Drawings
Fig. 1 is a first schematic flow chart illustrating an implementation process of a deployment method of an operating system according to an embodiment of the present invention;
fig. 2 is a schematic flow chart illustrating an implementation process of a deployment method of an operating system according to an embodiment of the present invention;
fig. 3 is a first schematic diagram illustrating a deployment method of an operating system according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a deployment method of an operating system according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a deployment server of an operating system according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a specific hardware structure of a server according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the following describes specific technical solutions of the present invention in further detail with reference to the accompanying drawings in the embodiments of the present invention. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
At present, an enterprise usually completes operating system deployment by using a Preboot execution Environment (PXE) technology, that is, an operating system is installed on a target server, that is, a server of an operating system to be installed by using a certain degree of automation technology, so that automatic installation of a Linux operating system and installation of a Windows operating system can be completed.
The PXE technology is a technology developed by Intel corporation to support a Client/Server (Client/Server) network mode, a computer downloads an image file from a remote Server through a network, and thus starts an operating system through the network, during the starting process, the computer requires the Server to allocate an available Internet Protocol (IP) address, and accesses a designated image Server through the IP address to load the image file into a local memory for execution, thereby completing the installation of the operating system through network boot.
At present, other technologies for installing an operating system are derived based on the PXE technology, such as iPXE technology and gPXE technology, and the partial virtualization technology also inherits the PXE technology, such as VMware technology and Libvirt technology. Compared with the traditional mode of installing the operating system, the PXE technology has obvious advantages, for example, the operating system can be automatically installed. However, the use of interface logic by PXE technology has two disadvantages:
1) Deployment of operating systems by data center scale servers (especially in large scale environments) over a network can inevitably impact other services already running in the data center. Generally, computers in a data center all perform delivery services in stages, and therefore, if the data center performs the delivery services, the use of a network inevitably affects the bandwidth of the delivery services, which increases the operation and maintenance difficulty and the uncertainty of the services.
2) The security and isolation of the operating system deployed through the network cannot be guaranteed, that is, not only is a malicious network attack of a data center environment initiated by a user using the part of the network (the network in which the operating system is deployed) avoided, but also the smooth network for delivering services is guaranteed in the process of deploying various types of operating systems.
The PXE technology uses an interface, and deploys an operating system through a network, which will conflict with the network used by the data center, thus causing the above two disadvantages. The embodiment of the present invention provides a method for deploying an operating system, which does not use a PXE technology to deploy the operating system, and thus does not share a network with a data center, and does not rely on the network to deploy the operating system, and the above problems in deploying the operating system based on the PXE technology do not exist.
An embodiment of the present invention provides a deployment method of an operating system, and fig. 1 is a first schematic flow chart illustrating an implementation process of the deployment method of the operating system provided in the embodiment of the present invention, as shown in fig. 1, the method mainly includes the following steps:
step 101, mounting a Virtual media (Virtual media) to a mounting point of a deployment server, wherein the mounting point is used for guiding a deployment mirror image.
It should be noted that the deployment server mounts the Virtual media to a mount point of the deployment server, where the deployment image is an intermediate file of an operating system image that needs to be installed. The traditional Virtual media can only mount an ISO-format mirror image, but the Virtual media in the embodiment of the invention can mount the ISO-format mirror image firstly and then mount a non-ISO-format mirror image in the subsequent installation process.
It should be noted that, before mounting the Virtual media to the mount point of the deployment server, the deployment server may further receive a deployment request, where the deployment request includes an operating system type; and acquiring the relevant information of the operating system according to the type of the operating system. The deployment server is preset with a corresponding relation between the operating system type and the operating system related information, that is, the operating system related information of the operating system to be installed, such as the address of the operating system installation disk, can be obtained through the operating system type in the deployment request and the corresponding relation between the operating system type and the operating system related information; and if the address of the operating system for installing the disk does not exist, the subsequent process of installing the operating system cannot be carried out.
Step 102, sending a start instruction to a target server, where the start instruction is used to guide the target server to load the deployment image into the deployment server, and start an agent (agent) in the deployment image.
It should be noted that, after the deployment server mounts the Virtual media to the mount point of the deployment server, the deployment server may send a start instruction to the target server, where the target server is a server of the operating system to be installed, and the start instruction includes an address of the deployment mirror, where the address may be a Uniform Resource Locator (URL). The deployment mirror image comprises an agent, and after the target server receives the starting instruction, the deployment mirror image can be loaded according to the starting instruction, and the agent in the deployment mirror image is started, wherein the agent is a software or hardware entity capable of autonomously moving and is used for assisting in installing the operating system.
And 103, mounting the operating system mirror image needing to be installed on the target server.
It should be noted that, after the target server loads the deployment mirror image and starts the agent in the deployment mirror image, the deployment server mounts the operating system mirror image that needs to be installed onto the target server.
Before mounting an operating system mirror image to be installed on the target server, after the target server finishes loading the deployment mirror image, sending a loading completion instruction to the deployment server, wherein the loading completion instruction is used for indicating that the target server finishes loading the deployment mirror image, the deployment server receives the loading completion instruction, determines that the target server finishes loading the deployment mirror image according to the loading completion instruction, unloads the deployment mirror image mounted by the Virtual media, and mounts the operating system mirror image to be installed on the target server.
And 104, performing installation operation of the operating system image according to the type of the operating system image needing to be installed.
It should be noted that the type of the operating system image to be installed may be an ISO format image, such as a Linux operating system image, or may also be a non-ISO format image, that is, a disk format image, such as a Windows operating system. After the deployment server mounts the operating system mirror image to be installed on the target server, the agent monitors the operating system mirror image to be installed on the target server, and then determines whether the operating system mirror image to be installed is an ISO format mirror image; if the operating system mirror image needing to be installed is determined to be an ISO format mirror image, the installation operation of the ISO format mirror image is carried out; and if the operating system image needing to be installed is determined to be a non-ISO format image, injecting the operating system image needing to be installed into a disk of the target server. The agent can determine whether the operating system image to be installed is an ISO format image according to the byte section of the specific position in the operating system image to be installed, and perform corresponding installation operation of the operating system image.
It should be noted that when it is determined that the operating system image to be installed is an ISO format image, the agent sends a preset instruction to the ISO format image installation component, where the preset instruction is used to guide the ISO format image installation component to install the ISO format image. In the embodiment of the invention, manual intervention operation is integrated into a preset instruction in advance, and after determining that the operating system image to be installed is the ISO format image, an agent sends the preset instruction to an ISO format image installation component, so that the ISO format image installation component installs the ISO format image after receiving the preset instruction.
An embodiment of the present invention provides a deployment method of an operating system, and fig. 2 is a schematic flow chart illustrating an implementation process of the deployment method of the operating system provided in the embodiment of the present invention, as shown in fig. 2, the method mainly includes the following steps:
step 201, a deployment server receives a user login request, wherein the user login request comprises a user name and a user password.
It should be noted that, when a user needs to log in the deployment server (operating system deployment device), a user name and a user password are input on the deployment server, and then the deployment server receives a user login request, where the user login request is used to request to log in the deployment server.
As shown in fig. 3, the deployment server may receive a user login request through a RESTful Application Programming Interface (API) or a WebBrowser control, so as to enable a user to access the deployment server.
Step 202, the deployment server verifies the user login request according to the user name and the user password in the database, and if the user login request passes the verification, the step 203 is carried out; if the verification is not passed, the current flow is ended.
It should be noted that, a corresponding table of user names and user passwords is pre-established in the database, after the deployment server receives the user login request, the user name 1 and the user password 1 in the user login request are matched with the user name and the user password in the database, and when the matching is successful, the verification is passed, and the procedure goes to step 203; and when the matching fails, indicating that the verification fails and ending the current flow.
Step 203, the deployment server receives a deployment request, where the deployment request includes a target server identifier and an operating system type input by a user.
It should be noted that, after the user successfully logs in the deployment server, the server of the operating system to be installed, which is displayed on the deployment server, that is, the target server may be selected through an input interface on the deployment server, and the operating system that the user needs to install, such as a Windows operating system or a Linux operating system, may be selected through an input frame roller of a sliding input interface, for example, the user may select the target server or the operating system type, or may directly input the target server or the operating system type through the input interface, and the user completes input of the target server and the operating system type on the input interface, that is, a deployment request is formed, so that the deployment server receives the deployment request, where the deployment request is used to instruct the deployment server to deploy the operating system on the target server, and the deployment request includes the target server identifier and the operating system type input by the user on the input interface, where the target server identifier is used to uniquely identify the target server, so that the deployment server confirms the server that the user needs to install the operating system; the operating system type is used to identify the type of operating system that needs to be installed on the target server.
As shown in fig. 4, the deployment server includes an operating system deployment control layer, where the operating system deployment control layer may receive the user login request and the deployment request through a RESTful Application Programming Interface (API) or a WebBrowser control, and implement that the user accesses the deployment server.
In addition, the user may also input an installation extension instruction of the operating system in advance, that is, initialization information of the operating system, which is information that is automatically started after the operating system is installed, for example, information of the operating system, hardware information, and adaptation information.
And step 204, the deployment server acquires the address of the operating system installation disk according to the type of the operating system.
It should be noted that, the deployment server presets a corresponding relationship between the operating system type and the operating system related information, that is, the operating system related information of the operating system to be installed, for example, an address of an operating system installation disk, can be obtained by using the operating system type in the deployment request and the corresponding relationship between the operating system type and the operating system related information.
Step 205, the deployment server determines whether the address of the operating system installation disk exists, if so, the step 206 is carried out; if not, the current flow ends.
It should be noted that the address of the operating system installation disk obtained through the correspondence between the type of the operating system and the information related to the operating system, which is preset in the deployment server, may be absent, where the information related to the operating system includes the address of the operating system installation disk, and if the address of the operating system installation disk is absent, the subsequent process of installing the operating system cannot be performed; if the address of the operating system for installing the disk exists, the subsequent process of installing the operating system can be carried out.
Here, the deployment server may verify whether a process of subsequently installing the operating system can be performed by determining whether an address of the operating system installation disk exists. In addition, the user may further input a user name 2 and a user password 2 on the deployment server to determine whether the user has the right to install the operating system on the target server, where the user name 2 and the user password 2 may not be identical to or identical to the user name 1 and the user password 1 in step 201, that is, the deployment server may further verify the user name 2 and the user password 2 input by the user based on the user name and the user password in the database, and if the verification is successful, it indicates that the user has the right to install the operating system on the target server; if the verification fails, the user does not have the authority to install the operating system on the target server. In step 201, the user name 1 and the user password 1 in the user login request are used to determine whether the user has the right to log in the deployment server, and the user name 2 and the user password 2 are used to determine whether the user has the right to install the operating system on the target server.
Step 206, the deployment server obtains the corresponding Virtual media (Virtual media) according to the target server identifier.
It should be noted that, the deployment server is preset with a corresponding relationship between the server identifier and the Virtual media, and the Virtual media corresponding to the target server identifier can be obtained through the target server identifier and the corresponding relationship between the server identifier and the Virtual media.
As shown in fig. 4, the deployment server further includes a Virtual media access driver layer, and the Virtual media access driver layer may obtain the corresponding Virtual media according to the target server identifier.
Step 207, the deployment server mounts the Virtual media to a mount point of the deployment server, wherein the mount point is used for guiding a deployment mirror image, and the deployment mirror image is an intermediate file of the operating system mirror image required to be installed.
It should be noted that Mirroring (Mirroring) is a file storage form, that is, data on one disk has an identical copy on another disk, and common mirror file formats include ISO format mirror and disk format mirror.
Mounting refers to a process by which computer files and directories on a storage device (e.g., hard disk, CD-ROM, or shared resource) can be accessed via the computer's file system. The mount point refers to the entry directory of the disk file system in the Linux system, similar to the drive letter used to access different partitions in the Windows system, such as C:, D:, E:.
It should be noted that the conventional Virtual media can only mount an ISO format image (the Virtual media defaults to have a self-boot ISO image function), but in the embodiment of the present invention, the Virtual media may mount the ISO format image first, and then mount a non-ISO format image in a subsequent installation process. The deployment server mounts the Virtual media to a directory of a deployment mirror image, wherein the deployment mirror image is an intermediate file of an operating system mirror image needing to be installed and is an ISO format mirror image.
And 208, the deployment server sends a starting instruction to the target server according to the target server identifier, wherein the starting instruction is used for guiding the target server to load the deployment mirror image into the deployment server.
It should be noted that, after the deployment server mounts the Virtual media to the mount point of the deployment server, the deployment server sends a start instruction to the target server according to the target server identifier in the deployment request, where the start instruction is used to guide the target server to load the deployment mirror image into the deployment server, and the start instruction includes an address of the deployment mirror image, where the address may be a Uniform Resource Locator (URL).
As shown in fig. 4, the deployment server further includes a server management access driving layer, where the server of the operating system to be installed may access the deployment server through the server management access driving layer, and after the server of the operating system to be installed accesses the deployment server, the deployment server may send a start instruction to the target server according to the target server identifier.
Step 209, the target server receives the start instruction and loads the deployment mirror image according to the start instruction.
It should be noted that, after the target server receives the start instruction, the start instruction is analyzed, and the deployment image is loaded into the deployment server according to the address of the deployment image in the start instruction, for example, the deployment image is loaded into the deployment server according to the URL in the start instruction.
As shown in fig. 3, after the deployment server mounts the Virtual media, a start instruction may be sent to the target server, and the target server receives the start instruction and loads the deployment mirror image according to the start instruction.
Step 210, the target server starts an agent (agent) in the deployment image, and the agent is used for assisting in installing the operating system.
It should be noted that an agent is a software or hardware entity that can autonomously act, and is used to assist in installing an operating system.
Step 211, the target server sends a load completion instruction to the deployment server, where the load completion instruction is used to indicate that the target server has completed loading the deployment mirror.
And 212, the deployment server receives the loading completion instruction and unloads the deployment mirror image mounted by the Virtual media.
It should be noted that, after receiving the load completion instruction, the deployment server learns that the target server has completed loading the deployment image, and then unloads the deployment image mounted with the Virtual media.
And step 213, the deployment server mounts the operating system mirror image to be installed on the target server according to the target server identifier.
It should be noted that, after the deployment server unloads the deployment image mounted with the Virtual media, the operating system image to be installed needs to be mounted on the target server.
As shown in fig. 4, the operating system deployment control layer in the deployment server may further receive a load completion instruction sent by the target server, and mount the operating system image to be installed on the target server according to the target server identifier.
Step 214, agent monitors the operating system mirror image needing to be installed on the target server, determines whether the operating system mirror image needing to be installed is an ISO format mirror image, and if the operating system mirror image needing to be installed is the ISO format mirror image, the step 215a is carried out; if the operating system image to be installed is not an ISO format image, then step 215b is entered.
It should be noted that, after the target server loads the deployment mirror image, and starts the agent in the deployment mirror image, the agent will monitor the target server all the time to implement the auxiliary installation of the operating system, the agent determines whether the operating system mirror image to be installed is mounted on the preset address of the target server, the preset address of the target server can be preset in the agent, the preset address can be a default disk identifier, such as C, D, and E, when the agent determines that the operating system mirror image to be installed is mounted on the preset address of the target server, that is, when the agent monitors the operating system mirror image to be installed on the target server, the agent starts to identify the type of the operating system mirror image to be installed, that is, identify the byte section at a specific position in the mirror image, and when the operating system mirror image to be installed is determined to be an ISO format mirror image according to the field, such as the Linux operating system mirror image, step 215a is performed; when it is determined that the operating system image to be installed is not an ISO format image, i.e., a disk format image, such as a Windows operating system, according to the field, the process proceeds to step 215b.
In step 215a, agent sends a preset instruction to the ISO format mirror image installation component, and then executes step 216a.
It should be noted that, because the installation process of the ISO format mirror image requires manual intervention of an operation and maintenance person, the conventional Virtual media cannot implement full-automatic installation of the ISO format mirror image, in the embodiment of the present invention, a manual intervention operation is pre-integrated into a preset instruction, the manual intervention operation may be a user click operation, or an input operation of a user on an input interface, and the like, and after determining that the operating system mirror image to be installed is the ISO format mirror image, the agent sends the preset instruction to the ISO format mirror image installation component, so that the ISO format mirror image installation component installs the ISO format mirror image after receiving the preset instruction.
And step 216a, the ISO format mirror image installation component installs the ISO format mirror image according to a preset instruction.
It should be noted that after receiving a preset instruction, the ISO format mirror image installation component parses the preset instruction, and performs manual intervention operation in the ISO format mirror image installation process according to operations such as user click operation, input operation, and the like in the preset instruction, where the preset instruction may include one manual intervention operation or multiple manual intervention operations, and when the preset instruction includes one manual intervention operation, the ISO format mirror image installation component performs one manual intervention operation according to the preset instruction; when the preset instruction comprises multiple times of manual intervention operation, the ISO format mirror image installation assembly performs multiple times of manual intervention operation according to the preset instruction and the preset sequence, so that automatic installation of the ISO format mirror image is achieved, and manual intervention of operation and maintenance personnel is not needed.
Step 215b, agent injects the operating system image to be installed into the disk of the target server.
It should be noted that, the agent uses a virtual operating system simulator (QEMU) or a DD tool (for reading and writing a disk), and directly injects the operating system image to be installed into the disk of the target server, thereby completing the installation of the operating system.
Based on the same inventive concept of the foregoing embodiments, an embodiment of the present invention provides a deployment server of an operating system, and fig. 5 is a schematic structural diagram of a deployment server 500 of an operating system provided in an embodiment of the present invention, as shown in fig. 5, where the server 500 includes:
a first mounting unit 501, configured to mount a Virtual media to a mounting point of a deployment server, where the mounting point is used to guide a deployment mirror;
a sending unit 502, configured to send a start instruction to a target server, where the start instruction is used to guide the target server to load the deployment image into the deployment server, and start an agent in the deployment image;
a second mounting unit 503, configured to mount an operating system image to be installed on the target server;
the processing unit 504 is configured to perform an installation operation of the corresponding os image according to the type of the os image to be installed.
It should be noted that, the processing unit 504 is specifically configured to monitor the operating system image that needs to be installed on the target server by the agent, and determine whether the operating system image that needs to be installed is an ISO format image; if the operating system mirror image needing to be installed is determined to be an ISO format mirror image, the installation operation of the ISO format mirror image is carried out; and if the operating system image needing to be installed is determined to be a non-ISO format image, injecting the operating system image needing to be installed into a disk of the target server.
It should be noted that the processing unit 504 is specifically configured to, if it is determined that the operating system image to be installed is an ISO format image, send a preset instruction to an ISO format image installation component by the agent, where the preset instruction is used to guide the ISO format image installation component to install the ISO format image.
It should be noted that the server 500 may further include:
a receiving unit 505, configured to receive a load completion instruction, and unload the deployment image mounted by the Virtual media, where the load completion instruction is used to indicate that the target server has completed loading the deployment image.
It should be noted that the server 500 may further include:
an obtaining unit 506, configured to receive a deployment request, where the deployment request includes an operating system type; and acquiring the relevant information of the operating system according to the type of the operating system.
It should be noted that the information related to the operating system includes an address of an operating system installed disk, and the first mount unit 501 is specifically configured to determine whether the address of the operating system installed disk exists; and if the address of the operating system installation disk exists, mounting the Virtual media to a mounting point of a deployment server.
The components in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware or a form of a software functional module.
Based on the understanding that the technical solutions of the embodiments of the present invention are essentially or partially contributed to by the prior art, or all or part of the technical solutions may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Accordingly, embodiments of the present invention provide a computer storage medium storing a computer program that, when executed by at least one processor, performs the steps of the above-described embodiments.
Referring to fig. 6, a specific hardware structure of a server 600 provided in an embodiment of the present invention is shown, including: a network interface 601, a memory 602, and a processor 603; the various components are coupled together by a bus system 604. It is understood that the bus system 604 is used to enable connected communication between these components. The bus system 604 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 604 in fig. 6.
The network interface 601 is configured to receive and transmit signals in a process of receiving and transmitting information with other external network elements;
a memory 602 for storing a computer program capable of running on the processor 603;
a processor 603 for, when running the computer program, performing:
mounting the Virtual media to a mounting point of a deployment server, wherein the mounting point is used for guiding a deployment mirror image;
sending a starting instruction to a target server, wherein the starting instruction is used for guiding the target server to load the deployment mirror image into the deployment server and starting an agent in the deployment mirror image;
mounting an operating system mirror image needing to be installed on the target server;
and performing installation operation of the operating system image according to the type of the operating system image needing to be installed.
The processor 603 is further configured to, when running the computer program, perform:
the agent monitors an operating system image needing to be installed on the target server and determines whether the operating system image needing to be installed is an ISO format image;
if the operating system mirror image needing to be installed is determined to be an ISO format mirror image, the installation operation of the ISO format mirror image is carried out;
and if the operating system image needing to be installed is determined to be a non-ISO format image, injecting the operating system image needing to be installed into a disk of the target server.
The processor 603 is further configured to, when running the computer program, perform:
and the agent sends a preset instruction to the ISO format mirror image installation component, wherein the preset instruction is used for guiding the ISO format mirror image installation component to install the ISO format mirror image.
The processor 603 is further configured to, when running the computer program, perform:
and receiving a load completion instruction, and unloading the deployment mirror mounted by the Virtual media, wherein the load completion instruction is used for indicating that the target server has completed loading the deployment mirror.
The processor 603 is further configured to, when running the computer program, perform:
receiving a deployment request, the deployment request including an operating system type;
and acquiring the relevant information of the operating system according to the type of the operating system.
The information related to the os includes an address of a disk installed in the os, and the processor 603 is further configured to execute, when the computer program is executed:
the mounting the Virtual media to the mounting point of the deployment server includes:
determining whether an address of the operating system installation disk exists;
and if the address of the operating system installation disk exists, mounting the Virtual media to a mounting point of a deployment server.
It will be appreciated that the memory 602 in embodiments of the invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. The volatile Memory may be a Random Access Memory (RAM) which serves as an external cache. By way of illustration and not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), enhanced Synchronous SDRAM (ESDRAM), sync Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 702 of the methodologies described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
And the processor 603 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 603. The Processor 603 may be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 602, and the processor 603 reads the information in the memory 602, and combines the hardware thereof to complete the steps of the above method.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present invention, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention. The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It should be noted that, in this document, 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 phrases "comprising a component of' 8230; \8230;" does not exclude the presence of another like element in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other manners. The above-described terminal embodiments are only illustrative, for example, the division of the unit is only a logical function division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or in other forms.
The methods disclosed in the several method embodiments provided in the present application may be combined arbitrarily without conflict to obtain new method embodiments.
Features disclosed in several of the product embodiments provided in the present application may be combined in any combination to yield new product embodiments without conflict.
The features disclosed in the several method or apparatus embodiments provided in the present application may be combined arbitrarily, without conflict, to arrive at new method embodiments or apparatus embodiments.

Claims (8)

1. A method for deploying an operating system, the method comprising:
mounting the Virtual media to a mounting point of a deployment server, wherein the mounting point is used for guiding a deployment mirror image;
sending a starting instruction to a target server, wherein the starting instruction is used for guiding the target server to load the deployment mirror image into the deployment server and starting an agent in the deployment mirror image;
mounting an operating system mirror image needing to be installed on the target server;
according to the type of the operating system image needing to be installed, the installation operation of the operating system image is carried out;
the installing operation of the operating system image according to the type of the operating system image needing to be installed comprises the following steps:
the agent monitors an operating system image needing to be installed on the target server and determines whether the operating system image needing to be installed is an ISO format image;
if the operating system mirror image needing to be installed is determined to be an ISO format mirror image, the installation operation of the ISO format mirror image is carried out;
and if the operating system image needing to be installed is determined to be a non-ISO format image, injecting the operating system image needing to be installed into a disk of the target server.
2. The method of claim 1, wherein performing the installation operation of the ISO format image comprises:
and the agent sends a preset instruction to the ISO format mirror image installation component, wherein the preset instruction is used for guiding the ISO format mirror image installation component to install the ISO format mirror image.
3. The method of claim 1, wherein prior to mounting the operating system image to be installed on the target server, the method further comprises:
and receiving a load completion instruction, and unloading the deployment mirror mounted by the Virtual media, wherein the load completion instruction is used for indicating that the target server has completed loading the deployment mirror.
4. The method of claim 1, wherein prior to said mounting the Virtual media to the mount point of the deployment server, the method further comprises:
receiving a deployment request, the deployment request including an operating system type;
and acquiring the relevant information of the operating system according to the type of the operating system.
5. The method of claim 4, wherein the operating system related information includes an address of an operating system installation disk;
the mounting the Virtual media to the mounting point of the deployment server comprises the following steps:
determining whether an address of the operating system installation disk exists;
and if the address of the operating system installation disk exists, mounting the Virtual media to a mounting point of a deployment server.
6. A deployment server for an operating system, the server comprising:
the system comprises a first mounting unit, a second mounting unit and a third mounting unit, wherein the first mounting unit is used for mounting a Virtual media to a mounting point of a deployment server, and the mounting point is used for guiding a deployment mirror image;
a sending unit, configured to send a start instruction to a target server, where the start instruction is used to guide the target server to load the deployment image into the deployment server, and start an agent in the deployment image;
the second mounting unit is used for mounting the operating system mirror image to be installed on the target server;
the processing unit is used for carrying out corresponding installation operation of the operating system mirror image according to the type of the operating system mirror image needing to be installed;
the processing unit is specifically configured to monitor an operating system image to be installed on the target server by the agent, and determine whether the operating system image to be installed is an ISO format image; if the operating system mirror image needing to be installed is determined to be an ISO format mirror image, the installation operation of the ISO format mirror image is carried out; and if the operating system image needing to be installed is determined to be a non-ISO format image, injecting the operating system image needing to be installed into a disk of the target server.
7. A server, comprising a network interface, a memory, and a processor; wherein,
the network interface is configured to realize connection communication between the components;
the memory configured to store a computer program operable on the processor;
the processor, when executing the computer program, is configured to perform the method of any of claims 1 to 5.
8. A computer storage medium, characterized in that the computer storage medium stores a computer program which, when executed by at least one processor, implements the method according to any one of claims 1 to 5.
CN201910867337.5A 2019-09-12 2019-09-12 Deployment method of operating system, server and computer storage medium Active CN112486508B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910867337.5A CN112486508B (en) 2019-09-12 2019-09-12 Deployment method of operating system, server and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910867337.5A CN112486508B (en) 2019-09-12 2019-09-12 Deployment method of operating system, server and computer storage medium

Publications (2)

Publication Number Publication Date
CN112486508A CN112486508A (en) 2021-03-12
CN112486508B true CN112486508B (en) 2023-04-07

Family

ID=74920708

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910867337.5A Active CN112486508B (en) 2019-09-12 2019-09-12 Deployment method of operating system, server and computer storage medium

Country Status (1)

Country Link
CN (1) CN112486508B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113986358B (en) * 2021-09-26 2023-12-26 阿里巴巴(中国)有限公司 Bare metal example installation method, device and equipment
CN114884812A (en) * 2022-04-20 2022-08-09 深圳市同泰怡信息技术有限公司 Method and device for automatically installing OS (operating system) by sharing same PXE (PCI extensions for instrumentation) server by multiple platforms

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514023A (en) * 2013-10-22 2014-01-15 中国科学院信息工程研究所 Method and system for off-line and automatically installing software of virtual machine
US20170109176A1 (en) * 2015-10-16 2017-04-20 Quanta Computer Inc. iSCSI BASED BARE METAL OS IMAGE DEPLOYMENT AND DISKLESS BOOT
CN107479888A (en) * 2017-08-11 2017-12-15 携程旅游信息技术(上海)有限公司 Operating system mirror image deployment services device method, system, equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514023A (en) * 2013-10-22 2014-01-15 中国科学院信息工程研究所 Method and system for off-line and automatically installing software of virtual machine
US20170109176A1 (en) * 2015-10-16 2017-04-20 Quanta Computer Inc. iSCSI BASED BARE METAL OS IMAGE DEPLOYMENT AND DISKLESS BOOT
CN107479888A (en) * 2017-08-11 2017-12-15 携程旅游信息技术(上海)有限公司 Operating system mirror image deployment services device method, system, equipment and storage medium

Also Published As

Publication number Publication date
CN112486508A (en) 2021-03-12

Similar Documents

Publication Publication Date Title
US11474829B2 (en) Customizing program logic for booting a system
US7650490B2 (en) Embedded device for implementing a boot process on a host
US9465625B2 (en) Provisioning of operating environments on a server in a networked environment
AU2012242758B2 (en) Deployment system for multi-node applications
US7512833B1 (en) Universal imaging utility program
CN112130917B (en) Remote loading system mirror image method
CN108958742A (en) A kind of method of batch installing operating system, relevant device and system
US20130254759A1 (en) Installing an operating system in a host system
US8245022B2 (en) Method and system to support ISCSI boot through management controllers
USRE44299E1 (en) System and method for enabling automated run-time input to network bootstrapping processes
US20060155838A1 (en) Program installation system and method using the same
CN113741914B (en) Operating system installation mechanism
US20090254641A1 (en) Network card capable of remote boot and method thereof
US20120005321A1 (en) Router and remote boot method using the router
CN112486508B (en) Deployment method of operating system, server and computer storage medium
US20100205420A1 (en) System and method for realizing remote test on computer apparatus without storage device
CN102662884A (en) Device driving program configuration method based on network
US8117432B2 (en) Method for controlling boot sequence of server
US8762701B2 (en) Process for installing a computer image and joining a computer to a directory based on a unique identifier associated with an end-user
US10776132B1 (en) System and method for preboot device driver provisioning for remotely-staged operating system
CN107659621B (en) RAID control card configuration method and device
CN114115920A (en) Operating system deployment method, system, device and computer-readable storage medium
CN112416446A (en) Linux network starting method and device based on Microsoft deployment system
CN114265628B (en) Operating system deployment method, device, electronic equipment, storage medium and system
CN111209078A (en) Method and system for automatically deploying and detecting Web application of virtual machine

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
GR01 Patent grant
GR01 Patent grant