Method for configuring bare metal server, and server

By leveraging the virtualization capabilities of the data processor, the operating system and network configuration files in the target block storage are obtained and provided, thus resolving the issue of bare metal server deployment relying on OpenStack and achieving the effect of simplifying the configuration process and reducing time.

WO2026016552A1PCT designated stage Publication Date: 2026-01-22XFUSION DIGITAL TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/088247
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-07-18
Filing Date
2025-04-10
Publication Date
2026-01-22

AI Technical Summary

Technical Problem

Existing bare metal server deployment methods rely on OpenStack, resulting in high deployment difficulty and long deployment time, requiring users to build complex cloud computing platform environments themselves.

Method used

By leveraging the virtualization capabilities of the data processor, the pre-installed operating system in the target block storage is obtained, a virtualized device is generated, and provided to the bare metal server, simplifying the operating system and network configuration process and reducing configuration time.

Benefits of technology

It eliminates the need to rely on cloud computing platforms to build complex environments, simplifying the configuration process of bare metal servers and reducing configuration time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025088247_22012026_PF_FP_ABST
    Figure CN2025088247_22012026_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the embodiments of the present application are a method for configuring a bare metal server, and a server. The method comprises: a data processor acquiring a configuration request for configuring a bare metal server; in response to the configuration request, acquiring a target block storage, the target block storage comprising a preset operating system; and virtualizing the target block storage to obtain a first virtualized device comprising the operating system. The data processor is in communication connection with the bare metal server, such that after the bare metal server is started, the first virtualization device in the data processor can be identified, so as to acquire the operating system in the first virtualization device and then start the operating system. By virtualizing the target block storage, the operating system preset in the target block storage is provided to the bare metal server, so as to configure the operating system for the bare metal server without relying on a cloud computing platform to establish a complex environment, thereby simplifying the configuration process and reducing the configuration time.
Need to check novelty before this filing date? Find Prior Art

Description

A configuration method for a bare metal server and the server itself.

[0001] This application claims priority to Chinese Patent Application No. 202410969681.6, filed on July 18, 2024, entitled "A Configuration Method for a Bare Metal Server and a Server", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of computer technology, and in particular to a configuration method for a bare metal server and the server itself. Background Technology

[0003] A bare-metal server is a hardware device that combines the characteristics of a traditional physical server with the virtualization service capabilities of cloud computing technology. Unlike traditional virtual machines, it does not require virtualization of the operating system and applications, allowing direct access to server hardware resources and providing higher performance and lower latency.

[0004] Currently, the mainstream approach to deploying bare metal servers is to utilize cloud computing platforms, specifically the Ironic project within the open-source OpenStack architecture. Ironic provides an Application Programming Interface (API) and a plugin mechanism for creating, deploying, managing, and maintaining bare metal servers. However, existing methods for deploying bare metal servers rely on OpenStack and require users to build their own environments, making deployment difficult and time-consuming. Summary of the Invention

[0005] This application provides a configuration method and server for a bare metal server, so as to simplify the configuration process of the bare metal server and reduce the configuration time.

[0006] In a first aspect, embodiments of this application provide a method for configuring a bare metal server, the method comprising:

[0007] Obtain a configuration request, which indicates that a bare metal server needs to be configured;

[0008] In response to the configuration request, obtain the target block storage, which includes a pre-configured operating system;

[0009] Virtualize the target block storage to obtain a first virtualization device including the operating system;

[0010] The first virtualization device is provided to the bare metal server so that the bare metal server can start the operating system in the first virtualization device.

[0011] Using the above method, a first virtualized device can be generated by virtualizing the target block storage. The operating system in the first virtualized device can then be provided to the bare metal server, enabling the configuration of the bare metal server's operating system without relying on a complex environment built using a cloud computing platform. This simplifies the configuration process and reduces configuration time.

[0012] In one possible implementation, the method further includes: obtaining the 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 can obtain the network configuration file in the second virtualization device and complete the network configuration.

[0013] Based on the virtualization of the network configuration file, a second virtualized device including the network configuration file is generated, which can then provide the network configuration file to the bare metal server, enabling network configuration of the bare metal server without relying on a complex environment built with a cloud computing platform, thereby simplifying the configuration process and reducing configuration time.

[0014] In one 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.

[0015] Virtualization of the target block storage can be achieved by utilizing virtualization applications in the data processor, thereby providing the first virtualized device (within which the operating system) to the bare metal server, simplifying the configuration process and reducing configuration time.

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

[0017] In one possible implementation, obtaining the network configuration file of the bare metal server includes: creating a virtual network interface card (NIC) device and obtaining the Media Access Control (MAC) address of the virtual NIC device; obtaining the issued network configuration parameters; and generating the network configuration file based on the network configuration parameters and the MAC address.

