Configuration method of bare metal server and server

By virtualizing the target block storage and network configuration files, generating virtualized devices and providing them to bare metal servers, the deployment difficulty and long time caused by relying on OpenStack in the existing technology is solved, and the effect of simplifying the configuration process and reducing configuration time is achieved.

CN119597358APending Publication Date: 2025-03-11XFUSION DIGITAL TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410969681.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-18
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

Existing methods for deploying bare metal servers need to rely on OpenStack, making deployment difficult and long.

Method used

By obtaining the target block storage, which contains the preset operating system, virtualizes, generates a first virtualization device, and provides it to a bare metal server, to implement the operating system configuration. At the same time, by virtualizing the network configuration file, a second virtualization device is generated and provided to the bare metal server to complete the network configuration.

Benefits of technology

There is no need to rely on cloud computing platforms to build complex environments, which simplifies the configuration process of bare metal servers and reduces configuration time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597358A_ABST
    Figure CN119597358A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a bare metal server configuration method and a server, and the method comprises the steps that a data processor can obtain a configuration request for configuring a bare metal server, and obtains target block storage in response to the configuration request, and the target block storage comprises a preset operating system; and virtualizing the target block storage to obtain a first virtualization device comprising the operating system. Due to the fact that the data processor is in communication connection with the bare metal server, after the bare metal server is started, the first virtualization device in the data processor can be recognized, and therefore the operating system in the first virtualization device can be obtained and started. The target block storage is virtualized, so that the preset operating system in the target block storage is provided for the bare metal server, configuration of the operating system of the bare metal server is achieved, a complex environment does not need to be built depending on a cloud computing platform, the configuration process is simplified, and the configuration time is shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a configuration method and a bare metal server. Background Art

[0002] Bare metal servers are hardware devices that have both the characteristics of traditional physical servers and the virtualization service functions of cloud computing technology. Unlike traditional virtual machines, there is no need to virtualize the operating system and applications, allowing direct access to server hardware resources, providing higher performance and lower latency.

[0003] At present, the mainstream implementation scheme for deploying bare metal servers is to use the bare metal service Ironic project in the cloud computing platform, namely the open source architecture OpenStack. Ironic provides a set of application programming interfaces (APIs) and plug-in mechanisms to create, deploy, manage and maintain bare metal servers through APIs. However, since the existing methods for deploying bare metal servers rely on OpenStack and require users to build the environment themselves, it is difficult to deploy bare metal servers and the deployment time is long. Summary of the invention

[0004] The embodiments of the present application provide a bare metal server configuration method and a server, so as to simplify the bare metal server configuration process and reduce the configuration time.

[0005] In a first aspect, an embodiment of the present application provides a configuration method for a bare metal server, the method comprising:

[0006] Obtain a configuration request, where the configuration request is used to indicate configuration of a bare metal server;

[0007] In response to the configuration request, acquiring a target block storage, wherein the target block storage includes a preset operating system;

[0008] Virtualizing the target block storage to obtain a first virtualized device including the operating system;

[0009] The first virtualization device is provided to the bare metal server so that the bare metal server starts an operating system in the first virtualization device.

[0010] Through the above method, the first virtualized device can be generated by virtualizing the target block storage, so that the operating system in the first virtualized device can be provided to the bare metal server, and the operating system configuration of the bare metal server can be realized without relying on the cloud computing platform to build a complex environment, thereby simplifying the configuration process and reducing the configuration time.

[0011] In a possible implementation, the method further includes: obtaining a network configuration file of the bare metal server; generating a second virtualization device based on the network configuration file; and providing the second virtualization device to the bare metal server so that the bare metal server obtains the network configuration file in the second virtualization device to complete the network configuration.

[0012] Based on the virtualization of the network configuration file, a second virtualization device including the network configuration file is generated, so that the network configuration file can be provided to the bare metal server to implement the network configuration of the bare metal server without relying on the cloud computing platform to build a complex environment, thereby simplifying the configuration process and reducing the configuration time.

[0013] In a possible implementation, virtualizing the target block storage to obtain a first virtualized device including the operating system includes: virtualizing the target block storage based on a virtualization application in a data processor to obtain a first block device including the operating system; and virtualizing the first block device based on the virtualization application to obtain the first virtualized device.

[0014] The virtualization application in the data processor can be used to virtualize the target block storage, so that the virtualized first virtualized device (the operating system therein) can be provided to the bare metal server, simplifying the configuration process and reducing the configuration time.

[0015] In a possible implementation, generating the second virtualized device based on the network configuration file includes: generating an image file of the network configuration file; and virtualizing the image file to obtain the second virtualized device including the image file.

[0016] In a possible implementation, obtaining the network configuration file of the bare metal server includes: creating a virtual network card device and obtaining a media access control MAC address of the virtual network card device; obtaining the issued network configuration parameters; and generating the network configuration file based on the network configuration parameters and the MAC address.

[0017] Normally, network configuration usually requires a network card as a carrier, and the network card has a unique MAC address. Therefore, before configuring the bare metal server's network, the data processor needs to generate the network card required for network configuration. Then, based on the network configuration parameters and the MAC address of the virtual network card device, a network configuration file is generated. This allows the bare metal server to complete network configuration based on the network configuration parameters in the network configuration file and the virtual network card device corresponding to the MAC address.

[0018] In a possible implementation, generating the image file of the network configuration file includes: determining a tag recognizable by a cloud server initialization tool; and generating the image file with the tag based on the tag and the network configuration file.

[0019] Since the cloud server initialization tool can only recognize specific types of tags, you can add tags to the image file when generating it, so that the cloud server initialization tool can subsequently recognize the image file with the tag and complete the network configuration.

