Elastic bare metal creating method and device based on intelligent network card, equipment, storage medium and program product

Through intelligent network cards, virtualization of storage and network equipment in a cloud computing environment, the problems of long creation cycles and high operation and maintenance costs of traditional elastic bare metal are solved, and the rapid and simplified creation process and the effect of reducing operation and maintenance costs are achieved.

CN119172238AActive Publication Date: 2024-12-20CHINA MOBILE INFORMATION TECHNOLOGY CO LTD +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411178424.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-12-20
Estimated Expiration
2044-08-26

AI Technical Summary

Technical Problem

The traditional elastic bare metal creation method has a long creation cycle, complex operations and high operation and maintenance costs, making it difficult to meet the rapid adjustment needs in the cloud computing field.

Method used

Using an intelligent network card-based method, the virtualization of storage and network equipment is automatically completed through the interaction between the server and the intelligent network card through the virtual port and virtual network port information, simplifying the creation process and reducing operation and maintenance costs.

Benefits of technology

It shortens the creation cycle of elastic bare metal, simplifies the operation process, reduces operation and maintenance costs, and improves resource delivery efficiency and automation level.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119172238A_ABST
    Figure CN119172238A_ABST
Patent Text Reader

Abstract

The invention discloses an elastic bare metal creating method and device based on an intelligent network card, equipment, a storage medium and a program product. The method comprises the following steps: acquiring creation information of elastic bare metal in response to an elastic bare metal creation request of a user side; generating virtual port information according to the creation information, wherein the virtual port information is used for representing a second access address of the elastic bare metal; transmitting the virtual port information to the intelligent network card to enable the intelligent network card to create virtual network port information, accessing elastic bare metal of the server side through the virtual network port information, and sending the virtual network port information to the server side by the intelligent network card; receiving virtual network port information sent by the intelligent network card; and under the condition that the virtual port information is the same as the virtual network port information, carrying out mounting operation on the intelligent network card according to the storage configuration information and the network configuration information to obtain a creation result. According to the embodiment of the invention, the creation period can be shortened, the creation operation is simplified, and the operation and maintenance cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of cloud servers, and in particular, relates to a method, device, equipment, storage medium and program product for creating elastic bare metal based on a smart network card. Background Art

[0002] With the development of cloud computing, elastic bare metal servers are gaining more and more attention in the field of cloud computing because of their ability to automatically adjust resources according to business needs.

[0003] The traditional way to implement elastic bare metal is to write elastic bare metal to the local disk of the physical server through the preboot execution environment (PXE) in the physical server. The creation cycle depends on the performance of the network and the local disk, usually about half an hour. The creation cycle is long, and during the creation process, manual operation of the machine is required to mount and unmount the system disk. Not only is the operation complicated, but the operation and maintenance cost is high. Summary of the invention

[0004] The embodiments of the present application provide a method, device, equipment, system, medium and product for creating elastic bare metal based on a smart network card, which can shorten the creation cycle, simplify the creation operation and reduce the operation and maintenance cost.

[0005] On the one hand, an embodiment of the present application provides a method for creating an elastic bare metal based on a smart network card, the method comprising:

[0006] In response to a request from a user to create an elastic bare metal, obtaining creation information of the elastic bare metal, where the creation information includes storage configuration information and network configuration information;

[0007] Generate virtual port information according to the creation information, where the virtual port information is used to represent a second access address of the elastic bare metal;

[0008] The virtual port information is transmitted to the smart network card, so that the smart network card creates virtual network port information and accesses the elastic bare metal of the server through the virtual network port information. The smart network card sends the virtual network port information to the server, and the virtual network port information is used to represent the network card access address of the smart network card;

[0009] Receiving virtual network port information sent by the smart network card;

[0010] When the virtual port information is the same as the virtual network port information, the smart network card is mounted according to the storage configuration information and the network configuration information to obtain a creation result, which includes the mounted virtual hard disk information and network information.

[0011] Optionally, the mounting operation includes storage mounting, and before performing the mounting operation according to the storage configuration information and the network configuration information, the method further includes:

[0012] Acquire a mount identification number, where the mount identification number is used to represent storage location information corresponding to the user terminal;

[0013] Determine a storage initiator and a storage location identifier according to the storage configuration information;

[0014] Creating a storage block device according to the storage initiator and the storage location identifier;

[0015] Obtaining storage interface information of the smart network card;

[0016] The mount identification number is associated with the storage block device according to the storage interface information to obtain an association result, so as to implement a storage mount operation according to the storage configuration information.

[0017] Optionally, before performing the storage mounting operation according to the storage configuration information, the method further includes:

[0018] Get at least one disk;

[0019] Identify the at least one disk according to a preset identification rule;

[0020] In the case that the number of the disk is one, the disk is determined to be a system disk;

[0021] In the case that the number of the disks is at least two, one of the disks is determined as a system disk according to a preset identification rule, and the other disks of the at least two disks except the system disk are determined as data disks.

[0022] Optionally, after performing the mounting operation according to the storage configuration information and the network configuration information to obtain a creation result, the method further includes:

[0023] In response to a storage block device unloading command from a user terminal, obtaining a storage location identifier transmitted by the user terminal;

[0024] Determine a mount identification number according to the storage location identifier;