[0018] Typically, network configuration requires a network interface card (NIC) as its carrier, and each NIC has a unique MAC address. Therefore, before configuring the bare metal server's network, the data processor needs to generate the necessary NICs. Then, based on the network configuration parameters and the MAC addresses of the virtual NIC devices, a network configuration file is generated. This allows the bare metal server to complete the network configuration based on the network configuration parameters and the corresponding virtual NIC devices with the MAC addresses specified in the network configuration file.

[0019] In one possible implementation, generating the image file of the network configuration file includes: determining a tag that the cloud server initialization tool can recognize; and generating an image file with the tag based on the tag and the network configuration file.

[0020] Since the cloud server initialization tool can only recognize specific types of tags, tags can be added to the image file when generating the image file. This will make it easier for the cloud server initialization tool to recognize the tagged image file and complete the network configuration.

[0021] 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 device including the image file; and virtualizing the second device based on the virtualization application to obtain the second virtualized device.

[0022] Virtualization applications in the data processor can be used to virtualize image files, thereby providing the virtualized second virtualized device (within which the network configuration file is located) to the bare metal server, simplifying the configuration process and reducing configuration time.

[0023] In one possible implementation, creating a virtual network interface card (NIC) device and obtaining the Media Access Control (MAC) address of the virtual NIC device includes: receiving an interface call request to the data processor; and in response to the call request to the second interface, creating a virtual NIC device and obtaining the MAC address of the virtual NIC device.

[0024] In one possible implementation, the method is applied to a data processor, the target block storage is located in a distributed storage system; the data processor communicates with the distributed storage system via the iSCSI protocol; the data processor is inserted into a slot on the bare metal server to enable communication with the bare metal server.

[0025] Secondly, embodiments of this application provide a configuration method for a bare metal server, the method being applied to a bare metal server, wherein the bare metal server is communicatively connected to a data processor, the method comprising:

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

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

[0028] In one possible implementation, the method further includes:

[0029] The second virtualization device is obtained by using the cloud server initialization tool to locate the second virtualization device, which is obtained by the data processor through virtualization processing of the network configuration file;

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

[0031] In one possible implementation, the process of acquiring the second virtualization device includes:

[0032] Determine the tags that the cloud server initialization tool can recognize;

[0033] Based on the tags and the network configuration file, an image file with the tags is generated;

[0034] The image file is virtualized to obtain a second virtualized device with a label;

[0035] The process of finding and obtaining the second virtualization device based on the cloud server initialization tool includes:

[0036] The cloud server initialization tool identifies the tag and determines that the virtualization device corresponding to the tag is the second virtualization device.

[0037] In one possible implementation, the first virtualization device is presented to the bare metal server in a device pass-through manner.

[0038] Thirdly, embodiments of this application provide a configuration method for a bare metal server. The method is applied to 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. The method includes:

[0039] The data processor acquires the target block storage, which includes a pre-installed operating system.

[0040] The data processor virtualizes the target block storage and obtains a first virtualization device including the operating system;

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

[0042] In one possible implementation, the method further includes:

[0043] The data processor acquires the network configuration file of the bare metal server;

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

[0045] The bare metal server identifies the second virtualization device and obtains the network configuration file in the second virtualization device;

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

[0047] Fourthly, embodiments of this application provide a configuration apparatus for a bare metal server, the apparatus comprising:

[0048] The first acquisition unit is used to acquire a configuration request, which indicates the configuration of the bare metal server;

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

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

[0051] A providing unit is configured to provide the first virtualization device to the bare metal server so that the bare metal server can start the operating system in the first virtualization device.

[0052] Fifthly, embodiments of this application provide a configuration apparatus for a bare metal server. The apparatus is applied to the bare metal server, which is communicatively connected to a data processor. The apparatus includes:

[0053] An identification unit is configured to identify a first virtualization device in the data processor in response to the startup operation of the bare metal server. The first virtualization device is obtained by the data processor through virtualization processing of a target block storage in a distributed storage system, and the target block storage includes a pre-installed operating system.

[0054] The startup unit is used to acquire and start the operating system in the first virtualization device.

[0055] Sixthly, embodiments of this application provide a server, the server comprising: a memory and a processor;

[0056] The memory is used to store the relevant program code;

[0057] The processor is used to call the program code to execute the bare metal server configuration method described in either the first or second aspect above.

[0058] In a seventh aspect, embodiments of this application provide a computer-readable storage medium for storing a computer program for executing the bare metal server configuration method described in any of the first or second aspects above.

[0059] Eighthly, embodiments of this application provide a computer program product, the computer program product including a computer program / instruction, which, when executed by a processor, implements the bare metal server configuration method described in either the first or second aspect above.

[0060] Therefore, the embodiments of this application have the following beneficial effects:

[0061] In the above implementation of the embodiments of this application, the virtualization capability of the data processor can be used to complete the configuration of the bare metal server. Specifically, the data processor can obtain a configuration request for configuring the bare metal server, and in response to the configuration request, obtain target block storage, wherein the target block storage includes a pre-configured 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 there is a communication connection between the data processor and the bare metal server, when the bare metal server starts, it can identify the first virtualization device in the data processor, thereby obtaining and starting the operating system in the first virtualization device. Through the method provided by the embodiments of this application, the pre-configured operating system in the target block storage can be provided to the bare metal server by virtualizing the target block storage, realizing the operating system configuration of the bare metal server without relying on a complex environment built on a cloud computing platform, thus simplifying the configuration process and reducing configuration time. Attached Figure Description

[0062] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments provided in this application. For those skilled in the art, other drawings can be obtained based on these drawings.

[0063] Figure 1 is a schematic diagram of an application scenario provided by an embodiment of this application;

[0064] Figure 2 is a flowchart of a bare metal server configuration method provided in an embodiment of this application;

[0065] Figure 3 is a schematic diagram of an operating system configured for a bare metal server according to an embodiment of this application;

[0066] Figure 4 is a flowchart of another bare metal server configuration method provided in an embodiment of this application;

[0067] Figure 5 is a schematic diagram of a network configured with a bare metal server according to an embodiment of this application;

[0068] Figure 6 is a flowchart of another bare metal server configuration method provided in an embodiment of this application;

[0069] Figure 7 is a flowchart of another bare metal server configuration method provided in an embodiment of this application;

[0070] Figure 8 is a flowchart of another bare metal server configuration method provided in an embodiment of this application;

[0071] Figure 9 is a schematic diagram of another application scenario provided by the embodiments of this application;

[0072] Figure 10 is a schematic diagram of a configuration device for a bare metal server provided in an embodiment of this application;

[0073] Figure 11 is a schematic diagram of another configuration device for a bare metal server provided in an embodiment of this application;

[0074] Figure 12 is a schematic diagram of a server provided in an embodiment of this application. Detailed Implementation

[0075] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. The described embodiments are merely exemplary implementations of this application and not all implementation methods. Those skilled in the art can obtain other embodiments in conjunction with the embodiments of this application without creative effort, and these embodiments are also within the protection scope of this application.

[0076] A bare-metal server is a hardware device that combines the characteristics of a traditional physical server with the virtualization service capabilities of cloud computing technology. Unlike traditional virtual machines, it does not require virtualization of the operating system and applications, allowing direct access to server hardware resources and providing higher performance and lower latency.

[0077] This application provides a method for configuring a bare metal server, which simplifies the configuration process and reduces configuration time. Specifically, a data processor can obtain a configuration request for configuring the bare metal server. In response to this request, it obtains target block storage, which includes a pre-configured 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 there is a communication connection between the data processor and the bare metal server, when the bare metal server starts, it can recognize the first virtualization device in the data processor, thereby obtaining and starting the operating system in the first virtualization device. Through the method provided by this application, the pre-configured operating system in the target block storage can be provided to the bare metal server by virtualizing the target block storage, thus enabling operating system configuration of the bare metal server without relying on a complex environment built using a cloud computing platform, thereby simplifying the configuration process and reducing configuration time.

[0078] To facilitate understanding of the technical solutions provided in the embodiments of this application, a detailed description will be given below in conjunction with the accompanying drawings.

[0079] Referring to Figure 1, Figure 1 is a schematic diagram of an application scenario provided by an embodiment of this application.

[0080] In this application scenario, a management client can be provided to trigger API calls to the data processor, allowing the data processor to respond and provide results based on the API requests. For example, this management client can be an application. The management client may include a front-end page and management modules.

[0081] The front-end page provides an entry point for parameter configuration, allowing users to configure parameters such as block storage address, Internet Protocol (IP) address, Virtual Private Cloud (VPC), and data disk. The VPC is a user-configured and managed virtual network environment where users can define network characteristics such as security groups, VPNs, IP address ranges, and bandwidth for convenient management and configuration of the internal network. In the Linux operating system, a data disk can be understood as an additional storage device, primarily used to store user data and applications.

[0082] The management module can be understood as a web server, capable of receiving configuration parameters from the front-end page and communicating with the data processor. Communication between the front-end page and the management module, as well as between the management module and the data processor, can be conducted using the Hypertext Transfer Protocol (HTTP). The management module is pre-configured with the necessary processes for configuring the bare metal server using the data processor. Therefore, the management module can call the corresponding interface of the data processor according to the configured processes, thereby triggering the data processor to complete the bare metal server configuration.