[0020] In one possible implementation, virtualizing the image file to obtain the second virtualized device includes: virtualizing the image file based on a virtualization application in a data processor to generate a second block device including the image file; and virtualizing the second block device based on the virtualization application to obtain the second virtualized device.

[0021] The virtualization application in the data processor can be used to virtualize the image file, so that the virtualized second virtualized device (the network configuration file) can be provided to the bare metal server, simplifying the configuration process and reducing the configuration time.

[0022] In a possible implementation, the creating of a virtual network card device and obtaining a media access control (MAC) address of the virtual network card device include: receiving an interface call request to the data processor; and creating a virtual network card device in response to a call request to the second interface, and obtaining the MAC address of the virtual network card device.

[0023] In one possible implementation, the method is applied to a data processor, and the target block storage is located in a distributed storage system; the data processor communicates with the distributed storage system through a small computer system interface ISCSI protocol; and the data processor is inserted into a slot of the bare metal server to communicate with the bare metal server.

[0024] In a second aspect, an embodiment of the present application provides a configuration method for a bare metal server, the method being applied to a bare metal server, the bare metal server being communicatively connected to a data processor, the method comprising:

[0025] In response to a startup operation of the bare metal server, a first virtualization device is identified, where the first virtualization device is obtained by the data processor performing virtualization processing on a target block storage, where the target block storage includes a pre-installed operating system;

[0026] Obtain and start the operating system in the first virtualization device.

[0027] In a possible implementation, the method further includes:

[0028] Searching and acquiring a second virtualized device based on a cloud server initialization tool, where the second virtualized device is obtained by the data processor performing virtualization processing on a network configuration file;

[0029] The network configuration is completed based on the network configuration file in the second virtualization device.

[0030] In a possible implementation manner, the process of acquiring the second virtualized device includes:

[0031] Determining tags recognizable by the cloud server initialization tool;

[0032] Based on the label and the network configuration file, generate an image file with the label;

[0033] Performing virtualization processing on the image file to obtain a second virtualized device with a label;

[0034] The step of searching and obtaining the second virtualized device based on the cloud server initialization tool includes:

[0035] The tag is identified based on a cloud server initialization tool, and a virtualized device corresponding to the tag is determined to be the second virtualized device.

[0036] In a possible implementation, the first virtualized device is presented to the bare metal server in a device-direct manner.

[0037] In a third aspect, an embodiment of the present application provides a configuration method for a bare metal server, the method being applied to a computing device, the computing device comprising a data processor and a bare metal server, the data processor and the bare metal server being communicatively connected, the method comprising:

[0038] The data processor acquires a target block storage, wherein the target block storage includes a preset operating system;

[0039] The data processor virtualizes the target block storage to obtain a first virtualization device including the operating system;

[0040] The bare metal server identifies the first virtualization device and starts the operating system in the first virtualization device.

[0041] In a possible implementation, the method further includes:

[0042] The data processor obtains a network configuration file of the bare metal server;

[0043] The data processor generates a second virtualized device based on the network configuration file;

[0044] The bare metal server identifies the second virtualized device and obtains a network configuration file in the second virtualized device;

[0045] The bare metal server completes network configuration based on the network configuration file.

[0046] In a fourth aspect, an embodiment of the present application provides a configuration device for a bare metal server, the device comprising:

[0047] A first acquisition unit, configured to acquire a configuration request, where the configuration request is used to indicate configuration of a bare metal server;

[0048] A second acquisition unit, configured to respond to the configuration request and acquire a target block storage, wherein the target block storage includes a preset operating system;

[0049] A virtualization unit, configured to virtualize the target block storage and obtain a first virtualization device including the operating system;

[0050] A providing unit is used to provide the first virtualization device to the bare metal server so that the bare metal server starts the operating system in the first virtualization device.

[0051] In a fifth aspect, an embodiment of the present application provides a bare metal server configuration device, the device is applied to the bare metal server, the bare metal server is communicatively connected with a data processor, and the device includes:

[0052] an identification unit, configured to identify, in response to a startup operation of the bare metal server, a first virtualization device in the data processor, wherein the first virtualization device is obtained by the data processor performing virtualization processing on a target block storage in a distributed storage system, wherein the target block storage includes a preset operating system;

[0053] A startup unit is used to obtain and start the operating system in the first virtualization device.

[0054] In a sixth aspect, an embodiment of the present application provides a server, the server comprising: a memory and a processor;

[0055] The memory is used to store relevant program codes;

[0056] The processor is used to call the program code to execute the bare metal server configuration method described in any one of the implementations of the first aspect or the second aspect.

[0057] In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the bare metal server configuration method described in any one of the implementations of the first aspect or the second aspect.

[0058] In an eighth aspect, an embodiment of the present application provides a computer program product, which includes a computer program / instructions. When the computer program / instructions are executed by a processor, the configuration method of the bare metal server described in any one of the implementation methods of the first aspect or the second aspect is implemented.

[0059] It can be seen that the embodiments of the present application have the following beneficial effects:

[0060] In the above implementation of the embodiment of the present application, the configuration of the bare metal server can be completed by utilizing the virtualization capability of the data processor. In a specific implementation, the data processor can obtain a configuration request for configuring the bare metal server, and in response to the configuration request, obtain the target block storage, wherein the target block storage includes a pre-installed operating system as the source of the operating system for configuring the bare metal server. The target block storage is virtualized to obtain a first virtualization device including the operating system. Since the data processor is communicatively connected to the bare metal server, when the bare metal server is started, the first virtualization device in the data processor can be identified, so that the operating system in the first virtualization device can be obtained and the operating system can be started. Through the method provided in the embodiment of the present application, the target block storage can be virtualized, so that the pre-installed operating system in the target block storage can be provided to the bare metal server, thereby realizing the configuration of the operating system of the bare metal server, without relying on the cloud computing platform to build a complex environment, thereby simplifying the configuration process and reducing the configuration time. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. It is obvious that the drawings described below are only some embodiments provided in the present application, and a person skilled in the art can also obtain other drawings based on these drawings.