[0025] The storage block device is uninstalled according to the mount identification number, an uninstall result is obtained, and the uninstall result is transmitted to the user end.

[0026] Optionally, the transmitting the virtual port information to the smart network card so that the smart network card creates virtual network port information and accesses the elastic bare metal of the server through the virtual network port information, wherein the smart network card sends the virtual network port information to the server, including:

[0027] Obtaining a mount identification number, where the mount identification number is used to represent the network address information corresponding to the smart network card;

[0028] Extracting the address of the network configuration information to obtain a first access address of the user terminal;

[0029] Determine the access interface of the smart network card according to the first access address and the mount identification number;

[0030] Determine a second access address of the smart network card according to the access interface;

[0031] The second access address is used as the virtual network port information.

[0032] Optionally, after using the second access address as the virtual network port information, the method further includes:

[0033] In response to a virtual network port binding request from a user terminal, generating a virtual machine representative port according to the second access address and the network configuration information;

[0034] The virtual machine representative port is used as virtual network port information, and the virtual machine representative port is transmitted to the user end.

[0035] Optionally, after performing a mounting operation according to the storage configuration information and the network configuration information to obtain a creation result, the method further includes:

[0036] In response to a virtual network port uninstallation request from a user terminal, obtaining the virtual network port information corresponding to the user terminal;

[0037] Determine the mount identification number according to the virtual network port information;

[0038] Calling the second access address of the smart network card according to the mount identification number;

[0039] determining the access interface according to the second access address;

[0040] Deleting the access interface to obtain a first deletion result;

[0041] Sending the first deletion result to the user terminal.

[0042] Optionally, after performing a mounting operation according to the storage configuration information and the network configuration information to obtain a creation result, the method further includes:

[0043] In response to a virtual machine representative port unbinding request transmitted by a user terminal, obtaining virtual network port information transmitted by the user terminal;

[0044] Deleting the virtual machine representative port according to the virtual port information to obtain a second deletion result;

[0045] Transmitting the second deletion result to the user terminal.

[0046] Optionally, when the first access address and the network card access address are different;

[0047] The virtual port information is updated according to the network card access address to obtain new virtual port information.

[0048] On the other hand, an embodiment of the present application provides an elastic bare metal creation device based on a smart network card, the device comprising:

[0049] An acquisition module, configured to acquire creation information of the elastic bare metal in response to a request from a user to create the elastic bare metal, wherein the creation information includes storage configuration information and network configuration information;

[0050] A generating module, configured to generate virtual port information according to the creation information, wherein the virtual port information includes a virtual machine representative port;

[0051] A transmission module, used to transmit the virtual port information to the smart network card, so that the smart network card creates virtual network port information and accesses the elastic bare metal of the server through the virtual network port information, and the smart network card sends the virtual network port information to the server;

[0052] A receiving module, used to receive the virtual network port information sent by the smart network card;

[0053] The mounting module is used to mount the smart network card according to the storage configuration information and the network configuration information when the first access address is the same as the network card access address, and obtain a creation result, wherein the creation result includes the mounted virtual hard disk information and network information.

[0054] In another aspect, an embodiment of the present application provides an electronic device, the device comprising: a processor and a memory storing computer program instructions;

[0055] When the processor executes the computer program instructions, the elastic bare metal creation method based on the smart network card as described in the first aspect is implemented.

[0056] On the other hand, an embodiment of the present application provides a computer storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the elastic bare metal creation method based on the smart network card as described in the first aspect is implemented.

[0057] On the other hand, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the elastic bare metal creation method based on the smart network card as described in the first aspect.

[0058] The elastic bare metal creation method, apparatus, device, storage medium and program product based on the smart network card of the embodiment of the present application can, in the embodiment of the present application, when creating the elastic bare metal, the server can virtualize storage and network devices, i.e., virtual network port information, on the smart network card based on the storage configuration information and network configuration information on the basis of the original elastic bare metal in the server according to the creation information transmitted by the user, so that the user can directly access the elastic bare metal information through the virtual network port information, thereby realizing the creation of the elastic bare metal of the smart network card, shortening the creation cycle through the interaction between the server and the smart network card, simplifying the creation operation, eliminating the need for manual intervention, and reducing the operation and maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0060] Figure 1 It is a structural diagram of an elastic bare metal creation system based on a smart network card provided in an embodiment of the present application;

[0061] Figure 2 It is a flowchart of an elastic bare metal creation system based on a smart network card provided by an embodiment of the present application;

[0062] Figure 3 It is a flowchart of a method for creating an elastic bare metal based on a smart network card provided by an embodiment of the present application;

[0063] Figure 4 It is a flowchart of a network mounting operation method provided by an embodiment of the present application;

[0064] Figure 5 is a structural schematic diagram of an elastic bare metal creation device based on a smart network card provided by another embodiment of the present application;

[0065] Figure 6It is a structural schematic diagram of an electronic device provided in yet another embodiment of the present application. DETAILED DESCRIPTION

[0066] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0067] It should be noted that, in this article, 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 "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, 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 "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0068] In the embodiments of the present application, the proper nouns are first explained and introduced:

[0069] Bare metal, also known as bare metal server, is a hardware device that has both the characteristics of a traditional physical server and the virtualization service function of cloud computing technology. It is a combination of hardware and software advantages. Its essence is a server that has both cloud computing service functions and physical device performance. Bare metal servers can usually seamlessly connect to and be compatible with other cloud services provided by cloud vendors, such as network services (such as vpc private networks), cloud database services, etc.

[0070] Elastic Bare Metal is a new computing product that combines the elasticity of virtual machines with the performance and features of physical machines.

[0071] In order to solve the problems of the prior art, the embodiments of the present application provide a method, device, equipment, storage medium and program product for creating elastic bare metal based on a smart network card.

[0072] In an embodiment of the present application, when creating an elastic bare metal, the server virtualizes storage and network devices, i.e., virtual network port information, on the smart network card based on the storage configuration information and network configuration information on the basis of the original elastic bare metal in the server according to the creation information transmitted by the user, so that the user can directly access the elastic bare metal information through the virtual network port information, thereby realizing the creation of the elastic bare metal of the smart network card. The interaction between the server and the smart network card shortens the creation cycle, simplifies the creation operation, eliminates the need for manual intervention, and reduces the operation and maintenance costs.

[0073] The following first introduces the elastic bare metal creation system based on the smart network card provided in the embodiment of the present application.

[0074] Reference Figure 1 , Figure 1 This is a structural diagram of an elastic bare metal creation system based on a smart network card. The elastic bare metal creation system based on a smart network card includes a user terminal 10, a server terminal 11 and a smart network card 12. The user terminal 10 is connected to the server terminal 11 through a network, and the server terminal 11 is connected to the smart network card 12 through a network.

[0075] In some embodiments, the user terminal 10 may be a computer, tablet computer or other smart device capable of logging into the system platform, the server terminal 11 may be an electronic device capable of communicating with a physical server, and the smart network card 12 may be a data processor (DPU).

[0076] In this embodiment, the server 11 may include a bare metal computing node and a backend storage. The bare metal computing node may be an electronic device, and the backend storage may be a physical server.

[0077] Reference Figure 2 , Figure 2 Flowchart of a method for creating SmartNIC-based Elastic Bare Metal.

[0078] S201, the client 10 sends a request to create an elastic bare metal to the server 11.

[0079] S202 , the server 11 responds to the request of the client 10 to create an elastic bare metal and obtains the creation information of the elastic bare metal.

[0080] S203, the server 11 generates virtual port information according to the creation information.

[0081] S204 , the server 11 transmits the virtual port information to the smart network card 12 .

[0082] S205 , the smart network card 12 creates virtual network port information, and accesses the elastic bare metal of the server 11 through the virtual network port information.

[0083] S206 , the smart network card 12 transmits the virtual network port information to the server 11 .

[0084] S207 , the server 11 receives the virtual network port information sent by the smart network card 12 .

[0085] S208, when the virtual network port information and the virtual port information are the same, perform a mounting operation on the smart network card according to the creation information to obtain a creation result.

[0086] S209, sending the creation result to the user terminal 10.

[0087] In some embodiments, in S201, the tenant can operate the user terminal 10 to log in to the elastic bare metal creation system based on the smart network card, and then send a request to create an elastic bare metal to the server 11 according to the guidance command of the system.

[0088] In some embodiments, in S202, when the user creates the elastic bare metal on the user terminal 10, the user fills in the creation information on the user terminal. The creation information may include storage configuration information and network configuration information, that is, the storage configuration information may be the running memory, data storage library, data disk size, etc. of the elastic bare metal, and the network configuration information may include the access address and IP address of the user terminal.

[0089] In some embodiments, in S203, the server 11 can generate virtual port information according to the creation information for the virtual access port of the elastic bare metal.

[0090] It is worth noting that when creating an elastic bare metal, in order to create an elastic bare metal based on the OpenStack base driver (OpenStack basedriver), Neutron can be called to create virtual port information (Port) to generate virtual port information, wherein the virtual port information is used to represent the first access address of the elastic bare metal.

[0091] In some embodiments, in S204 , the server 11 sends Port information to the smart network card, and the smart network card 12 creates virtual network port information according to the Port information.

[0092] In some embodiments, in S205, the smart network card 12 creates virtual network port information based on the virtual port information so that the user terminal 10 can access the elastic bare metal through the virtual network port information, wherein the virtual network port information is used to characterize the network card access address of the smart network card, that is, the network access address is configured in the configuration process (Ironic-Agent) of the smart network card to associate it with the first access address of the elastic bare metal through the network access address.

[0093] In some embodiments, in S208, when the first access address is consistent with the network card access address, a mount operation needs to be performed according to the storage configuration information and the network configuration information to obtain a creation result; as an example, the mount operation may include a storage mount operation and a network mount operation, and the creation result may include the mounted virtual hard disk information and network information, wherein the virtual hard disk information may be a system disk and a drive letter, and the network information may be an IP address or an access address of the network.

[0094] In some embodiments, after S208, the server 11 uses the configuration tool (Ironic) to call the intelligent platform management window (ipmi) to restart the elastic bare metal. The elastic bare metal starts scanning the hardware to identify the virtual hard disk information and network information, and then controls the virtual hard disk to start.