[0083] The data processor can be a Data Processing Unit (DPU), a next-generation processor designed for data-centric computing that integrates complete data center functionality onto a single chip. As the third computing unit after the Central Processing Unit (CPU) and the Graphics Processing Unit (GPU), the DPU's most direct role is to act as an offloading engine for the CPU, taking over infrastructure layer services such as network virtualization and hardware resource pooling. This frees up CPU resources to run upper-layer applications, achieving a separation between data-centric business operations and infrastructure operations.

[0084] When the management module calls the DPU's first interface, the DPU executes the corresponding process and returns the interface call result. The processing flow corresponding to the DPU's first interface can be pre-configured. In this embodiment, the process executed by calling the DPU's first interface is configuring the operating system for the bare metal server. The DPU obtains the operating system configured for the bare metal server through interaction with the distributed storage system. The target block storage in the distributed storage system has a pre-installed operating system, serving as the source of the bare metal server's operating system. Based on the DPU's virtualization capabilities, the target block storage with the pre-installed operating system can be virtualized into a first virtualized device and provided to the bare metal server, returning the result of creating the first virtualized device to the management module. In this embodiment, the operating system can refer to a Linux operating system.

[0085] Then, the management module calls the DPU's second interface, and the DPU executes the corresponding process of the second interface, returning the interface call result. In this embodiment, the process corresponding to calling the DPU's second interface is configuring the bare metal server's network. In response to the call to the DPU's second interface, the DPU creates a virtual network interface card (NIC) device and returns the creation result of the virtual NIC device. The management module can issue network configuration parameters for the bare metal server to the DPU so that the DPU can generate a network configuration file for the bare metal server. Then, based on the network configuration file, a second virtualized device is generated and provided to the bare metal server, thereby enabling the bare metal server to obtain the network configuration file in the second virtualized device and complete the network configuration.

[0086] Referring to Figure 2, Figure 2 is a flowchart of a bare metal server configuration method provided in an embodiment of this application.

[0087] This method can be executed by a data processor, and the method may include the following steps:

[0088] S201: Get configuration request, which indicates that the bare metal server needs to be configured.

[0089] The data processor can receive requests to configure the bare metal server and then begin the configuration process for the bare metal server.

[0090] S202: In response to the configuration request, obtain the target block storage, wherein the target block storage includes a pre-installed operating system.

[0091] In some common application scenarios, bare metal servers are configured by installing an operating system and configuring the network. When configuring a bare metal server, you can configure the operating system first, and then configure the network.

[0092] 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 pre-installed operating system. That is, the operating system installation package and other components can be pre-configured in the target block storage so that the data processor can obtain the pre-installed operating system simply by accessing the target block storage.

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

[0094] As shown in the embodiment corresponding to Figure 1, the management module can send a request to the data processor to invoke the first interface and send the block storage address to the data processor. In response to the request to invoke the first interface, the data processor executes the process of configuring the operating system of the bare metal server. It accesses the target block storage in the distributed storage system based on the block storage address to obtain the operating system in the target block storage.

[0095] S203: Virtualize the target block storage and acquire the first virtualization device, including the operating system.

[0096] To provide the operating system from the target block storage to the bare metal server, the target block storage can be virtualized to obtain a first virtualized device, which the bare metal server can then recognize. Since the target block storage includes an operating system, the virtualized first virtualized device also includes an operating system.

[0097] The data processor incorporates virtualization tools, or virtualization applications, which can be used to virtualize the target block storage. For example, the Emulator virtualization application within the data processor could include various virtualization commands capable of virtualizing different objects. Calling this virtualization application endows the data processor with virtualization capabilities.

[0098] In one possible implementation, when virtualizing the target block storage, the target block storage can first be virtualized using a virtualization application to obtain a first block device. Then, the first block device can be virtualized using the virtualization application to obtain a first virtualized device. For example, this first block device could be a Block Device (BDEV), a storage device that supports reading and writing data in fixed-size blocks, typically 512 bytes or 4096 bytes.

[0099] Virtualization devices can be virtualized input / output block devices, such as virtio-blk. virtio-blk is an implementation of virtualized block storage in the virtualization ecosystem. Through virtio-blk, virtual machines can access these block devices directly and efficiently, just like accessing physical hardware, without going through the complex emulation layer present in traditional virtualization technologies. This significantly improves the input / output performance of virtual machines, making their performance closer to that of physical machines.

[0100] In this embodiment, after the first block device is virtualized as a virtio-blk device, the virtio-blk can be directly presented to the bare metal server via the PCIe protocol in a device pass-through manner. Thus, the virtio-blk device can exist in the bare metal server in a manner similar to a disk. 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. Here, the block device and virtualized device can be understood as logical structures in software, representing a conversion of access protocols, rather than a conversion of actual physical devices.

[0101] In one possible implementation, the data processor can be inserted into a slot in the bare metal server, communicating with the bare metal server via a physical connection. Once the bare metal server starts up, it can recognize the first virtualization device in the data processor, causing the first virtualization device to exist as a block device similar to a disk, thereby enabling the operating system within the first virtualization device to be launched and configured.