[0062] Figure 1 A schematic diagram of an application scenario provided in an embodiment of the present application;

[0063] Figure 2 A flowchart of a bare metal server configuration method provided in an embodiment of the present application;

[0064] Figure 3 A schematic diagram of an operating system configured for a bare metal server provided in an embodiment of the present application;

[0065] Figure 4 A flowchart of another bare metal server configuration method provided in an embodiment of the present application;

[0066] Figure 5 A schematic diagram of a network for configuring a bare metal server provided in an embodiment of the present application;

[0067] Figure 6 A flowchart of another bare metal server configuration method provided in an embodiment of the present application;

[0068] Figure 7 A flowchart of another bare metal server configuration method provided in an embodiment of the present application;

[0069] Figure 8 A flowchart of another bare metal server configuration method provided in an embodiment of the present application;

[0070] Fig. 9 A schematic diagram of another application scenario provided by an embodiment of the present application;

[0071] Fig.10 A schematic diagram of a configuration device for a bare metal server provided in an embodiment of the present application;

[0072] Fig.11 A schematic diagram of another bare metal server configuration device provided in an embodiment of the present application;

[0073] Fig.12 A schematic diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0074] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. The described embodiments are only exemplary implementation methods of the present application, not all implementation methods. Those skilled in the art can combine the embodiments of the present application to obtain other embodiments without creative work, and these embodiments are also within the scope of protection of the present application.

[0075] Bare metal servers are hardware devices that have both the characteristics of traditional physical servers and the virtualization service functions of cloud computing technology. Unlike traditional virtual machines, there is no need to virtualize the operating system and applications, allowing direct access to server hardware resources, providing higher performance and lower latency.

[0076] The embodiment of the present application provides a configuration method for a bare metal server, which can simplify the configuration process of the bare metal server and reduce the configuration time. In a specific implementation, the data processor can obtain a configuration request for configuring the bare metal server, and in response to the configuration request, obtain the target block storage, wherein the target block storage includes a pre-installed operating system as the source of the operating system for configuring the bare metal server. The target block storage is virtualized to obtain a first virtualization device including the operating system. Since the data processor is connected to the bare metal server in communication, when the bare metal server is started, the first virtualization device in the data processor can be identified, so that the operating system in the first virtualization device can be obtained and the operating system can be started. Through the method provided by the embodiment of the present application, the target block storage can be virtualized, so that the pre-installed operating system in the target block storage can be provided to the bare metal server, and the operating system configuration of the bare metal server can be realized, without relying on the cloud computing platform to build a complex environment, thereby simplifying the configuration process and reducing the configuration time.

[0077] In order to facilitate the understanding of the technical solutions provided by the embodiments of the present application, a detailed introduction will be given below in conjunction with the drawings in the specification.

[0078] See also Figure 1 , Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application.

[0079] In this application scenario, a management client can be provided to trigger a call interface to a data processor so that the data processor responds and feeds back results based on the request of the call interface. For example, the management client can be an application. The management client can include a front-end page and a management module.

[0080] The front-end page can provide an operation entry for parameter configuration. Users can configure parameters on the front-end page, including block storage address, Internet Protocol (IP) address, virtual private cloud (VPC), data disk, etc. Among them, the virtual private cloud VPC is a virtual network environment that users configure and manage independently. Users can define network features such as security groups, VPNs, IP address segments, and bandwidth in the virtual private cloud VPC to facilitate the management and configuration of internal networks. In the Linux operating system, a data disk can be understood as an additional storage device, mainly used to store user data, applications, etc.

[0081] The management module can be understood as a network service web server, which can receive configuration parameters sent by the front-end page and can also communicate with the data processor. Among them, the front-end page and the management module, and the management module and the data processor can communicate based on the Hypertext Transfer Protocol (HTTP). Among them, the management module has configured the process required to configure the bare metal server based on the data processor, so the management module can call the corresponding interface of the data processor according to the configured process, thereby triggering the data processor to complete the configuration of the bare metal server.

[0082] The data processor may be a Data Processing Unit, or DPU, which is a new generation of processors for data-centric computing that integrates complete data center functions in a single chip. As the third computing unit after the central processing unit (CPU) and the graphics processing unit (GPU), the most direct role of DPU is to serve as an offload engine for the CPU, taking over infrastructure layer services such as network virtualization and hardware resource pooling, thereby releasing CPU resources to run upper-layer applications, realizing the separation of data-centric business and infrastructure operations.

[0083] When the management module calls the first interface of the DPU, the DPU executes the process corresponding to the first interface and returns the result of the interface call. Among them, the processing flow corresponding to the first interface of the DPU can be pre-configured. In the embodiment of the present application, the process executed by calling the first interface of the DPU is to configure the operating system of the bare metal server. The DPU obtains the operating system configured for the bare metal server through interaction with the distributed storage system. Among them, the target block storage in the distributed storage system is pre-installed with an operating system as the source of the operating system for the bare metal server. Based on the virtualization capability of the DPU, the target block storage with the pre-installed operating system can be virtualized to obtain a first virtualized device and provided to the bare metal server, and the result of creating the first virtualized device is returned to the management module. In the embodiment of the present application, the operating system may refer to the Linux operating system.