[0095] When creating an elastic bare metal instance, the server virtualizes storage and network devices, namely, virtual network port information, on the smart network card based on the storage configuration information and network configuration information based on the original elastic bare metal instance in the server according to the creation information of the user. This allows the user to directly access the elastic bare metal instance information through the virtual network port information, thereby creating an elastic bare metal instance of the smart network card. The interaction between the server and the smart network card shortens the creation cycle, simplifies the creation operation, and eliminates the need for manual intervention. In addition, during later operation and maintenance, the created virtual network port is the same interface as the original elastic bare metal port. The unified management of the virtual machine and the elastic bare metal instance block storage service only needs to be achieved through the user, thus reducing the operation and maintenance costs.

[0096] Figure 3 A schematic diagram of a process flow of a method for creating an elastic bare metal based on a smart network card according to an embodiment of the present application is shown, which is applied to a server, such as Figure 3 As shown, the method for creating an elastic bare metal based on a smart network card includes the following steps S301-S305:

[0097] S301, in response to a request from a user to create an elastic bare metal, obtain creation information of the elastic bare metal.

[0098] In one embodiment, when creating an elastic bare metal, a user usually logs in to an elastic bare metal creation system based on a smart network card through a user terminal, and supplements creation information on the system according to a preset template built into the system. As an example, the creation information includes storage configuration information and network configuration information. After completing the creation information, the server obtains the creation information from the user terminal through a communication protocol.

[0099] S302: Generate virtual port information according to the creation information.

[0100] In some embodiments, after the server obtains the creation information, it is necessary to create a new virtual network port on the original elastic bare metal according to the creation information provided by the user, that is, to generate a virtual network port according to the creation information. It is worth understanding that the virtual port information can be the second access address corresponding to the generated virtual network port.

[0101] In one embodiment, in the process of creating virtual port information, a bootable volume operation can be created according to the image mode selected by the user through the block storage service (Cinder) in the base driver (OpenStack base driver). As an example, the image mode can include custom image production, image production based on a virtual machine or physical machine, image transformation and generation, etc.

[0102] What we can learn is:

[0103] 1. Customized image production:

[0104] After writing data to the elastic bare metal instance, users can create an image after the host is created.

[0105] Enter the bare metal server management interface through the console, select the specified bare metal, and click "More" - "Cloud Disk and Image" - "Create Image".

[0106] In the pop-up dialog box, fill in the image name and click OK. After the image is created, you can view the list of created images on the Image Management page.

[0107] 2. Create an image based on a virtual machine or physical machine:

[0108] Users can use systems installed on virtual machines, physical machines, or containers to create images.

[0109] For Linux systems, it is recommended to use ZStack Cloud's cloud host for image creation, ensure that the cloud host system BIOS mode is set to UEFI, and avoid using LVM partitions to reduce possible problems.

[0110] For Windows systems, you can use the Windows system installed on a physical server to create an image.

[0111] 3. Image transformation and generation:

[0112] Image production is usually divided into two processes: image modification and image generation.

[0113] For certain systems (such as CentOS 7.6 / 7.9), you may need to use specific scripts and dependency packages to modify the image to ensure that the image is compatible with the bare metal server.

[0114] Container image support:

[0115] Although not directly a bare metal image, the new generation of cloud-native bare metal solutions combines bare metal and container technologies, allowing users to quickly deploy applications through container images.

[0116] This approach provides greater flexibility and portability, allowing applications to run seamlessly on different computing platforms.

[0117] In this embodiment, the created virtual port information is returned to the network module (Nova) of the elastic bare metal to store the virtual port information.

[0118] In this embodiment, when the elastic bare metal needs to be associated with the smart network card, the virtual port information of the elastic bare metal needs to be sent to the smart network card, and the smart network card creates virtual network port information according to the virtual port information.

[0119] S303: Transmit the virtual port information to the smart network card, so that the smart network card creates virtual network port information and accesses the elastic bare metal of the server through the virtual network port information. The smart network card sends the virtual network port information to the server.

[0120] See also Figure 4 In a specific embodiment, S303 may specifically include the following steps:

[0121] S3031, obtain the mount identification number.

[0122] S3032, extract the address of the network configuration information to obtain the first access address of the user terminal.

[0123] S3033: Determine an access interface of the smart network card according to the first access address and the mount identification number.

[0124] S3034: Determine a second access address of the smart network card according to the access interface.

[0125] S3035: Use the second access address as virtual port information.

[0126] In this embodiment, in order for the smart network card to be network mounted on the elastic bare metal, it is necessary to obtain the mount identification number (bdf number) of the elastic bare metal. The method of obtaining it can be to obtain it from the local database in the local server corresponding to the elastic bare metal, or to obtain it from the mount identification number list pre-stored in the smart network card.

[0127] As an example, the mount identification number is used to represent the network address information corresponding to the smart network card.

[0128] In the creation information, the creation information generally stores the first access address of the user end. In the smart network card, multiple access interfaces are generally set up. The second access address of the smart network card can be determined through the access interface, that is, the second access address can be randomly assigned by the smart network card, or the smart network card can assign the second access address according to the storage order.

[0129] The second access address is then sent to the server as the virtual network port information to establish a network connection between the elastic bare metal and the smart network card.