[0102] It should be noted that the communication method between the data processor and the bare metal server provided in the above embodiments is merely an illustrative example and is not intended to limit the solution of this application in any way. Other possible 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 via a network interface.

[0103] S204: Provide the first virtualization device to the bare metal server so that the bare metal server can boot the operating system in the first virtualization device.

[0104] Once the data processor is virtualized into a first virtualized device including an operating system, this first virtualized device can be provided to the bare metal server. After the bare metal server boots up, it can access the operating system from the first virtualized device and complete the operating system configuration. Optionally, after virtualizing the first device as a virtio-blk device, the virtio-blk can be directly presented to the bare metal server via the PCIe protocol in a device pass-through manner. In this case, the virtio-blk device can exist in the bare metal server in a form similar to a disk.

[0105] Referring to Figure 3, it is a schematic diagram of an operating system configured for a bare metal server provided in an embodiment of this application.

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

[0107] In practice, the management application can establish communication with the distributed storage system. After communication is established, the virtualization application virtualizes the target block storage to obtain the first device. Then, the first device is virtualized to obtain the first virtualized device. This allows the bare-metal server to recognize the first virtualized device in the data processor and obtain the operating system.

[0108] The method provided in the above embodiments can virtualize the target block storage, thereby providing the pre-installed operating system in the target block storage to the bare metal server, realizing the configuration of the operating system of the bare metal server without relying on the complex environment built by the cloud computing platform, thus simplifying the configuration process and reducing the configuration time.

[0109] In one possible implementation, network configuration can be performed on the bare metal server to improve its operation. See Figure 4 for a flowchart of another bare metal server configuration method provided in this embodiment.

[0110] Compared to the method shown in the embodiment of Figure 2, this method further includes steps S205-S207:

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

[0112] To configure the network on a bare metal server, a network configuration file needs to be generated.

[0113] Optionally, the management module can send the network configuration parameters required for network configuration to the data processor, which then generates a network configuration file based on these parameters. These network configuration parameters may include IP address, gateway, subnet mask, etc.

[0114] Typically, network configuration requires a network interface card (NIC) as a carrier. A NIC is a piece of computer hardware that allows computers to communicate over a computer network and has a unique Media Access Control (MAC) address. Therefore, before configuring the network of a bare-metal server, the data processor needs to generate the NIC required for network configuration.

[0115] In one possible implementation, the data processor can leverage its own virtualization application to create a virtual network interface device (NIC). For example, this virtual NIC could be a virtualized network interface called virtio-net, which can provide an interface for virtual network devices, supporting various network functions and virtual network technologies.

[0116] After the virtualization application creates a virtual network interface card (NIC), it can also provide the MAC address of that NIC. Based on this, the data processor, after receiving the network configuration parameters from the management module, can generate a network configuration file according to the network configuration parameters and the MAC address of the virtual NIC. This allows the bare metal server to subsequently complete network configuration based on the network configuration parameters and the corresponding virtual NIC with the MAC address in the network configuration file.

[0117] As shown in the embodiment corresponding to Figure 1, the management module can send a request to the data processor to invoke the second interface. In response to the request, the data processor executes the process of configuring the bare metal server's network. Specifically, it first responds to the request to invoke the second interface, creates a virtual network interface card (NIC) device, and obtains the MAC address of the virtual NIC device. Then, it continues to execute step S204.

[0118] S206: Generate a second virtualization device based on the network configuration file.

[0119] Once the data processor generates a network configuration file, it can virtualize the file to create a second virtualized device. This allows the bare-metal server to recognize the second virtualized device and utilize its network configuration file for network configuration.

[0120] In one possible implementation, the data processor first generates a mirror file of the network configuration file. For example, this mirror file could be an ISO image file. An ISO image file is one of the storage formats for CD-ROM images on a computer, and it is a file stored according to the ISO-9660 standard for CD-ROM file systems. Alternatively, an ISO image file can be created using the `genisoimage` command. `genisoimage` is a command-line tool used to create ISO image files, which can create ISO image files for a specified directory or list of files. The `genisoimage` command can also accept optional parameters to specify the attributes or behavior of the ISO image file.

[0121] Optionally, when generating the image file of the network configuration file, a tag recognizable by the cloud server initialization tool can be selected as an optional input parameter. Then, based on this tag and the network configuration file, a tagged image file is generated. That is, the generated image file has this tag so that the cloud server initialization tool can identify the image file and complete the network configuration when performing network configuration. The cloud server initialization tool, Cloud-Init, can be an open-source project running on an operating system, dedicated to simplifying and automating the initial configuration of virtual machines or instances, including network configuration and injecting custom data. In this embodiment, the bare metal server can utilize the cloud server initialization tool within the operating system to complete the network configuration.