[0084] The management module then calls the second interface of the DPU, and the DPU executes the process corresponding to the second interface and returns the result of the interface call. In an embodiment of the present application, the corresponding process after calling the second interface of the DPU is to configure the network of the bare metal server. In response to the call to the second interface of the DPU, the DPU creates a virtual network card device and returns the creation result of the virtual network card device. The management module can send the network configuration parameters of the bare metal server to the DPU so that the DPU generates a network configuration file for the bare metal server. Then, based on the network configuration file, a second virtualization device is generated and provided to the bare metal server, so that the bare metal server can obtain the network configuration file in the second virtualization device and complete the network configuration.

[0085] See also Figure 2 , Figure 2 A flowchart of a bare metal server configuration method provided in an embodiment of the present application.

[0086] The method may be performed by a data processor, and the method may include the following steps:

[0087] S201: Obtain a configuration request, where the configuration request is used to indicate configuration of a bare metal server.

[0088] The data processor may receive a request to configure the bare metal server and then start executing a process of configuring the bare metal server.

[0089] S202: In response to the configuration request, obtain a target block storage, wherein the target block storage includes a preset operating system.

[0090] In some common application scenarios, the bare metal server is configured by installing an operating system and configuring the network for the bare metal server. When configuring a bare metal server, you can first configure the bare metal server's operating system and then configure the network.

[0091] Specifically, the data processor can establish a connection with the distributed storage system and obtain the target block storage of the distributed storage system, wherein the target block storage includes a preset operating system. That is, the installation package of the operating system can be pre-configured in the target block storage, so that the data processor can obtain the preset operating system by accessing the target block storage.

[0092] Optionally, the data processor and the distributed storage system can communicate via the Internet Small Computer System Interface (ISCSI) protocol, and the data processor can access the target block storage based on the ISCSI address. In one possible implementation, the ISCSI address can be configured by the user on the front-end page, and sent by the front-end page to the management module, and then the management module sends the ISCSI address to the data processor so that the data processor can access the target block storage based on the ISCSI address. The target block storage includes a pre-installed operating system. For example, the installation package of the operating system can be pre-stored in the target block storage as the operating system source for configuring the bare metal server.

[0093] according to Figure 1 According to the corresponding embodiment, the management module can send a request to call the first interface to the data processor, and send the block storage address to the data processor. The data processor responds to the call request of the first interface and executes the process of configuring the operating system of the bare metal server. The target block storage in the distributed storage system is accessed according to the block storage address to obtain the operating system in the target block storage.

[0094] S203: Virtualize the target block storage to obtain a first virtualization device including an operating system.

[0095] In order to provide the operating system in the target block storage to the bare metal server, the target block storage can be virtualized to obtain a first virtualized device so that the bare metal server can identify the first virtualized device. Since the target block storage includes the operating system, the first virtualized device obtained by virtualization also includes the operating system.

[0096] The data processor has a built-in virtualization tool, i.e., a virtualization application, which can be used to virtualize the target block storage. For example, the Emulator virtualization application in the data processor can include a variety of virtualization commands, which can virtualize different objects. The virtualization application is called to enable the data processor to have virtualization capabilities.

[0097] In a possible implementation, when virtualizing the target block storage, the target block storage may be first virtualized using a virtualization application to obtain a first block device. Then, the first block device may be virtualized using a virtualization application to obtain a first virtualized device. For example, the first block device may be a block device (BDEV), which is a storage device that supports reading and writing data in blocks of a fixed size, which are usually 512 bytes or 4096 bytes.

[0098] The virtualized device can be a virtualized input / output block device virtio-blk. Virtio-blk is an implementation of virtualized block storage in the virtualization ecosystem. Through virtio-blk, virtual machines can directly and efficiently access these block devices just like accessing physical hardware, without going through the complex simulation layer in traditional virtualization technology. This significantly improves the input / output performance of virtual machines, making the performance of virtual machines closer to that of physical machines.

[0099] In an embodiment of the present application, after the first block device is virtualized as a virtio-blk device, virtio-blk can be directly presented to the bare metal server in a device-through manner through the PCIE protocol, and the virtio-blk device can exist in the bare metal server in a disk-like form. In this way, the bare metal server can directly access the resources (operating system) in the virtio-blk device, allowing the bare metal server to obtain good input / output performance. Among them, block devices and virtualized devices can be understood as logical structures in software, and the conversion of access protocols is not a real physical device conversion.

[0100] In a possible implementation, the data processor can be inserted into a slot of a bare metal server and communicate with the bare metal server through a physical connection. When the bare metal server is started, the first virtualized device in the data processor can be identified, so that the first virtualized device exists in the form of a block device similar to a disk, so that the operating system in the first virtualized device can be pulled up to complete the configuration.

[0101] It should be noted that the communication method between the data processor and the bare metal server provided in the above embodiment is only an exemplary description and does not limit the solution of this application in any form. Other achievable communication methods are also within the scope of protection of this application. For example, the data processor can also communicate with the bare metal server through a network interface.

[0102] S204: Provide the first virtualization device to the bare metal server so that the bare metal server starts the operating system in the first virtualization device.

[0103] After the data processor virtualizes the first virtualized device including the operating system, the first virtualized device can be provided to the bare metal server. After the bare metal server is started, the operating system in the first virtualized device can be obtained to complete the configuration of the operating system. Optionally, after the first block device is virtualized into a virtio-blk device, the virtio-blk can be directly presented to the bare metal server in a device pass-through manner through the PCIE protocol, and the virtio-blk device can exist in the bare metal server in a form similar to a disk.

[0104] See also Figure 3 As shown, it is a schematic diagram of an operating system configured for a bare metal server provided in an embodiment of the present application.

