Operating system deployment method and device, equipment and storage medium
By automatically deploying operating system images from data storage media to system storage media in bare metal servers, the problems of low deployment efficiency and poor stability in traditional methods are solved, and efficient and stable operating system deployment is achieved.
Patent Information
- Application Number
- CN202510280769.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-07-04
AI Technical Summary
Traditional methods are difficult to achieve fast and stable operating system deployment of bare metal servers, and relying on the network results in inefficient deployment efficiency and poor stability.
By uploading the operating system image from the data storage medium to the preset image library, using the initial management system to obtain and store it to the system storage medium, the automatic deployment of the operating system is achieved, network dependence is avoided, and partition management and initial management systems are used to support the deployment process of the operating system.
It improves the deployment efficiency and stability of the operating system, reduces the manual error rate, ensures the security and deployment success rate of system data, and adapts to the needs of different operating systems and applications.
Smart Images

Figure CN120255909A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technologies, and in particular, to technologies such as cloud computing and big data. Background Art
[0002] The operating system deployment of bare metal servers is a key link in building high-performance cloud computing infrastructures and realizing resource utilization and allocation. With the rapid development of cloud computing technologies and the continuous expansion of the scale of data centers, traditional methods are difficult to achieve the rapid deployment of the operating systems of bare metal servers. Therefore, an efficient and stable operating system deployment method for bare metal servers is urgently needed. Summary of the Invention
[0003] The present disclosure provides a method, apparatus, device, and storage medium for operating system deployment of bare metal servers.
[0004] According to one aspect of the present disclosure, there is provided a method for operating system deployment of a bare metal server, including:
[0005] Uploading a first operating system image stored in a first storage medium to a preset image library; wherein the first storage medium is a data storage medium configured for the bare metal server;
[0006] Obtaining the first operating system image from the preset image library through an initial management system installed on the bare metal server;
[0007] Storing the first operating system image in a second storage medium to complete the deployment of the operating system of the bare metal server by using the first operating system image stored in the second storage medium; wherein the second storage medium is a system storage medium configured for the bare metal server.
[0008] According to another aspect of the present disclosure, there is provided an apparatus for operating system deployment of a bare metal server, including:
[0009] A transmission unit, configured to upload a first operating system image stored in a first storage medium to a preset image library; wherein the first storage medium is a data storage medium configured for the bare metal server; and obtaining the first operating system image from the preset image library through an initial management system installed on the bare metal server;
[0010] A deployment unit, configured to store the first operating system image in a second storage medium to complete the deployment of the operating system of the bare metal server by using the first operating system image stored in the second storage medium; wherein the second storage medium is a system storage medium configured for the bare metal server.
[0011] According to another aspect of the present disclosure, there is provided an electronic device, including:
[0012] At least one processor; and
[0013] a memory communicatively connected to the at least one processor; wherein
[0014] the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute any method in the embodiments of the present disclosure.
[0015] According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute any method in the embodiments of the present disclosure.
[0016] According to another aspect of the present disclosure, there is provided a computer program product including a computer program, and when the computer program is executed by a processor, it implements any method in the embodiments of the present disclosure.
[0017] The solution of the present disclosure can utilize a first storage medium (i.e., a data storage medium, rather than a system storage medium) to deploy a first operating system image required for deploying the operating system of a bare metal server to a system storage medium (i.e., a second storage medium). In other words, the solution of the present disclosure can deploy the first operating system image to the local system storage medium of the bare metal server. Therefore, the stability of the operating system in the bare metal server is effectively improved. Moreover, the solution of the present disclosure can be implemented without relying on a network, avoiding deployment failures caused by network problems, and thus improving the stability and success rate of deployment. In addition, the deployment method of the solution of the present disclosure can be automated, improving the deployment efficiency and avoiding deployment failures caused by human errors.
[0018] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understandable through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings are used to better understand the solution and do not constitute a limitation to the present disclosure. Among them:
[0020] Figure 1 is a schematic flowchart of a method for deploying an operating system of a bare metal server according to an embodiment of the present disclosure Figure 1 ;
[0021] Figure 2 is a schematic flowchart of a method for deploying an operating system of a bare metal server according to an embodiment of the present disclosure Figure 2 ;
[0022] Figure 3Schematic flowchart of a method for deploying an operating system of a bare metal server according to an embodiment of the present disclosure Figure 3 ;
[0023] Figure 4 Schematic diagram of the deployment of the operating system of a bare metal server in a specific example according to an embodiment of the present disclosure;
[0024] Figure 5 Structural schematic of an operating system deployment device 500 of a bare metal server according to an embodiment of the present disclosure Figure 1 ;
[0025] Figure 6 Structural schematic of an operating system deployment device 500 of a bare metal server according to an embodiment of the present disclosure Figure 2 ;
[0026] Figure 7 Shows a schematic block diagram of an exemplary electronic device 700 that can be used to implement embodiments of the present disclosure. Detailed implementation manners
[0027] The following describes exemplary embodiments of the present disclosure with reference to the accompanying drawings. Various details of the embodiments of the present disclosure are included to assist understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0028] The term "and / or" in this document is merely a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. The term "at least one" in this document means any one of multiple or any combination of at least two of multiple. For example, including at least one of A, B, and C can represent any one or more elements selected from the set composed of A, B, and C. The terms "first" and "second" in this document represent referring to multiple similar technical terms and distinguishing them, and do not mean limiting the order, or limiting to only two. For example, the first feature and the second feature refer to two types / two features. The first feature can be one or more, and the second feature can also be one or more.
[0029] In addition, for better illustration of the present disclosure, numerous specific details are given in the following detailed implementation manners. Those skilled in the art should understand that the present disclosure can still be implemented without some specific details. In some instances, methods, means, elements, and circuits well-known to those skilled in the art are not described in detail to highlight the gist of the present disclosure.
[0030] The related technologies of the embodiments of the present disclosure are described below. The following related technologies can be arbitrarily combined with the technical solutions of the embodiments of the present disclosure as optional solutions, and they all fall within the protection scope of the embodiments of the present disclosure.
[0031] With the increasing development of cloud computing technology, bare metal servers, as a new type of server form that combines the high performance of physical servers and the flexibility of cloud computing, have gradually received extensive attention and applications.
[0032] The traditional operating system deployment method for bare metal servers often relies on manual operations, which is not only inefficient but also has a high error rate. With the continuous progress of cloud computing technology, automated deployment and intelligent management have become the new trends in the deployment of bare metal server operating systems.
[0033] Currently, a typical practice of this trend is to deploy the operating system of bare metal servers by combining the Preboot Execution Environment (PXE) system and the Trivial File Transfer Protocol (TFTP). Specifically, first, the Basic Input / Output System (BIOS) of the bare metal server is set to the PXE boot mode, and the bare metal server is restarted to automatically enter the PXE system. Second, in the PXE system, the bare metal server obtains the target image file from the TFTP server, stores the target image file locally, and then uses the PXE system to guide the setting of the boot item of the bare metal server. After the setting is completed, it is restarted again to complete the deployment of the operating system.
[0034] During the above process of operating system deployment, the bare metal server needs to be restarted multiple times. Therefore, the efficiency of operating system deployment is reduced. And because the PXE system depends on the network environment, the stability of operating system deployment is reduced.
[0035] Based on this, the solution of the present disclosure provides a deployment solution for the operating system of bare metal servers, which realizes the automated deployment of the operating system of bare metal servers and effectively improves the deployment efficiency and stability of the operating system.
[0036] Specifically, Figure 1 is a schematic flowchart of a method for deploying an operating system of a bare metal server according to an embodiment of the present disclosure Figure 1 . This method is optionally applied to electronic devices, such as personal computers, servers, server clusters and other electronic devices.
[0037] Further, the method at least includes at least part of the following content. As Figure 1 shown, it includes:
[0038] Step S101: Upload the first operating system image stored in the first storage medium to a preset image library.
[0039] Here, the first storage medium is the data storage medium configured for the bare metal server; further, this data storage medium can be used to store relevant data required by the target object. For example, in one example, this data storage medium can specifically be a local data disk.
[0040] Further, in one example, the first storage medium is the virtual machine storage medium configured for the bare metal server; further, this virtual machine storage medium can also specifically be used to store relevant data required by the target object, or can further store relevant data after the bare metal server is virtualized.
[0041] Step S102: Obtain the first operating system image from the preset image library through the initial management system installed on the bare metal server.
[0042] Here, the first operating system image is intended to be used for deploying the operating system of the bare metal server. Further, the operating system of the bare metal server is the operating system instructed to be deployed by the target object.
[0043] Step S103: Store the first operating system image in the second storage medium to complete the deployment of the operating system of the bare metal server by using the first operating system image stored in the second storage medium.
[0044] Here, the second storage medium is the system storage medium configured for the bare metal server. Further, this system storage medium is used to store the operating system instructed to be deployed by the target object. For example, in one example, this system storage medium can specifically be a local system disk.
[0045] In this way, the solution of the present disclosure can use the first storage medium (i.e., the data storage medium, rather than the system storage medium) to deploy the first operating system image required for deploying the operating system of the bare metal server in the system storage medium (i.e., the second storage medium). In other words, the solution of the present disclosure can deploy the first operating system image in the local system storage medium (such as a local system disk) of the bare metal server. Therefore, the stability of the operating system in the bare metal server is effectively improved.
[0046] Moreover, since the above process does not need to rely on the network, in other words, it can be deployed in an offline environment. Therefore, compared with the existing solutions that can only be effectively deployed relying on the network, the solution of the present disclosure effectively avoids deployment failures caused by network problems, thereby improving the stability and success rate of deployment.
[0047] Furthermore, since the deployment method of the solution of the present disclosure can be automated, the deployment is more intelligent and efficient. Compared with manual deployment, it effectively improves the deployment efficiency and also effectively avoids deployment failures caused by manual incorrect operations.
[0048] Further, in a specific example, the second storage medium is used to store system-related data of the operating system required by the target object. For example, in one example, the second storage medium stores the operating system to be deployed as indicated by the target object and the system data related to this operating system.
[0049] Further, in another specific example, the first storage medium is used to store at least some other data for the target object other than the system-related data. For example, in one example, this first storage medium is used to store non-system-related data, in other words, store other data except the system-related data.
[0050] For example, in one example, the first storage medium is the data storage medium configured for the bare metal server, and the second storage medium is the system storage medium configured for the bare metal server. Moreover, the second storage medium is used to store system-related data of the operating system required by the target object.
[0051] Or, in another example, the first storage medium is the data storage medium configured for the bare metal server, and the first storage medium is used to store at least some other data for the target object other than the system-related data; the second storage medium is the system storage medium configured for the bare metal server.
[0052] Or, in yet another example, the first storage medium is the data storage medium configured for the bare metal server, and the first storage medium is used to store at least some other data for the target object other than the system-related data; the second storage medium is the system storage medium configured for the bare metal server, and the second storage medium is used to store system-related data of the operating system required by the target object.
[0053] In this way, since the solution of the present disclosure uses a separate second storage medium to store system-related data of the operating system required by the target object, and uses other storage media, such as the first storage medium, to store at least some other data except the system-related data, the security of the system data is effectively ensured, thereby improving the stability and success rate of the operating system deployment.
[0054] Further, in a specific example, the following method can be used to store the first operating system image in the second storage medium; specifically, storing the first operating system image in the second storage medium (such as step S101) as described above may specifically include:
[0055] Step S101-1: Partition the second storage medium to obtain at least two target partitions.
[0056] Step S101-2: Store the first operating system image in the first target partition of the second storage medium.
[0057] Here, the first target partition is one of the at least two target partitions included in the second storage medium.
[0058] That is to say, in this example, before storing the first operating system image in the second storage medium, the second storage medium can be partitioned first. Here, the purpose of the partitioning process is to divide the second storage medium into multiple independent and clearly defined functional areas (i.e., target partitions).
[0059] Further, in an example, each area (i.e., target partition) obtained after partitioning can undertake different storage tasks to achieve orderly management and efficient access of data.
[0060] For example, after obtaining at least two target partitions, the first target partition can be designated as the image area for storing the operating system image and its related files. Based on this, after obtaining the first operating system image from the preset image library, the first operating system image can be directly stored in the first target partition.
[0061] In addition, it should be noted that in practical applications, partitioning can be achieved through professional partitioning tools or commands, etc., and the present disclosure scheme does not limit this. Further, the size and attributes of each target partition can be flexibly set according to actual needs to meet the storage requirements of different types of data such as operating systems, application programs, and data files, and the present disclosure scheme does not specifically limit this either.
[0062] In this way, since the present disclosure scheme can use the "partitioning" method to achieve the secure storage, effective management, and reasonable utilization of the operating system image, it provides strong support for rapid operating system deployment.
[0063] In a specific example, the operating system deployment method proposed by the present disclosure scheme can be implemented relying on the initial management system. At this time, the present disclosure scheme may further specifically include:
[0064] Deploy the initial management system to the data processing module.
[0065] Here, the data processing module is an additional processing module configured for the bare metal server; further, in one example, the data processing module may specifically include a network card, a processor, a storage medium, etc. Further, in one example, the data processing module may specifically be a Data Processing Unit (DPU).
[0066] Further, the initial management system can be understood as: the proxy system used by the bare metal server before the deployment of the operating system of the bare metal server is completed. In this way, it is convenient to use the proxy system to complete the effective deployment of the system operation image.
[0067] That is to say, in this example, before deploying the operating system, the initial management system can be deployed into the data processing module additionally configured for the bare metal server. Here, the data processing module can be used as a component of the bare metal server to carry specific processing tasks to ensure the smooth progress of the operating system deployment process. Further, the initial management system installed in the data processing module can assume the system deployment responsibility of the bare metal server. At the same time, the initial management system can also temporarily assume the operation management responsibility of the bare metal server until the operating system required by the target object is successfully deployed on the bare metal server.
[0068] Further, it should be noted that the initial management system not only has the ability to start and manage the basic hardware of the bare metal server, but also can provide necessary support during the operating system deployment process. For example, it can support the bare metal server to complete the upload, acquisition, deployment, etc. of the system image. At the same time, the initial management system can also flexibly adjust the configuration parameters of the bare metal server according to the deployment requirements to meet the requirements of different operating systems and application programs.
[0069] In this way, the solution of the present disclosure configures an additional processing module, that is, a data processing module, in the bare metal server, provides a hardware platform for the initial management system required for the operating system deployment, and also provides support for the effective deployment of the operating system of the bare metal server, thereby laying a foundation for improving the deployment efficiency and deployment accuracy.
[0070] Figure 2 is a schematic flowchart of a method for deploying an operating system of a bare metal server according to an embodiment of the present disclosure Figure 2 . This method can optionally be applied to electronic devices, such as personal computers, servers, server clusters and other electronic devices. It can be understood that the relevant content of the above Figure 1 shown method can also be applied to this example, and the relevant associated content will not be repeated in this example.
[0071] Further, this method includes at least part of the following content. Specifically, as Figure 2As shown, it includes:
[0072] Step S201: Deploy the first operating system image in the first storage medium of the bare metal server.
[0073] Here, the first storage medium is the data storage medium configured for the bare metal server.
[0074] It should be noted that for relevant examples of the first storage medium, refer to the above description and will not be elaborated here.
[0075] Step S202: Upload the first operating system image stored in the first storage medium to the preset image library.
[0076] Step S203: Obtain the first operating system image from the preset image library through the initial management system installed on the bare metal server.
[0077] Step S204: Store the first operating system image in the second storage medium to complete the deployment of the operating system of the bare metal server by using the first operating system image stored in the second storage medium.
[0078] Here, the second storage medium is the system storage medium configured for the bare metal server.
[0079] It should be noted that for relevant examples of the second storage medium, refer to the above description and will not be elaborated here.
[0080] Further, in a specific example, the following method can be used to deploy the first operating system image in the first storage medium; specifically, the deployment of the first operating system image in the first storage medium of the bare metal server as described above (such as step S201) can specifically include:
[0081] Step S201-1: Obtain the image feature data required for deploying the system image.
[0082] Step S201-2: Based on the image feature data, deploy the first operating system image in the first storage medium.
[0083] That is to say, before deploying the first operating system image to the first storage medium, the image feature data required for deploying the system image can be obtained first. For example, in an example, the initial management system can be used to obtain the image feature data, and then the deployment of the first operating system image can be completed based on the image feature data.
[0084] For example, the first operating system image can be deployed in the following manner: Use the initial management system to obtain the image feature data, and based on the image feature data, determine the required relevant data (such as system startup files, device driver programs, configuration files, etc.). Then, according to the preset rules and using the image deployment tool, deploy the first operating system image on the first storage medium.
[0085] Here, the image feature data includes but is not limited to: image identifier, image type, image version, etc.
[0086] In this way, the solution of the present disclosure provides a refined solution for deploying the system image, that is, directly deploy the first operating system image required for the deployment of the operating system of the bare metal server on the first storage medium, that is, the data storage medium, rather than the system storage medium. This deployment method is simple and highly versatile, and can improve the accuracy of image deployment, thereby providing a data basis for the subsequent deployment of the operating system of the bare metal server.
[0087] Figure 3 It is a schematic flowchart of a method for deploying an operating system of a bare metal server according to an embodiment of the present disclosure Figure 3 . This method can optionally be applied to electronic devices, such as personal computers, servers, server clusters, and other electronic devices. It can be understood that the relevant content of the above Figure 1 shown method can also be applied to this example, and the relevant associated content will not be elaborated in this example.
[0088] Furthermore, this method includes at least some of the following content. Specifically, as Figure 3 shown, it includes:
[0089] Step S301: Upload the first operating system image stored in the first storage medium to the preset image library.
[0090] Here, the first storage medium is the data storage medium configured for the bare metal server.
[0091] It should be noted that for relevant examples of the first storage medium, reference can be made to the above description, and details will not be elaborated here.
[0092] Step S302: Obtain the first operating system image from the preset image library through the initial management system installed on the bare metal server.
[0093] Step S303: Store the first operating system image in the second storage medium.
[0094] Here, the second storage medium is the system storage medium configured for the bare metal server.
[0095] It should be noted that for relevant examples of the second storage medium, please refer to the above description, and details will not be elaborated here.
[0096] Step S304: Obtain first configuration information for the target object through the initial management system.
[0097] Furthermore, it should be noted that the first configuration information may include characteristic data required for deploying the operating system. For example, in one example, the first configuration information may include, but is not limited to: hostname, processor thread information (such as Hyper-Threading (HT) mode), host memory access architecture information (such as Non-Uniform Memory Access (NUMA) architecture), host password information, network configuration information, data key information, etc.
[0098] Step S305: Restart the bare metal server.
[0099] Here, after restarting, the bare metal server can load the first operating system image from the second storage medium and complete the deployment of the operating system of the bare metal server based on the first configuration information. For example, a restart command can be initiated through the management interface or physical button of the bare metal server to shut down all currently running processes and services of the bare metal server and then restart it.
[0100] Furthermore, in one example, the bare metal server can display a boot menu or a setup interface (such as a BIOS setup interface). At this time, the storage medium to be booted and / or the required system image can be selected in this boot menu or setup interface. For example, select the second storage medium and the first operating system image in the second storage medium as the boot item.
[0101] For example, in one example, after restarting, the bootloader in the bare metal server will read the first operating system image and the first configuration information from the second storage medium and perform operations such as parameter configuration until the operating system is completely deployed.
[0102] In this way, the solution of the present disclosure can achieve effective deployment of the operating system through one restart. Therefore, compared with the existing solutions that require multiple restarts to complete system deployment, the solution of the present disclosure has high deployment efficiency and a simpler deployment method.
[0103] In addition, the deployment process of the solution of the present disclosure does not need to rely on the network. Therefore, it effectively avoids deployment failures caused by network problems, thereby improving the stability and success rate of deployment.
[0104] It should be noted that, compared with the existing deployment method, when the operating system is deployed using the solution of the present disclosure, the average time consumption is reduced by 20%, and the deployment success rate is increased by 10%.
[0105] Furthermore, in a specific example, in order to adapt to actual requirements, the solution of the present disclosure can also configure a corresponding network for the bare metal server. Specifically, before restarting the bare metal server, the method further includes:
[0106] Configuring a virtual network card for the bare metal server according to the network card configuration information in the first configuration information.
[0107] Based on this, the above-mentioned restarting of the bare metal server can specifically include:
[0108] Restarting the bare metal server to access the network corresponding to the configured virtual network card.
[0109] That is to say, in this example, the first configuration information can also include network card configuration information; at this time, after restarting the bare metal server, on the one hand, the bare metal server can load the first operating system image from the second storage medium and deploy the operating system of the bare metal server based on the relevant information in the first configuration information, and on the other hand, it can also perform network configuration based on the network card configuration information in the first configuration information to access the network corresponding to the configured virtual network.
[0110] In this way, the solution of the present disclosure provides a refined solution adapted to a specific scenario. This solution can configure the virtual network card of the bare metal server based on the network card configuration information in the first configuration information. In other words, the solution of the present disclosure can enable the bare metal server to access the corresponding network, thus enriching the usage scenarios and enhancing the applicability and practicality of the solution of the present disclosure.
[0111] Figure 4 It is a schematic diagram of the operating system deployment of a bare metal server according to an embodiment of the present disclosure. As Figure 4 shown, it shows the state comparison of the bare metal server before and after the operating system deployment. Here, Figure (a) is a schematic diagram before and during the deployment of the operating system, and Figure (b) is a schematic diagram after the deployment.
[0112] As Figure 4As shown in (a) of the figure, before deploying the operating system, first, the bare metal server uploads the operating system image in the first storage medium 401 to the preset image library 402. Secondly, the bare metal server uses the initial management system 403 in the data processing module to obtain the operating system image from the preset image library 402 and stores it in the second storage medium 404 of the bare metal server. Further, the bare metal server uses the initial management system 403 to determine the configuration information required for operating system deployment to complete the configuration of the virtual network card 405, startup items, etc. of the bare metal server.
[0113] Finally, restart the bare metal server. At this time, the bare metal server can load the operating system image from the second storage medium 404 and enter the corresponding network based on the configured virtual network card 405, thereby completing the deployment of the operating system. At this time, the bare metal server with the operating system deployed can provide the required computing environment and application programs for users. At the same time, it can also perform data transmission and communication using the network specified by the user.
[0114] It should be noted that Figure 4 The location of the virtual network card in the figure is only for illustrative purposes. In actual applications, the virtual network card can be either inside the bare metal server, or configured in the data processing module, or both the bare metal server and the data processing module are configured with virtual networks, etc. The present disclosure scheme does not specifically limit the deployment carrier of the virtual network card.
[0115] In a specific example, in order to adapt to the requirements of the actual scenario, after completing the operating system deployment of the bare metal server, the system image can also be changed, that is, after completing the operating system deployment of the bare metal server, the image used by the bare metal server is changed from the first operating system image to the second operating system image. In this way, different needs of users are met, thereby improving the applicability and practicality of the present disclosure scheme. At the same time, the user experience is also improved.
[0116] It should be noted that the change of the operating system image does not necessarily cause the change of the deployed operating system. In other words, the change of the operating system image may or may not cause the change of the deployed operating system. The present disclosure scheme does not specifically limit this.
[0117] Further, in a specific example, the following method can be used to complete the change of the system image; specifically, the above-mentioned change of the image used by the bare metal server from the first operating system image to the second operating system image includes:
[0118] Upload the second operating system image stored in the first storage medium to the preset image library;
[0119] Obtain the second operating system image from a preset image library through the initial management system installed on the bare metal server;
[0120] Store the second operating system image in the second storage medium, so as to change the image used by the bare metal server from the first operating system image to the second operating system image by using the second operating system image stored in the second storage medium.
[0121] It should be noted that in this example, the process of changing the image of the bare metal server from the first operating system image to the second operating system image is similar to the steps of deploying the first operating system in the bare metal server.
[0122] That is to say, during the process of image change, the second operating system image stored in the first storage medium can be uploaded to the preset image library first, and then the initial management system is used to obtain the second operating system image from the preset image library and store it in the second storage medium. Finally, the second operating system image stored in the second storage medium is used to deploy the operating system of the bare metal server to realize the image change of the bare metal server.
[0123] In this way, the solution of the present disclosure can support flexible change of the operating system image of the bare metal server, enrich the usage scenarios of the bare metal server, and thus improve the user experience.
[0124] In addition, the image change process of the solution of the present disclosure does not need to rely on the network, that is to say, it can be realized in an offline environment. Therefore, it effectively avoids the failure of image change due to network problems, and thus improves the stability and success rate of image change.
[0125] Further, in a specific example, before the system image change, the following method can be used to deploy the required new system image, that is, the second operating system image, in the first storage medium; specifically, the method may further include:
[0126] Deploy the second operating system image in the first storage medium of the bare metal server.
[0127] Further, the following method can be used to deploy the second operating system image in the first storage medium; specifically, the above-mentioned deployment of the second operating system image in the first storage medium may specifically include the following steps:
[0128] Obtain the image feature data required for deploying the new system image.
[0129] Based on the image feature data, deploy the second operating system image in the first storage medium.
[0130] That is to say, in this example, the second operating system image can be deployed in the first storage medium in the same way as the aforementioned deployment of the first operating system image. For detailed description, please refer to the above example and will not be elaborated here.
[0131] Further, in one example, similar to the way of the first operating system image, the first operating system image can also be stored in the first target partition of the second storage medium. In other words, in this example, different operating system images are all stored in the same target partition. Or, in another example, the first operating system image can be stored in the second target partition of the second storage medium. In other words, in this example, different operating system images can be stored in different target partitions.
[0132] Here, it should be noted that the target partition can also be divided based on the target object. For example, the operating system images required by the same target object are all stored in the same target partition. For example, the first operating system image and the second operating system image are both stored in the first target partition; or, the operating system images required by different target objects are stored in different target partitions. In this way, it is convenient for subsequent management and maintenance.
[0133] In this way, the solution of the present disclosure provides a refined solution for deploying system images, that is, the second operating system image used to replace the operating system of the bare metal server is directly deployed in the first storage medium, that is, the data storage medium, rather than the system storage medium. This deployment method is simple and highly versatile, and can improve the accuracy of image deployment, thereby providing a data basis for subsequent replacement of the operating system of the bare metal server.
[0134] Further, in a specific example, to implement the change of the operating system image of the bare metal server, the method further includes:
[0135] Through the initial management system, configure the preset image in the startup item of the bare metal server as the second operating system image;
[0136] Restart the bare metal server so that the image used by the bare metal server changes from the first operating system image to the second operating system image.
[0137] That is to say, in this solution, the selection of the image can be realized through the configuration of the startup item, and then the change of the system image is completed. The above method is simple, efficient, and has strong adaptability.
[0138] Here, it should be noted that in one example, in the above solution for changing the operating system image, the historical configuration information of the bare metal server can be reused. For example, for the same target object, the first configuration information for this target object can be reused. At this time, after the bare metal server is restarted, it can load the second operating system image from the second storage medium and complete the change of the operating system image based on the first configuration information of the target object. In other words, in this example, the operating system image is changed, but the historical configuration information can remain unchanged.
[0139] Furthermore, in another example, new configuration information can also be reconfigured according to actual needs. For example, obtain the second configuration information for the target object. At this time, after the bare metal server is restarted, the bare metal server can load the second operating system image from the second storage medium and complete the change of the operating system image based on the second configuration information. In other words, in this example, the operating system image is changed, and at the same time, the configuration information is also changed.
[0140] Furthermore, in yet another example, in the above solution for changing the operating system image, the network card configuration information of the bare metal server can be reused. For example, for the same target object, the network card configuration information for this target object can be reused. At this time, after the bare metal server is restarted, it can load the second operating system image from the second storage medium and access the network corresponding to the configured virtual network card. In other words, in this example, the operating system image is changed, but the accessed network can remain unchanged.
[0141] Furthermore, in yet another example, new network card configuration information can also be reconfigured according to actual needs. At this time, after the bare metal server is restarted, the bare metal server can load the second operating system image from the second storage medium and access the network corresponding to the newly configured virtual network card. In other words, in this example, the operating system image is changed, and at the same time, the accessed network is also changed.
[0142] It should be noted that in practical applications, whether to reuse configuration information, etc. can be selected based on actual needs, and the solution of the present disclosure does not limit this.
[0143] In this way, the solution of the present disclosure only needs to restart once to complete the replacement of the operating system image of the bare metal server. Therefore, the efficiency of changing the operating system image is effectively improved. Moreover, in the system image change solution, historical configuration information or reconfiguration, etc. can be selected based on actual needs. Therefore, the flexibility of changing the operating system image is improved, and thus the user experience is effectively improved.
[0144] The solution of the present disclosure also provides an operating system deployment device 500 for a bare metal server, as Figure 5As shown, it includes:
[0145] A transmission unit 501, configured to upload a first operating system image stored in a first storage medium to a preset image library; wherein, the first storage medium is a data storage medium configured for a bare metal server; obtain the first operating system image from the preset image library through an initial management system installed on the bare metal server;
[0146] A deployment unit 502, configured to store the first operating system image in a second storage medium, so as to complete the deployment of the operating system of the bare metal server by using the first operating system image stored in the second storage medium; wherein, the second storage medium is a system storage medium configured for the bare metal server.
[0147] In a specific example of the present disclosure solution, the second storage medium is used to store system-related data of an operating system required by a target object;
[0148] And / or,
[0149] The first storage medium is used to store at least some other data for the target object except for system-related data.
[0150] In a specific example of the present disclosure solution, the deployment unit 502 is further configured to:
[0151] Deploy the first operating system image in the first storage medium of the bare metal server.
[0152] In a specific example of the present disclosure solution, the deployment unit 502 is specifically configured to:
[0153] Obtain mirror feature data required for deploying a system image;
[0154] Based on the mirror feature data, deploy the first operating system image in the first storage medium.
[0155] In a specific example of the present disclosure solution, the deployment unit 502 is specifically configured to:
[0156] Partition the second storage medium to obtain at least two target partitions;
[0157] Store the first operating system image in a first target partition of the second storage medium, where the first target partition is one of the at least two target partitions.
[0158] In a specific example of the present disclosure solution, the deployment unit 502 is further configured to:
[0159] Obtain first configuration information for a target object through the initial management system;
[0160] Restart the bare metal server, where the restarted bare metal server can load the first operating system image from the second storage medium and complete the deployment of the operating system of the bare metal server based on the first configuration information.
[0161] In a specific example of the solution of the present disclosure, the deployment unit 502 is specifically configured to:
[0162] Configure a virtual network card for the bare metal server according to the network card configuration information in the first configuration information;
[0163] Restart the bare metal server to access the network corresponding to the configured virtual network card.
[0164] In a specific example of the solution of the present disclosure, the deployment unit 502 is further configured to:
[0165] Deploy the initial management system to the data processing module; where the data processing module is an additional processing module configured for the bare metal server; the initial management system is: the proxy system used by the bare metal server before the deployment of the operating system is completed.
[0166] In a specific example of the solution of the present disclosure, as Figure 6 shown, the operating system deployment device 500 may further include an image adjustment unit 503, where the image adjustment unit 503 is used to:
[0167] After the deployment of the operating system of the bare metal server is completed, change the image used by the bare metal server from the first operating system image to the second operating system image.
[0168] In a specific example of the solution of the present disclosure, the transmission unit 501 is further configured to upload the second operating system image stored in the first storage medium to a preset image library; obtain the second operating system image from the preset image library through the initial management system installed on the bare metal server;
[0169] The image adjustment unit 503 is specifically configured to store the second operating system image in the second storage medium, so as to change the image used by the bare metal server from the first operating system image to the second operating system image by using the second operating system image stored in the second storage medium.
[0170] In a specific example of the solution of the present disclosure, the image adjustment unit 503 is further configured to:
[0171] Deploy the second operating system image in the first storage medium of the bare metal server.
[0172] In a specific example of the solution of the present disclosure, the image adjustment unit 503 is further configured to:
[0173] Through the initial management system, configure the preset image in the startup items of the bare metal server as the second operating system image;
[0174] Restart the bare metal server so that the image used by the bare metal server changes from the first operating system image to the second operating system image.
[0175] For the specific functions and example descriptions of the various modules and sub-modules of the device in the embodiments of the present disclosure, reference may be made to the relevant descriptions of the corresponding steps in the above method embodiments, which will not be elaborated here.
[0176] In the technical solution of the present disclosure, the acquisition, storage, and application of the user's personal information involved all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.
[0177] According to the embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0178] Figure 7 FIG. shows a schematic block diagram of an exemplary electronic device 700 that can be used to implement the embodiments of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, a personal digital assistant, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely exemplary and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0179] As Figure 7 shown, the device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 702 or the computer program loaded from the storage unit 708 into the random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. The input / output (I / O) interface 705 is also connected to the bus 704.
[0180] Multiple components in device 700 are connected to I / O interface 705, including: input unit 706, such as a keyboard, mouse, etc.; output unit 707, such as various types of displays, speakers, etc.; storage unit 708, such as a disk, optical disc, etc.; and communication unit 709, such as a network card, modem, wireless communication transceiver, etc. Communication unit 709 allows device 700 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0181] Computing unit 701 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of computing unit 701 include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Computing unit 701 executes the various methods and processes described above, such as an operating system deployment method for a bare-metal server. For example, in some embodiments, an operating system deployment method for a bare-metal server can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed onto device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by computing unit 701, one or more steps of an operating system deployment method for a bare-metal server described above can be executed. Alternatively, in other embodiments, computing unit 701 can be configured to execute an operating system deployment method for a bare-metal server in any other suitable manner (e.g., by means of firmware).
[0182] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGA), application-specific integrated circuits (ASIC), application-specific standard products (ASSP), system-on-chip systems (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special or general programmable processor, and can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0183] The program code for implementing the methods of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general purpose computer, a special purpose computer, or other programmable data processing device, such that the program codes, when executed by the processor or controller, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0184] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0185] In order to provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0186] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), and the Internet.
[0187] A computer system can include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The relationship between the client and the server is generated by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
[0188] It should be understood that various forms of the processes shown above can be used, steps can be reordered, added, or deleted. For example, the steps recited in this disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this is not limited herein.
[0189] The above specific embodiments do not constitute a limitation on the protection scope of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the principles of this disclosure shall be included within the protection scope of this disclosure.
Claims
1. A method for deploying an operating system of a bare metal server, comprising: Uploading a first operating system image stored in a first storage medium to a preset image library; wherein, the first storage medium is a data storage medium configured for the bare metal server; Obtaining the first operating system image from the preset image library through an initial management system installed on the bare metal server; Storing the first operating system image in a second storage medium to complete the deployment of the operating system of the bare metal server by using the first operating system image stored in the second storage medium; wherein, the second storage medium is a system storage medium configured for the bare metal server.
2. The method according to claim 1, wherein, The second storage medium is used to store system-related data of the operating system required by the target object; And / or, The first storage medium is used to store at least part of other data for the target object except the system-related data.
3. The method according to claim 1 or 2, further comprising: Deploying a first operating system image in the first storage medium of the bare metal server.
4. The method according to claim 3, wherein, The deploying a first operating system image in the first storage medium of the bare metal server includes: Obtaining image feature data required for deploying the system image; Based on the image feature data, deploying the first operating system image in the first storage medium.
5. The method according to any one of claims 1-4, wherein, The storing the first operating system image in the second storage medium includes: Partitioning the second storage medium to obtain at least two target partitions; Storing the first operating system image in a first target partition of the second storage medium, wherein the first target partition is one of the at least two target partitions.
6. The method according to claim 1 or 2, further comprising: Obtaining first configuration information for the target object through the initial management system; Restarting the bare metal server, wherein after restarting, the bare metal server can load the first operating system image from the second storage medium and complete the deployment of the operating system of the bare metal server based on the first configuration information.
7. The method according to claim 6, further comprising: Configuring a virtual network card for the bare metal server according to the network card configuration information in the first configuration information; Wherein, the restarting the bare metal server includes: Restarting the bare metal server to access the network corresponding to the configured virtual network card.
8. The method according to claim 1 or 2 or 3 or 6, further comprising: Deploying the initial management system in a data processing module; wherein, the data processing module is an additional processing module configured for the bare metal server; the initial management system is: a proxy system used by the bare metal server before the deployment of the operating system is completed.
9. The method according to claim 1 or 2 or 3 or 6, further comprising: After completing the deployment of the operating system of the bare metal server, changing the image used by the bare metal server from the first operating system image to a second operating system image.
10. The method according to claim 9, wherein, The changing the image used by the bare metal server from the first operating system image to a second operating system image includes: Uploading a second operating system image stored in the first storage medium to the preset image library; Obtaining the second operating system image from the preset image library through the initial management system installed on the bare metal server; Store the second operating system image in the second storage medium, so as to change the image used by the bare metal server from the first operating system image to the second operating system image by using the second operating system image stored in the second storage medium.
11. The method according to claim 10 further includes: Deploy the second operating system image in the first storage medium of the bare metal server.
12. The method according to claim 10 further includes: Configure the preset image in the startup item of the bare metal server as the second operating system image through the initial management system; Restart the bare metal server so that the image used by the bare metal server changes from the first operating system image to the second operating system image.
13. An operating system deployment device for a bare metal server, comprising: A transmission unit, configured to upload the first operating system image stored in the first storage medium to a preset image library; wherein, the first storage medium is a data storage medium configured for the bare metal server; obtain the first operating system image from the preset image library through the initial management system installed on the bare metal server; A deployment unit, configured to store the first operating system image in the second storage medium to complete the deployment of the operating system of the bare metal server by using the first operating system image stored in the second storage medium; wherein, the second storage medium is a system storage medium configured for the bare metal server.
14. An electronic device, comprising: At least one processor; And A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1-12.
15. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to execute the method according to any one of claims 1-12.
16. A computer program product, comprising a computer program, where the computer program, when executed by a processor, implements the method according to any one of claims 1-12.