[0122] After generating the image file of the network configuration file, the image file is virtualized to obtain a second virtualized device including the image file. Specifically, the image file is virtualized based on the virtualization application in the data processor to generate a second device including the image file. Then, the second device is virtualized based on the virtualization application to obtain the second virtualized device. The second device can be a BDEV, and the second virtualized device can be a virtio-blk device; see the above embodiment for details, which will not be repeated here.

[0123] S207: Provide a second virtualization device to the bare metal server so that the bare metal server can complete the network configuration based on the network configuration file.

[0124] Similarly, the second virtualized device, obtained through data processor virtualization, can be presented to the bare metal server via device pass-through. This second virtualized device can exist within the bare metal server in a manner similar to a disk. After the bare metal server boots up, it launches the operating system from the first virtualized device. When the operating system boots, the cloud server initialization tool starts and identifies the second virtualized device. The bare metal server can then obtain the network configuration file from the second virtualized device and complete network configuration.

[0125] As described in the above embodiments, a tagged image file can be generated based on the network configuration file. Therefore, when the tagged image file is virtualized to create a second virtualization device, the second virtualization device also carries a tag. At this time, the cloud server initialization tool can locate the tagged virtualization device (i.e., the second virtualization device) and obtain the image file from it. Then, network configuration is completed based on the image file. Optionally, this image file may be incompatible with the Linux operating system; therefore, the network configuration parameters in the image file can be used to generate a configuration file that works in the Linux operating system to achieve network configuration.

[0126] For details, please refer to Figure 5, which is a schematic diagram of a network configured with a bare metal server provided in an embodiment of this application.