[0105] In this application scenario, the data processor may include a management application Agent and a virtualization application Emulator, wherein the management application may be a module that performs management and control functions in the data processor and may be deployed on the data processor in the form of a binary file.

[0106] In a specific implementation, the management application can establish communication with the distributed storage system. After the communication is established, the virtualization application virtualizes the target block storage to obtain the first block device. Then the first block device is virtualized to obtain the first virtualized device. In this way, the bare metal server can identify the first virtualized device in the data processor and obtain the operating system.

[0107] Through the method provided in the above embodiment, the target block storage can be virtualized, so that the operating system pre-installed in the target block storage can be provided to the bare metal server, and the operating system configuration of the bare metal server can be realized without relying on the cloud computing platform to build a complex environment, thereby simplifying the configuration process and reducing the configuration time.

[0108] In a possible implementation, in order to make the bare metal server run better, the bare metal server can also be configured with a network. Figure 4 As shown, it is a flowchart of another bare metal server configuration method provided in an embodiment of the present application.

[0109] Compared to Figure 2 The method shown in the embodiment further includes steps S205 to S207:

[0110] S205: Obtain a network configuration file of the bare metal server.

[0111] In order to configure the network for the bare metal server, you need to generate the network configuration file required for configuring the network.

[0112] Optionally, the management module may send the network configuration parameters required for configuring the network to the data processor, and the data processor generates a network configuration file according to the network configuration parameters, wherein the network configuration parameters may include an IP address, a gateway, a mask, and the like.

[0113] Normally, network configuration usually requires a network card as a carrier. A network card is a computer hardware that allows computers to communicate on a computer network and has a unique Media Access Control Address (MAC) address. Based on this, the data processor needs to generate the network card required for configuring the network before configuring the bare metal server's network.

[0114] In a possible implementation, the data processor can use its own virtualization application to create a virtual network card device. For example, the virtual network card device can be a virtualized network interface virtio-net, which can be used to provide an interface for a virtual network device and support multiple network functions and virtual network technologies.

[0115] When the virtualization application creates a virtual network card device, it can also provide the MAC address of the virtual network card device. Based on this, after the data processor obtains the network configuration parameters issued by the management module, it can generate a network configuration file based on the network configuration parameters and the MAC address of the virtual network card device. In this way, the bare metal server can complete the network configuration according to the network configuration parameters in the network configuration file and the virtual network card device corresponding to the MAC address.

[0116] according to Figure 1 According to the corresponding embodiment, the management module can send a request to call the second interface to the data processor, and the data processor responds to the call request of the second interface and executes the process of configuring the network of the bare metal server. That is, first respond to the call request of the second interface, create a virtual network card device, and obtain the MAC address of the virtual network card device. Then continue to execute step S204.

[0117] S206: Generate a second virtualized device based on the network configuration file.

[0118] After the data processor generates the network configuration file, the network configuration file can be virtualized to generate a second virtualized device. In this way, the bare metal server can identify the second virtualized device and use the network configuration file in the second virtualized device to perform network configuration.

[0119] In a possible implementation, the data processor first generates an image file of the network configuration file. For example, the image file can be an ISO image file. The ISO image file is one of the storage formats of the CD Mirror on the computer, and is a file stored according to the ISO-9660 standard for CD-ROM file systems. Optionally, the ISO image file can be created using the ISO image generator genisoimage command. Among them, genisoimage is a command line tool for creating ISO image files, which can create ISO image files of specified directories or file lists. Among them, the genisoimage command can also input some optional parameters to specify the properties or behaviors of the ISO image file.

[0120] Optionally, when generating an image file of a network configuration file, a tag recognizable by a cloud server initialization tool can be selected as an optional input parameter, and then an image file with a tag is generated based on the tag and the network configuration file. That is, the generated image file has the tag, so that the subsequent cloud server initialization tool can identify the image file according to the tag when performing network configuration and complete the network configuration. Among them, the cloud server initialization tool Cloud-Init can be an open source project running in an operating system, dedicated to simplifying and automating the initial configuration of virtual machines or instances, including network configuration, injection of custom data, etc. In an embodiment of the present application, the bare metal server can use the cloud server initialization tool in the operating system to complete the network configuration.

[0121] After the image file of the network configuration file is generated, the image file is virtualized to obtain a second virtualized device including the image file. In specific implementation, the image file is virtualized based on the virtualization application in the data processor to generate a second block device including the image file. Then, the second block device is virtualized based on the virtualization application to obtain a second virtualized device. The second block device may be a BDEV, and the second virtualized device may be a virtio-blk device. For details, please refer to the above embodiment, which will not be repeated here.

[0122] S207: Provide the second virtualized device to the bare metal server, so that the bare metal server completes network configuration based on the network configuration file.

[0123] Similarly, the second virtualized device virtualized by the data processor can be presented to the bare metal server in a device-direct manner, and the second virtualized device can exist in the bare metal server in a disk-like form. When the bare metal server is back, pull up the operating system in the first virtualized device to complete the startup of the operating system. When the operating system starts, the cloud server initialization tool starts and identifies the second virtualized device. The bare metal server can obtain the network configuration file in the second virtualized device to complete the network configuration.

[0124] According to the above embodiment, a tagged image file can be generated based on a network configuration file. Therefore, when the tagged image file is virtualized to generate a second virtualized device, the second virtualized device is also tagged. At this time, the cloud server initialization tool can search for the tagged virtualized device (i.e., the second virtualized device) and obtain the image file in the second virtualized device. Then, the network configuration is completed based on the image file. Optionally, the image file may be incompatible with the Linux operating system, so the network configuration parameters in the image file can be used to generate a configuration file that can be effective in the Linux operating system to implement the network configuration.