[0130] In this embodiment, after creating the virtual network port information, it is also necessary to bind the virtual network port information of the smart network card to the virtual machine, that is, to generate a virtual machine representative port based on the second access address according to the network configuration information. As an example, the virtual machine representative port can be a port for accessing the virtual machine, and then the virtual machine representative port is used as the virtual network port information. At this point, the newly created elastic bare metal has completed the preparations before network mounting, that is, associations are established with the smart network card and the virtual machine respectively through the virtual port information, and binding is performed, so that the user end can directly access the elastic bare metal through the virtual network port information, which is more convenient.

[0131] S304, receiving virtual network port information sent by the smart network card;

[0132] In one embodiment, after the smart network card generates the virtual network port information, the smart network card receives the virtual network port information through a network protocol, so that the server can complete the creation operation according to the received virtual network port information.

[0133] S305: When the virtual port information is the same as the virtual network port information, a mounting operation is performed on the smart network card according to the storage configuration information and the network configuration information to obtain a creation result.

[0134] In a specific embodiment, the creation result includes the mounted virtual hard disk information and network information, and the mounting operation may include a network mounting operation and a storage mounting operation; that is, the server performs network mounting and storage mounting with the smart network card to complete the creation of elastic bare metal.

[0135] In an embodiment of the present application, when creating an elastic bare metal, the server virtualizes storage and network devices, i.e., virtual network port information, on the smart network card based on the storage configuration information and network configuration information based on the original elastic bare metal in the server according to the creation information transmitted by the user. In one example, the virtual network port information is used to characterize the network card access address of the smart network card. The user terminal can directly access the elastic bare metal information through the virtual network port information to realize the creation of the elastic bare metal of the smart network card. The interaction between the server and the smart network card shortens the creation cycle, simplifies the creation operation, eliminates the need for manual intervention, and reduces the operation and maintenance costs.

[0136] In a specific embodiment, when performing a storage mount operation, some storage preparations need to be performed first, so that when performing the storage mount operation, the requirements of the storage mount operation are met, and the operation is performed more quickly and conveniently.

[0137] In one embodiment, before performing the mounting operation according to the storage configuration information and the network configuration information, the method further includes the following steps:

[0138] Obtaining a mount identification number, where the mount identification number is used to represent storage location information corresponding to the user end;

[0139] Determine a storage initiator and a storage location identifier according to the storage configuration information;

[0140] Create a storage block device based on the storage initiator and storage location identifier;

[0141] Get the storage interface information of the smart network card;

[0142] The mount identification number and the storage block device are stored and associated according to the storage interface information to obtain an association result, so as to implement a storage mount operation according to the storage configuration information.

[0143] In this embodiment, before performing the storage mounting operation, it is necessary to use the mount identification number to determine the storage information of the elastic bare metal, that is, to specify which storage disks of the physical server can be used by the elastic bare metal. Therefore, it is necessary to determine the storage range according to the mount identification number of the elastic bare metal, and to associate the storage range with the smart network card to ensure that the user can correctly access the elastic bare metal through the virtual network port information.

[0144] In this embodiment, when the user terminal transmits the creation information, the storage configuration information of the creation information may include a storage initiator (initiator_name) and a storage location identifier (url number), and then the distributed block storage of the physical server is connected through the storage identifier and the storage initiator, and a storage block device (bdf device) is created on the physical server. At the same time, the storage interface information of the smart network card is obtained using the above-mentioned mount identification number, and then the server associates the storage interface information with the storage block device to obtain an association result. At this time, after the elastic bare metal is restarted, the storage block device can be identified by scanning the hardware device, which facilitates the storage mounting of the elastic bare metal and the elastic bare metal.

[0145] In addition, it is worth mentioning that storage mounting is connected to the file system hierarchy of the physical server through the storage interface information of the smart network card, so that users can access remote files just like accessing local files.

[0146] In another embodiment, before performing the storage mounting operation according to the storage configuration information, the method further includes:

[0147] Get at least one disk;

[0148] Identify at least one disk according to a preset identification rule;

[0149] When the number of disks is one, the disk is determined to be a system disk;

[0150] When the number of disks is at least two, one of the disks is determined as a system disk according to a preset identification rule, and the other disks of the at least two disks except the system disk are determined as data disks.

[0151] In this embodiment, since there are multiple disks in the physical server, these disks are all used to provide storage media. When the elastic bare metal is created, these disks need to be identified to obtain drive letters. When the user's storage configuration information includes a determined disk, the determined disk is both a system disk and a data disk, that is, the system disk is used to store the system, and the data disk is used as a storage medium to store some data that the user needs to store, including but not limited to files, videos, etc.

[0152] In a specific embodiment, when the user's storage configuration information includes multiple disks, that is, when the number of disks is at least two, it is necessary to determine one disk as a system disk and the other disks as data disks. As an example, the preset identification rule can be to sort at least two disks, obtain the size of the system data and the size of the disk, calculate the difference between the disk size and the system data size, and the disk corresponding to the smallest difference is the system disk, and the rest are data disks. It is worth noting that the above-mentioned preset identification rule is only an exemplary description and is not limited here.

[0153] In one embodiment, in order to implement lifecycle management of elastic bare metal, form a complete operation closed loop, and perform rapid operation response, it is also necessary to configure unmounted volumes in elastic bare metal, which not only implements the unmounting of storage block devices but also the deletion of network ports and the unbinding of networks.

[0154] After performing a mounting operation according to the storage configuration information and the network configuration information to obtain a creation result, the method further includes:

[0155] In response to a storage block device unloading command from a user terminal, obtaining a storage location identifier transmitted by the user terminal;

[0156] Determine a mount identification number based on the storage location identifier;

[0157] Unmount the storage block device according to the mount identification number, obtain the unmount result, and transmit the unmount result to the user end.

[0158] In this embodiment, since the above storage mounting operation is performed based on the Storage Performance Development Kit (SPDK), when unloading, it is necessary to first receive the storage block device unloading command of the user end, and the unloading command includes a storage location identifier, that is, the address of the storage block device corresponding to the user end, and then determine the mount identifier of the elastic bare metal through the storage location identifier, and then unload the storage block device through the mount identifier to obtain the unloading result. As an example, the unloading result includes successful unloading and unsuccessful unloading.

[0159] In addition, for the storage volume created by the existing Internet Small Computer System Interface (ISCSI), the ISCSI task can be directly launched and the configuration information of the Internet Small Computer System Interface can be deleted. Since it is a conventional technology, it will not be described in detail here.

[0160] In another embodiment, in order to realize the uninstallation of the virtual network port, after performing a mounting operation according to the storage configuration information and the network configuration information and obtaining a creation result, the method further includes:

[0161] In response to a virtual network port uninstallation request from a user terminal, obtaining virtual network port information corresponding to the user terminal;

[0162] Determine the mount identification number based on the virtual network port information;

[0163] Calling the second access address of the smart network card according to the mount identification number;

[0164] Determine the access interface according to the second access address;

[0165] Delete the access interface and obtain the first deletion result;

[0166] Send the first deletion result to the user terminal.

[0167] In this embodiment, a virtual network port uninstallation request transmitted by the user end is received, the virtual network port information created above is obtained, and then the mount identification number of the elastic bare metal is determined through the virtual network port information. Since the mount identification number corresponds to the second access address of the smart network port, the access interface of the smart network card can be determined through the mount identification number, and then the access interface can be deleted to obtain a first deletion result, which includes successful deletion or unsuccessful deletion. Finally, the first deletion result is sent to the user end to let the user know the first deletion result.

[0168] In another embodiment, after performing a mount operation according to the storage configuration information and the network configuration information to obtain a creation result, the method further includes:

[0169] In response to a virtual machine representative port unbinding request transmitted by a user end, obtain virtual network port information transmitted by the user end;

[0170] Deleting the virtual machine representative port according to the virtual port information to obtain a second deletion result;

[0171] The second deletion result is transmitted to the user terminal.

[0172] In this embodiment, it is also necessary to unbind the virtual machine representative port to achieve the disconnection between the virtual machine and the elastic bare metal. Therefore, when a virtual machine representative port unbinding request transmitted by the user end is received, the virtual representative port can be deleted according to the virtual network port information to obtain a second deletion result, and the second deletion result is transmitted to the user end so that the user end is aware of the second deletion result.

[0173] In one embodiment, in S305, when the first access address is different from the network card access address:

[0174] The virtual port information is updated according to the network card access address to obtain new virtual port information.

[0175] In this embodiment, in order to ensure the consistency between the elastic bare metal and the smart network card, the network card access address and the virtual port need to be updated. Only by keeping the network card access address and the virtual port information of the elastic bare metal consistent can the elastic bare metal be accessed through the smart network card. Therefore, the virtual port information can be updated through the network card access address to keep the virtual port information consistent with the network card access address.

[0176] It is worth noting that the embodiment of the present application directly creates / deletes system disks through the storage block service (Cinder), which significantly shortens the resource delivery cycle, reduces the cost of subsequent operation and maintenance, and improves the overall automation level and efficiency of resource delivery.

[0177] In addition, by managing system disks through storage block services and directly mounting them through SPDK, the creation cycle can be significantly shortened and creation efficiency can be improved.

[0178] On the other hand, since the elastic bare metal is associated with the smart network card, the interfaces such as virtual network port, storage block device creation, and storage block device deletion are configured in a unified manner. The life cycle of traditional elastic bare metal and elastic bare metal of the smart network card can be managed through the same interface, reducing the development workload.

[0179] Reference Figure 5 The embodiment of the present application provides an elastic bare metal creation device 500 based on a smart network card, the device comprising:

[0180] The acquisition module 501 is used to respond to the request of the user end to create an elastic bare metal and obtain the creation information of the elastic bare metal, where the creation information includes storage configuration information and network configuration information;

[0181] A generating module 502, configured to generate virtual port information according to the creation information, wherein the virtual port information includes a virtual machine representative port;

[0182] The transmission module 503 is used to transmit the virtual port information to the smart network card, so that the smart network card creates the virtual network port information and accesses the elastic bare metal of the server through the virtual network port information. The smart network card sends the virtual network port information to the server.

[0183] The receiving module 504 is used to receive the virtual network port information sent by the smart network card;

[0184] The mounting module 505 is used to mount the smart network card according to the storage configuration information and the network configuration information when the first access address is the same as the network card access address, and obtain a creation result, which includes the mounted virtual hard disk information and network information.

[0185] As an optional implementation, the mounting module 505 may also be used for:

[0186] Obtaining a mount identification number, where the mount identification number is used to represent storage location information corresponding to the user end;

[0187] Determine a storage initiator and a storage location identifier according to the storage configuration information;