[0127] In this application scenario, the network configuration file acquired by the data processor 51 can include user data (user-data511), metadata (meta-data512), and network configuration (network-config513). User data (user-data511) is the primary 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 starts to complete various initialization tasks, such as installing software packages, configuring network services, and setting up user accounts. Meta-data (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 and hostname. Network configuration (network-config513) is mainly used to define the network configuration of the bare metal server. For example, parameters of the network interface can be specified, such as IP address, subnet mask, and gateway. That is, network configuration parameters issued by the management module can be stored in the network-config file. Then, the genisoimage command is used to generate a tagged ISO image file. Based on the virtualization application in the data processor, the ISO image file is first virtualized to generate a second virtualization device. The second virtualized device is presented to the bare metal server 52 via the PCIe protocol. The cloud server initialization tool in the bare metal server 52 identifies the second virtualized device with the tag, obtains the network configuration file user data (user-data521), metadata (meta-data522), and network configuration (network-config523) in the second virtualized device, and obtains the network configuration parameters in the network configuration file. Based on the network configuration parameters, a configuration file that can be effective in the operating system is obtained.

[0128] The method provided in this application embodiment can generate a second virtualized device including the network configuration file by virtualizing the network configuration file. This second virtualized device including the network configuration file can then be provided to the bare metal server to enable 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.

[0129] Based on the above method embodiments, this application also provides a bare metal server configuration method. Referring to Figure 6, this is a flowchart of yet another bare metal server configuration method provided by this application embodiment.

[0130] The data processor can be inserted into the PCIe slot of the bare metal server to enable communication between the data processor and the bare metal server. This method may include the following steps:

[0131] S601: In response to the boot operation of the bare metal server, identify the first virtualization device.

[0132] The first virtualization device is obtained by a data processor virtualizing the target block storage in the distributed storage system, and the target block storage includes a pre-installed operating system.

[0133] Specifically, the data processor can establish a connection with the distributed storage system and obtain the target block storage from the distributed storage system. The target block storage includes a pre-installed operating system; for example, an operating system installation package can be pre-configured in the target block storage.

[0134] 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, enabling the bare metal server to recognize this 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, it further virtualizes the first block device based on the virtualization application to obtain the first virtualized device. Since the data processor is plugged into the PCIe slot of the bare metal server, the first virtualized device can be presented to the bare metal server via PCIe protocol in a device pass-through manner.

[0135] S602: Obtain and start the operating system in the first virtualization device.

[0136] Since the target block storage has a pre-installed operating system, after the target block storage is virtualized as the first virtualization device, the bare metal server can obtain and start the operating system in the first virtualization device.

[0137] S603: Find and obtain the second virtualization device based on the cloud server initialization tool.

[0138] The second virtualization device is obtained by virtualizing the network configuration file using a data processor. This second virtualization device includes the network configuration parameters required for network configuration, allowing the cloud server initialization tool to complete network configuration based on these parameters.

[0139] When acquiring the second virtualization device, specifically, the data processor first determines a tag recognizable by the cloud server initialization tool as an input parameter, and then generates a tagged image file based on this tag and the network configuration file. The image file is then virtualized to obtain the tagged second virtualization device.

[0140] Because the second virtualization device has a tag, the bare metal server can identify the tag using the cloud server initialization tool and determine that the virtualization device corresponding to the tag is the second virtualization device.

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

[0142] Once the second virtualization device is identified, the network configuration file in the second virtualization device can be used to complete the network configuration.

[0143] In real-world applications, the format of the original network configuration file may be incompatible with the Linux operating system. Therefore, cloud server-based initialization tools can be used to obtain network configuration parameters from the network configuration file and generate a configuration file that can be used in the Linux operating system to achieve network configuration.

[0144] Based on the above method embodiments, this application also provides a method for configuring a bare metal server. Referring to Figure 7, this is a flowchart of yet another method for configuring a bare metal server provided by this application embodiment.

[0145] The method can be executed by a computing device that includes a data processor and a bare metal server, with a communication connection between the data processor and the bare metal server.

[0146] The method may include the following steps:

[0147] S701: The data processor acquires the target block storage, which includes a pre-installed operating system;

[0148] S702: The data processor virtualizes the target block storage and acquires the first virtualization device;

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

[0150] Using the above method, a first virtualized device can be generated by virtualizing the target block storage, thereby providing the operating system in the first virtualized device to the bare metal server, realizing the operating system configuration of the bare metal server, simplifying the configuration process, and reducing configuration time.

[0151] In one possible implementation, as shown in Figure 8, the method may further include the following steps:

[0152] S704: The data processor retrieves the network configuration file of the bare metal server;

[0153] S705: The data processor generates a second virtualization device based on a network configuration file;

[0154] S706: The bare metal server identifies the second virtualization device and obtains the network configuration file from the second virtualization device.

[0155] S707: Network configuration is completed based on network configuration files.

[0156] The specific implementation process can be found in the above method embodiments, and will not be described in detail here.

[0157] By virtualizing the network configuration file, a second virtualized device is generated, which can then be provided to the bare metal server. This enables network configuration of the bare metal server without relying on a complex environment built using a cloud computing platform, thus simplifying the configuration process and reducing configuration time.

[0158] The following section will describe a method for configuring a bare metal server using a specific application scenario. See Figure 9, which is a schematic diagram of another application scenario provided in an embodiment of this application.

[0159] The method may include the following steps:

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

[0161] 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;

[0162] 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;

[0163] A4: The management application sends a request to the data processor's virtualization application to create the first virtual device;

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

[0165] The creation result indicates whether the creation was successful or failed.

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

[0167] 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 interface device;

[0168] A8: The virtualization application creates a virtual network interface card (NIC) device and returns the MAC address of the virtual NIC device to the management application;

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

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

[0171] A11: The management application generates network configuration files based on network configuration parameters and MAC addresses;

[0172] A12: The management application generates tagged image files based on network configuration files;

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

[0174] A14: The virtualization application virtualizes the image file as a second virtual device and returns the creation result to the management application;

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

[0176] A16: In response to the management module's operation of calling the Baseboard Management Controller (BMC) interface of the bare metal server, start the operating system of the bare metal server;

[0177] The BMC interface is usually located on the server's motherboard and is used to connect to the BMC, which is responsible for monitoring and managing the server's hardware and operating system.

[0178] A17: The cloud server initialization tool locates the second virtualization device with a tag;

[0179] A18: The cloud server initialization tool generates an effective configuration file based on the parameters of the image file in the second virtualization device, and completes the network configuration.

[0180] Based on the above method embodiments, this application also provides a configuration device for a bare metal server. Referring to Figure 10, it is a schematic diagram of a configuration device for a bare metal server provided in this application embodiment.

[0181] The device 1000 includes:

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

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

[0184] Virtualization unit 1003 is used to virtualize the target block storage and obtain a first virtualization device including the operating system;

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

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

[0187] The virtualization unit 1003 is also used to generate a second virtualization device based on the network configuration file;

[0188] The providing unit 1004 is further configured to provide the second virtualization device 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.

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

[0190] In one possible implementation, the virtualization unit 1003 is specifically used to generate an image file of the network configuration file; virtualize the image file to obtain the second virtualization device.

[0191] In one possible implementation, the third acquisition unit is specifically used to create a virtual network interface card (NIC) device and acquire the Media Access Control (MAC) address of the virtual NIC device; acquire the issued network configuration parameters; and generate the network configuration file based on the network configuration parameters and the MAC address.

[0192] In one possible implementation, the virtualization unit 1003 is specifically used to determine a tag that the cloud server initialization tool can recognize; and to generate an image file with the tag based on the tag and the network configuration file.

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

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

[0195] In one possible implementation, the method is applied to a data processor, the target block storage is located in a distributed storage system; the data processor communicates with the distributed storage system via the iSCSI protocol; the data processor is inserted into a slot on the bare metal server to enable communication with the bare metal server.

[0196] Furthermore, this application also provides a configuration device for a bare metal server. Referring to Figure 11, this is a schematic diagram of another configuration device for a bare metal server provided in this application.

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

[0198] The identification unit 1101 is used to identify a first virtualization device in the data processor in response to the startup operation of the bare metal server. The first virtualization device is obtained by the data processor through virtualization processing of the target block storage in the distributed storage system, and the target block storage includes a pre-installed operating system.

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

[0200] In one possible implementation, the apparatus further includes: a lookup unit, configured to look up and obtain a second virtualization device based on a cloud server initialization tool, wherein the second virtualization device is obtained by the data processor through virtualization processing of a network configuration file;

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

[0202] In one possible implementation, the process of acquiring the second virtualization device includes: determining a tag that the cloud server initialization tool can recognize; generating an image file with the tag based on the tag and the network configuration file; and performing virtualization processing on the image file to obtain a second virtualization device with the tag.

[0203] The process of finding and obtaining the second virtualization device based on the cloud server initialization tool specifically includes: identifying the tag based on the cloud server initialization tool, and determining that the virtualization device corresponding to the tag is the second virtualization device.

[0204] In one possible implementation, the first virtualization device is presented to the bare metal server in a device pass-through manner.

[0205] Based on the above method and apparatus embodiments, this application also provides a server. The following description will be provided in conjunction with the accompanying drawings.

[0206] Referring to Figure 12, which is a schematic diagram of a server provided in an embodiment of this application.

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

[0208] The memory 1201 is used to store relevant program code;

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

[0210] Furthermore, embodiments of this application also provide a computer-readable storage medium for storing a computer program for executing the bare metal server configuration method described in the above method embodiments.

[0211] It should be noted that the technical features in the higher-level means provided in the embodiments of this 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 of 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.

[0212] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. In particular, for system or device embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The device embodiments described above are merely illustrative. The units or modules described as separate components may or may not be physically separate. The components shown as units or modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the units or modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0213] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functions, and operations that may be implemented by methods, apparatuses, and devices according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code, which includes one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0214] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0215] It should also be noted that, in this application, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0216] The steps of the methods or algorithms described in conjunction with the embodiments disclosed in this application can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0217] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A configuration method of a bare metal server, characterized by, The method comprises: obtaining a configuration request, the configuration request being used to indicate that a bare metal server is configured; obtaining a target block storage in response to the configuration request, the target block storage comprising a preset operating system; virtualizing the target block storage to obtain a first virtualization device comprising the operating system; providing the first virtualization device to the bare metal server, so that the bare metal server starts the operating system in the first virtualization device.