[0125] For details, please refer to Figure 5 , which is a schematic diagram of a network for configuring a bare metal server provided in an embodiment of the present application.

[0126] In this application scenario, the network configuration file obtained by the data processor 51 may include user data user-data511, metadata meta-data512, and network configuration network-config513, wherein user-data511 is the main method used by Cloud-Init to execute custom configurations and user-specified scripts, allowing a series of commands or scripts to be automatically executed when the bare metal server is started to complete various initialization tasks, such as installing software packages, configuring network services, setting user accounts, etc. Meta-data512 includes some basic instance metadata, which is necessary for the initialization process, but usually does not involve specific configuration logic. For example, it can be used to set some fixed functions, such as instance ID, host name, etc. Network-config513 is mainly used to define the network configuration of the bare metal server. For example, the parameters of the network interface can be specified, such as IP address, subnet mask, gateway, etc. That is, the network configuration parameters issued by the management module can be stored in the network-config file. Then, the genisoimage command is used to generate an ISO image file with a label. Based on the virtualization application in the data processor, the ISO image file is first virtualized to generate a second virtualized device. The second virtualized device is presented to the bare metal server 52 through the PCIE protocol. The cloud server initialization tool in the bare metal server 52 recognizes the second virtualized device with the label, obtains the network configuration file user data user-data521, metadata meta-data522, and network configuration network-config523 in the second virtualized device, thereby obtaining the network configuration parameters in the network configuration file, and obtains a configuration file that can be effective in the operating system based on the network configuration parameters.

[0127] Through the method provided in the embodiment of the present application, a second virtualization device including a network configuration file can be generated by virtualizing the network configuration file, so that the second virtualization device including the network configuration file can be provided to the bare metal server, thereby realizing network configuration of the bare metal server without relying on a cloud computing platform to build a complex environment, thereby simplifying the configuration process and reducing configuration time.

[0128] Based on the above method embodiment, the present application embodiment also provides a configuration method for a bare metal server. Figure 6 , which is a flowchart of another bare metal server configuration method provided in an embodiment of the present application.

[0129] The data processor can be inserted into the PCIE slot of the bare metal server to achieve communication between the data processor and the bare metal server. The method may include the following steps:

[0130] S601: In response to a startup operation of a bare metal server, identify a first virtualized device.

[0131] The first virtualization device is obtained by a data processor performing virtualization processing on a target block storage in a distributed storage system, and the target block storage includes a preset operating system.

[0132] Specifically, the data processor may establish a connection with the distributed storage system and obtain a target block storage of the distributed storage system, wherein the target block storage includes a pre-installed operating system, for example, an installation package of the operating system may be pre-configured in the target block storage.

[0133] In order to provide the operating system in the target block storage to the bare metal server, the target block storage can be virtualized to obtain the first virtualized device, so that the bare metal server can identify the first virtualized device in the data processor. Specifically, the data processor can virtualize the target block storage using a virtualization application to obtain the first block device. Then, the first block device is virtualized based on the virtualization application to obtain the first virtualized device. Since the data processor is inserted into the PCIE slot of the bare metal server, the first virtualized device can be presented to the bare metal server in a device pass-through manner through the PCIE protocol.

[0134] S602: Acquire and start the operating system in the first virtualization device.

[0135] Since the target block storage is pre-installed with an operating system, after the target block storage is virtualized into the first virtualized device, the bare metal server can obtain and start the operating system in the first virtualized device.

[0136] S603: Search and obtain a second virtualized device based on the cloud server initialization tool.

[0137] The second virtualized device is obtained by a data processor virtualizing a network configuration file. The second virtualized device includes network configuration parameters required for network configuration, and the cloud server initialization tool can complete the network configuration based on the network configuration parameters.

[0138] When obtaining the second virtualized device, specifically, the data processor first determines a tag recognizable by the cloud server initialization tool as an input parameter, and then generates a labeled image file based on the tag and the network configuration file, and performs virtualization processing on the image file to obtain the labeled second virtualized device.

[0139] Since the second virtualized device has a label, the bare metal server can identify the label based on the cloud server initialization tool and determine that the virtualized device corresponding to the label is the second virtualized device.

[0140] S604: Complete network configuration based on the network configuration file in the second virtualization device.

[0141] After the second virtualized device is identified, the network configuration file in the second virtualized device can be used to complete the network configuration.

[0142] In actual application scenarios, the format of the original network configuration file may be incompatible with the Linux operating system. Therefore, you can use the cloud server initialization tool to obtain the network configuration parameters in the network configuration file, generate a configuration file that can be effective in the Linux operating system, and implement network configuration.

[0143] Based on the above method embodiment, the present application embodiment also provides a configuration method for a bare metal server. Figure 7 , which is a flowchart of another bare metal server configuration method provided in an embodiment of the present application.

[0144] The method can be executed by a computing device, which includes a data processor and a bare metal server, and the data processor and the bare metal server are communicatively connected.

[0145] The method may include the following steps:

[0146] S701: The data processor obtains a target block storage, where the target block storage includes a preset operating system;

[0147] S702: The data processor virtualizes the target block storage to obtain a first virtualized device;

[0148] S703: The bare metal server identifies the first virtualization device and starts the operating system in the first virtualization device.

[0149] Through the above method, the first virtualized device can be generated by virtualizing the target block storage, so that the operating system in the first virtualized device can be provided to the bare metal server, thereby realizing the operating system configuration of the bare metal server, simplifying the configuration process and reducing the configuration time.

[0150] In one possible implementation, see Figure 8 As shown, the method may further include the following steps:

[0151] S704: The data processor obtains a network configuration file of the bare metal server;