[0188] Create a storage block device based on the storage initiator and storage location identifier;

[0189] Get the storage interface information of the smart network card;

[0190] The mount identification number and the storage block device are stored and associated according to the storage interface information to obtain an association result, so as to implement a storage mount operation according to the storage configuration information.

[0191] As an optional implementation, the mounting module 505 may also be used for:

[0192] Get at least one disk;

[0193] Identify at least one disk according to a preset identification rule;

[0194] When the number of disks is one, the disk is determined to be a system disk;

[0195] When the number of disks is at least two, one of the disks is determined as a system disk according to a preset identification rule, and the other disks of the at least two disks except the system disk are determined as data disks.

[0196] As an optional implementation, the mounting module 505 may also be used for:

[0197] In response to a storage block device unloading command from a user terminal, obtaining a storage location identifier transmitted by the user terminal;

[0198] Determine a mount identification number based on the storage location identifier;

[0199] Unmount the storage block device according to the mount identification number, obtain the unmount result, and transmit the unmount result to the user end.

[0200] As an optional implementation, the transmission module 503 may also be used for:

[0201] Obtaining a mount identification number, where the mount identification number is used to represent the network address information corresponding to the smart network card;

[0202] Extract the address of the network configuration information to obtain the first access address of the user terminal;

[0203] Determine the access interface of the smart network card according to the first access address and the mount identification number;

[0204] Determine a second access address of the smart network card according to the access interface;

[0205] The second access address is used as the virtual network port information.

[0206] As an optional implementation, the transmission module 503 may also be used for:

[0207] In response to a virtual network port binding request from a user terminal, generating a virtual machine representative port according to the second access address and the network configuration information;

[0208] The virtual machine representative port is used as the virtual network port information, and the virtual machine representative port is transmitted to the user end.

[0209] As an optional implementation, the mounting module 505 may also be used for:

[0210] In response to a virtual network port uninstallation request from a user terminal, obtaining virtual network port information corresponding to the user terminal;

[0211] Determine the mount identification number based on the virtual network port information;

[0212] Calling the second access address of the smart network card according to the mount identification number;

[0213] Determine the access interface according to the second access address;

[0214] Delete the access interface and obtain the first deletion result;

[0215] Send the first deletion result to the user terminal.

[0216] As an optional implementation, the mounting module 505 may also be used for:

[0217] In response to a virtual machine representative port unbinding request transmitted by a user end, obtain virtual network port information transmitted by the user end;

[0218] Deleting the virtual machine representative port according to the virtual port information to obtain a second deletion result;

[0219] The second deletion result is transmitted to the user terminal.

[0220] As an optional implementation, the mounting module 505 may also be used for:

[0221] In the case where the first access address and the network card access address are different;

[0222] The virtual port information is updated according to the network card access address to obtain new virtual port information.

[0223] Figure 6 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.

[0224] The electronic device may include a processor 601 and a memory 502 storing computer program instructions.

[0225] Specifically, the processor 601 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0226] The memory 602 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 602 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In one example, the memory 602 may include a removable or non-removable (or fixed) medium, or the memory 602 is a non-volatile solid-state memory. The memory 602 may be inside or outside the integrated gateway disaster recovery device.

[0227] In one example, the memory 602 may be a read-only memory (ROM). In one example, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or a flash memory, or a combination of two or more of these.

[0228] The memory 602 may include a read-only memory (ROM), a random access memory (RAM), a disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method for creating elastic bare metal based on a smart network card according to the first aspect of the present disclosure.

[0229] The processor 601 reads and executes the computer program instructions stored in the memory 602 to implement Figure 1 A method for creating elastic bare metal based on a smart network card in the illustrated embodiment.

[0230] In one example, the electronic device may further include a communication interface 603 and a bus 604. Figure 5 As shown, the processor 601, the memory 602, and the communication interface 603 are connected via a bus 604 and communicate with each other.

[0231] The communication interface 603 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0232] Bus 604 includes hardware, software or both, and the parts of electronic equipment are coupled to each other.For example, but not limitation, bus may include accelerated graphics port (Accelerated Graphics Port, AGP) or other graphics bus, enhanced industry standard architecture (Extended Industry Standard Architecture, EISA) bus, front side bus (Front Side Bus, FSB), hypertransmission (Hyper Transport, HT) interconnection, industry standard architecture (IndustryStandard Architecture, ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 604 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.

[0233] The electronic device can execute the video query method in the embodiment of the present application, thereby realizing the described elastic bare metal creation method and device based on the smart network card.

[0234] In addition, in combination with the video query method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the elastic bare metal creation methods based on the smart network card in the above embodiment is implemented.

[0235] In an optional embodiment, in combination with the elastic bare metal creation method based on the smart network card in the above embodiment, the embodiment of the present application can provide a computer program product for implementation, and the instructions in the computer program product are executed by the processor of the electronic device, so that the electronic device can implement any one of the elastic bare metal creation methods based on the smart network card in the above embodiment.

[0236] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0237] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0238] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0239] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0240] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. A method for creating an elastic bare metal based on a smart network card, characterized in that: Applied to the server, including: In response to a request from a user to create an elastic bare metal, obtaining creation information of the elastic bare metal, where the creation information includes storage configuration information and network configuration information; Generate virtual port information according to the creation information, where the virtual port information is used to represent a second access address of the elastic bare metal; The virtual port information is transmitted to the smart network card, so that the smart network card creates virtual network port information and accesses the elastic bare metal of the server through the virtual network port information. The smart network card sends the virtual network port information to the server, and the virtual network port information is used to represent the network card access address of the smart network card; Receiving virtual network port information sent by the smart network card; When the virtual port information is the same as the virtual network port information, the smart network card is mounted according to the storage configuration information and the network configuration information to obtain a creation result, which includes the mounted virtual hard disk information and network information.