2. The method of claim 1, wherein, The method further comprises: obtaining a network configuration file of the bare metal server; generating a second virtualization device based on the network configuration file; 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 and completes network configuration.

3. The method of claim 1, wherein, The virtualizing the target block storage to obtain the first virtualization device comprising the operating system comprises: virtualizing the target block storage based on a virtualization application in a data processor to obtain a first block device comprising the operating system; virtualizing the first block device based on the virtualization application to obtain the first virtualization device.

4. The method of claim 2, wherein, The generating the second virtualization device based on the network configuration file comprises: generating an image file of the network configuration file; virtualizing the image file to obtain the second virtualization device comprising the image file.

5. The method of claim 2, wherein, The obtaining the network configuration file of the bare metal server comprises: creating a virtual network card device and obtaining a media access control (MAC) address of the virtual network card device; obtaining a network configuration parameter delivered; generating the network configuration file based on the network configuration parameter and the MAC address.

6. The method of claim 4, wherein, The generating the image file of the network configuration file comprises: determining a label recognizable by a cloud server initialization tool; generating an image file with the label based on the label and the network configuration file.

7. The method of claim 4, wherein, The virtualizing the image file to obtain the second virtualization device comprises: virtualizing the image file based on a virtualization application in a data processor to generate a second block device comprising the image file; virtualizing the second block device based on the virtualization application to obtain the second virtualization device.

8. The method of claim 5, wherein, The creating the virtual network card device and obtaining the MAC address of the virtual network card device comprises: receiving an interface call request for the data processor; in response to the interface call request, creating a virtual network card device and obtaining a MAC address of the virtual network card device.

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 and the distributed storage system communicate through a small computer system interface (ISCSI) protocol.

10. A server, characterized by The server comprises a memory and a processor; The memory is used to store related program codes; The processor is used to call the program codes to execute the bare metal server configuration method in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Method and device for deploying database in cloud computing management platform

    CN107547250A

  • Virtual network configuration method and system of bare metal server and intelligent network card

    CN114070723A

  • Data processor configuration method and device, equipment and medium

    CN115562734A

  • Deployment method, device and system based on bare metal server

    CN115878136A

  • Network address configuration method and computing device

    CN117938641A