[0152] S705: The data processor generates a second virtualized device based on the network configuration file;

[0153] S706: The bare metal server identifies the second virtualized device and obtains a network configuration file in the second virtualized device.

[0154] S707: Complete network configuration based on the network configuration file.

[0155] The specific implementation process can be found in the above method embodiment, which will not be elaborated here.

[0156] By virtualizing the network configuration file, a second virtualized device is generated, so that the second virtualized device including the network configuration file can be provided to the bare metal server to implement network configuration of the bare metal server without relying on the cloud computing platform to build a complex environment, thereby simplifying the configuration process and reducing configuration time.

[0157] The following will introduce how to configure a bare metal server based on a specific application scenario. Fig. 9 , which is a schematic diagram of another application scenario provided in an embodiment of the present application.

[0158] The method may include the following steps:

[0159] A1: The front-end page sends the block storage address entered by the user to the management module;

[0160] A2: The management module calls the first interface of the data processor and sends the block storage address to the management application of the data processor;

[0161] A3: In response to the call request of the first interface, the management application establishes a connection with the distributed storage system and obtains the target block storage based on the block storage address;

[0162] A4: The management application sends a request to the virtualization application of the data processor to create a first virtualized device;

[0163] A5: The virtualization application virtualizes the target block storage into a first virtualization device and returns a creation result to the management application;

[0164] The creation result indicates whether the creation is successful or failed.

[0165] A6: The management module calls the second interface of the data processor;

[0166] A7: In response to the call request of the second interface, the management application sends a request to the virtualization application of the data processor to create a virtual network card device;

[0167] A8: The virtualization application creates a virtual network card device and returns the MAC address of the virtual network card device to the management application;

[0168] A9: The management application returns the MAC address to the management module;

[0169] A10: The management module sends network configuration parameters to the management application;

[0170] A11: The management application generates a network profile based on the network configuration parameters and MAC addresses;

[0171] A12: The management application generates a labeled image file based on the network configuration file;

[0172] A13: The management application sends a request to the virtualization application to create a second virtualized device based on the image file;

[0173] A14: The virtualization application virtualizes the image file into a second virtualization device and returns a creation result to the management application.

[0174] A15: The management application returns the creation result to the management module;

[0175] A16: In response to the management module's operation of calling a baseboard management controller (BMC) interface of the bare metal server, starting an operating system of the bare metal server;

[0176] The BMC interface is usually located on the mainboard of the server and is used to connect to the BMC, which is responsible for monitoring and managing the hardware and operating system of the server.

[0177] A17: The cloud server initialization tool searches for the second virtualized device with the tag.

[0178] A18: The cloud server initialization tool generates a valid configuration file based on the parameters of the image file in the second virtualization device to complete the network configuration.

[0179] Based on the above method embodiment, the present application embodiment also provides a configuration device for a bare metal server. Fig.10 , which is a schematic diagram of a configuration device for a bare metal server provided in an embodiment of the present application.

[0180] The device 1000 comprises:

[0181] The first acquisition unit 1001 is used to acquire a configuration request, where the configuration request is used to indicate configuration of a bare metal server;

[0182] A second acquisition unit 1002 is used to respond to the configuration request and acquire a target block storage, wherein the target block storage includes a preset operating system;

[0183] A virtualization unit 1003 is configured to virtualize the target block storage and obtain a first virtualization device including the operating system;

[0184] The providing unit 1004 is used to provide the first virtualization device to the bare metal server so that the bare metal server starts the operating system in the first virtualization device.

[0185] In a possible implementation, the device further includes: a third acquisition unit, configured to acquire a network configuration file of the bare metal server;

[0186] The virtualization unit 1003 is further configured to generate a second virtualization device based on the network configuration file;

[0187] The providing unit 1004 is further configured to provide the second virtualized device to the bare metal server so that the bare metal server obtains a network configuration file in the second virtualized device and completes network configuration.

[0188] In a possible implementation, the virtualization unit 1003 is specifically used to virtualize the target block storage based on a virtualization application in a data processor to obtain a first block device including the operating system; and virtualize the first block device based on the virtualization application to obtain the first virtualized device.

[0189] In a possible implementation, the virtualization unit 1003 is specifically configured to generate an image file of the network configuration file; and virtualize the image file to obtain the second virtualization device.

[0190] In a possible implementation, the third acquisition unit is specifically used to create a virtual network card device and obtain a media access control MAC address of the virtual network card device; obtain the issued network configuration parameters; and generate the network configuration file based on the network configuration parameters and the MAC address.

[0191] In a possible implementation, the virtualization unit 1003 is specifically configured to determine a tag recognizable by a cloud server initialization tool; and generate an image file with the tag based on the tag and the network configuration file.

[0192] In a possible implementation, the virtualization unit 1003 is specifically configured to virtualize the image file based on a virtualization application in a data processor to generate a second block device; and virtualize the second block device based on the virtualization application to obtain the second virtualized device.

[0193] In a possible implementation, the third acquisition unit is specifically configured to receive an interface call request to the data processor; create a virtual network card device in response to the call request to the second interface, and acquire a MAC address of the virtual network card device.

[0194] In one possible implementation, the method is applied to a data processor, and the target block storage is located in a distributed storage system; the data processor communicates with the distributed storage system through a small computer system interface ISCSI protocol; and the data processor is inserted into a slot of the bare metal server to communicate with the bare metal server.

[0195] In addition, the present application embodiment also provides a configuration device for a bare metal server. Fig.11 , which is a schematic diagram of another bare metal server configuration device provided in an embodiment of the present application.

[0196] The device 1100 is applied to a bare metal server, the bare metal server is communicatively connected with a data processor, and the device 1100 includes:

[0197] An identification unit 1101 is used to identify a first virtualization device in the data processor in response to a startup operation of the bare metal server, where the first virtualization device is obtained by the data processor performing virtualization processing on a target block storage in a distributed storage system, where the target block storage includes a preset operating system;

[0198] The starting unit 1102 is used to obtain and start the operating system in the first virtualization device.

[0199] In a possible implementation, the apparatus further includes: a search unit, configured to search and obtain a second virtualized device based on a cloud server initialization tool, where the second virtualized device is obtained by the data processor performing virtualization processing on a network configuration file;

[0200] A network configuration unit is used to complete the network configuration based on the network configuration file in the second virtualization device.

[0201] In a possible implementation, the process of obtaining the second virtualized device includes: determining a tag recognizable by the cloud server initialization tool; generating an image file with the tag based on the tag and the network configuration file; virtualizing the image file to obtain a second virtualized device with the tag;

[0202] The process of searching for and acquiring the second virtualized device based on the cloud server initialization tool specifically includes: identifying the tag based on the cloud server initialization tool, and determining that the virtualized device corresponding to the tag is the second virtualized device.

[0203] In a possible implementation, the first virtualized device is presented to the bare metal server in a device-direct manner.

[0204] Based on the above method embodiment and device embodiment, the present application embodiment further provides a server, which will be described below in conjunction with the accompanying drawings.

[0205] See also Fig.12 , Fig.12 A schematic diagram of a server provided in an embodiment of the present application.

[0206] The device 1200 includes: a memory 1201 and a processor 1202;

[0207] The memory 1201 is used to store relevant program codes;

[0208] The processor 1202 is used to call the program code to execute the bare metal server configuration method described in the above method embodiment.

[0209] In addition, an embodiment of the present application also provides a computer-readable storage medium, which is used to store a computer program, and the computer program is used to execute the bare metal server configuration method described in the above method embodiment.

[0210] It should be noted that the technical features of the higher-level means provided in the embodiments of the present application are clear to those skilled in the art, and the problems to be solved by the higher-level means are also clear. The means for obtaining the corresponding features can be selected by those skilled in the art according to specific implementation requirements. The means provided in this application should not be regarded as a limitation on the solution or as the only means of implementation.

[0211] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can refer to each other. In particular, for the system or device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only exemplary, in which the units or modules described as separate components may or may not be physically separated, and the components displayed as units or modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units, and some or all of the units or modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.

[0212] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the method, device and equipment etc. of various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code includes one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0213] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0214] It should also be noted that, in this application, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusions, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0215] The steps of the method or algorithm described in conjunction with the embodiments disclosed in this application can be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0216] The above description of the disclosed embodiments enables professionals and technicians in the field to implement or use the present application. Various modifications to these embodiments will be apparent to professionals and technicians in the field, and the general principles defined in this application can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown in the present application, but will conform to the widest range consistent with the principles and novel features disclosed in the present application.

Claims

1. A configuration method for a bare metal server, characterized in that: The method comprises: Obtain a configuration request, where the configuration request is used to indicate configuration of a bare metal server; In response to the configuration request, acquiring a target block storage, wherein the target block storage includes a preset operating system; Virtualizing the target block storage to obtain a first virtualized device including the operating system; The first virtualization device is provided to the bare metal server so that the bare metal server starts an operating system in the first virtualization device.

2. The method according to claim 1, characterized in that The method further comprises: Obtain a network configuration file for the bare metal server; Generate a second virtualized device based on the network configuration file; The second virtualized device is provided to the bare metal server so that the bare metal server obtains the network configuration file in the second virtualized device and completes the network configuration.

3. The method according to claim 1, characterized in that The step of virtualizing the target block storage to obtain a first virtualized device including the operating system includes: Virtualizing the target block storage based on a virtualization application in a data processor to obtain a first block device including the operating system; The first block device is virtualized based on the virtualization application to obtain the first virtualized device.

4. The method according to claim 2, characterized in that: The generating a second virtualized device based on the network configuration file comprises: Generate a mirror file of the network configuration file; The image file is virtualized to obtain the second virtualization device including the image file.

5. The method according to claim 2, characterized in that: The obtaining of the network configuration file of the bare metal server includes: Create a virtual network card device and obtain the media access control MAC address of the virtual network card device; Get the issued network configuration parameters; The network configuration file is generated based on the network configuration parameters and the MAC address.

6. The method according to claim 4, characterized in that The generating of the image file of the network configuration file comprises: Determine the tags that the cloud server initialization tool can recognize; Based on the label and the network configuration file, an image file with the label is generated.

7. The method according to claim 4, characterized in that The virtualizing the image file to obtain the second virtualized device includes: Virtualizing the image file based on a virtualization application in a data processor to generate a second device including the image file; The second block device is virtualized based on the virtualization application to obtain the second virtualized device.

8. The method according to claim 5, characterized in that The step of creating a virtual network card device and obtaining a media access control MAC address of the virtual network card device includes: Receiving an interface call request to the data processor; In response to the call request to the interface, a virtual network card device is created, and a MAC address of the virtual network card device is obtained.

9. The method according to any one of claims 1 to 8, characterized in that: The method is applied to a data processor, and the target block storage is located in a distributed storage system; The data processor communicates with the distributed storage system via the Small Computer System Interface (ISCSI) protocol.

10. A server, characterized in that: The server includes: a memory and a processor; The memory is used to store relevant program codes; The processor is used to call the program code to execute the bare metal server configuration method described in any one of claims 1 to 9.

Citation Information

Cited By

  • Method for configuring bare metal server, and server

    WO2026016552A1