2. The method according to claim 1, characterized in that The mounting operation includes storage mounting. Before performing the mounting operation according to the storage configuration information and the network configuration information, the method further includes: Acquire a mount identification number, where the mount identification number is used to represent storage location information corresponding to the user terminal; Determine a storage initiator and a storage location identifier according to the storage configuration information; Creating a storage block device according to the storage initiator and the storage location identifier; Obtaining storage interface information of the smart network card; The mount identification number is associated with the storage block device according to the storage interface information to obtain an association result, so as to implement a storage mount operation according to the storage configuration information.

3. The method according to claim 2, characterized in that Before performing the storage mounting operation according to the storage configuration information, the method further includes: Get at least one disk; Identify the at least one disk according to a preset identification rule; In the case that the number of the disk is one, the disk is determined to be a system disk; In the case that the number of the disks is at least two, one of the disks is determined as a system disk according to a preset identification rule, and the other disks of the at least two disks except the system disk are determined as data disks.

4. The method according to claim 2, characterized in that: After performing the mounting operation according to the storage configuration information and the network configuration information to obtain a creation result, the method further includes: In response to a storage block device unloading command from a user terminal, obtaining a storage location identifier transmitted by the user terminal; Determine a mount identification number according to the storage location identifier; The storage block device is uninstalled according to the mount identification number, an uninstall result is obtained, and the uninstall result is transmitted to the user end.

5. The method according to claim 1, characterized in that The step of transmitting the virtual port information to the smart network card so that the smart network card creates virtual network port information and accesses the elastic bare metal of the server through the virtual network port information, wherein the smart network card sends the virtual network port information to the server, comprises: Obtaining a mount identification number, where the mount identification number is used to represent the network address information corresponding to the smart network card; Extracting the address of the network configuration information to obtain a first access address of the user terminal; Determine the access interface of the smart network card according to the first access address and the mount identification number; Determine a second access address of the smart network card according to the access interface; The second access address is used as the virtual network port information.

6. The method according to claim 5, characterized in that After using the second access address as the virtual network port information, the method further includes: In response to a virtual network port binding request from a user terminal, generating a virtual machine representative port according to the second access address and the network configuration information; The virtual machine representative port is used as virtual network port information, and the virtual machine representative port is transmitted to the user end.

7. The method according to claim 5, characterized in that After performing a mounting operation according to the storage configuration information and the network configuration information to obtain a creation result, the method further includes: In response to a virtual network port uninstallation request from a user terminal, obtaining the virtual network port information corresponding to the user terminal; Determine the mount identification number according to the virtual network port information; Calling the second access address of the smart network card according to the mount identification number; determining the access interface according to the second access address; Deleting the access interface to obtain a first deletion result; Sending the first deletion result to the user terminal.

8. The method according to claim 6, characterized in that After performing a mounting operation according to the storage configuration information and the network configuration information to obtain a creation result, the method further includes: In response to a virtual machine representative port unbinding request transmitted by a user terminal, obtaining virtual network port information transmitted by the user terminal; Deleting the virtual machine representative port according to the virtual port information to obtain a second deletion result; Transmitting the second deletion result to the user terminal.

9. The method according to claim 1, characterized in that: In the case where the first access address and the network card access address are different; The virtual port information is updated according to the network card access address to obtain new virtual port information.

10. An elastic bare metal creation device based on smart network card, characterized in that: The device comprises: An acquisition module, configured to acquire creation information of the elastic bare metal in response to a request from a user to create the elastic bare metal, wherein the creation information includes storage configuration information and network configuration information; A generating module, configured to generate virtual port information according to the creation information, wherein the virtual port information includes a virtual machine representative port; A transmission module, used to transmit the virtual port information to the smart network card, so that the smart network card creates virtual network port information and accesses the elastic bare metal of the server through the virtual network port information, and the smart network card sends the virtual network port information to the server; A receiving module, used to receive the virtual network port information sent by the smart network card; The mounting module is used to mount the smart network card according to the storage configuration information and the network configuration information when the first access address is the same as the network card access address, and obtain a creation result, wherein the creation result includes the mounted virtual hard disk information and network information.

11. An electronic device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the elastic bare metal creation method based on the smart network card as described in any one of claims 1-9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by the processor, the elastic bare metal creation method based on the smart network card as described in any one of claims 1-9 is implemented.

13. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the elastic bare metal creation method based on a smart network card as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Resource management method and equipment for bare metal server

    CN112256393A

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

    CN114070723A

  • Bare metal server implementation method and system based on intelligent network card

    CN114610447A

  • Bare metal server management method and device and readable storage medium

    CN116185609A

  • Bare metal opening method and device based on intelligent network card, equipment and storage medium

    CN116527686A