Intelligent network card-based elastic bare metal creation method and device, equipment, storage medium and program product
By using smart NICs to virtualize storage and network devices on the server side, users can directly access elastic bare metal, solving the problems of long creation cycles and high maintenance costs in traditional methods, and achieving efficient creation of smart NIC elastic bare metal.
Patent Information
- Application Number
- CN202411178424.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2044-08-26
AI Technical Summary
Traditional methods for creating elastic bare metal disks on physical servers have long creation cycles, are complex to operate, and have high maintenance costs. They require manual operation of the machine to mount and unmount the system disk.
By using smart network interface cards (NICs) to virtualize storage and network devices on the server side, users can directly access elastic bare metal via virtual network port information, simplifying the creation process and reducing operation and maintenance costs.
It shortens the creation cycle, simplifies the operation process, reduces operation and maintenance costs, and enables the creation of flexible bare metal for smart network interface cards without manual intervention.
Smart Images

Figure CN119172238B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of cloud servers, and particularly relates to an elastic bare metal creation method and device based on an intelligent network card, an equipment, a storage medium and a program product. BACKGROUND
[0002] With the development of the cloud computing field, the elastic bare metal server is paid more and more attention in the cloud computing field due to the ability of automatically adjusting resources according to business requirements.
[0003] A traditional elastic bare metal implementation mode is to write the elastic bare metal into a local disk of a physical server through a preboot execute environment (PXE), and the creation period depends on the performance of the network and the local disk, and is usually about half an hour, the creation period is long, and in the creation process, manual operation of a machine is required to realize mounting and unloading operations of a system disk, which is not only complicated in operation, but also high in operation and maintenance cost. SUMMARY
[0004] The application provides an elastic bare metal creation method and device based on an intelligent network card, an equipment, a system, a medium and a product, which can shorten the creation period, simplify the creation operation and reduce the operation and maintenance cost.
[0005] In one aspect, the application provides an elastic bare metal creation method based on an intelligent network card, which comprises the following steps.
[0006] In response to a user's request for creating an elastic bare metal, creation information of the elastic bare metal is obtained, the creation information comprising storage configuration information and network configuration information;
[0007] Virtual port information is generated according to the creation information, the virtual port information being used to represent a second access address of the elastic bare metal;
[0008] The virtual port information is transmitted to an intelligent network card, so that the intelligent network card creates virtual network port information and accesses the elastic bare metal of the service end through the virtual network port information, the intelligent network card sends virtual network port information to the service end, and the virtual network port information is used to represent a network card access address of the intelligent network card;
[0009] Virtual network port information sent by the intelligent network card is received;
[0010] In the case that the virtual port information is the same as the virtual network port information, mounting operation is performed on the intelligent network card according to the storage configuration information and the network configuration information, and a creation result is obtained, the creation result comprising mounted virtual hard disk information and network information.
[0011] Optionally, the mounting operation comprises storage mounting, and before the mounting operation according to the storage configuration information and the network configuration information, the method further comprises:
[0012] obtaining a mounting identification number, the mounting identification number being used to represent storage location information corresponding to the user terminal;
[0013] determining 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 intelligent network card;
[0016] storing the mounting identification number and the storage block device according to the storage interface information to obtain an association result, so as to realize the storage mounting operation according to the storage configuration information.
[0017] Optionally, before the mounting operation according to the storage configuration information, the method further comprises:
[0018] obtaining at least one disk;
[0019] identifying the at least one disk according to a preset identification rule;
[0020] in a case where the number of the disks is one, the disk is determined as a system disk;
[0021] in a case where 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 other disks except the system disk among the at least two disks are determined as data disks.
[0022] Optionally, after the mounting operation according to the storage configuration information and the network configuration information, the method further comprises:
[0023] in response to a storage block device unloading command of a user terminal, obtaining a storage location identifier transmitted by the user terminal;
[0024] determining a mounting identification number according to the storage location identifier;
[0025] unloading the storage block device according to the mounting identification number to obtain an unloading result, and transmitting the unloading result to the user terminal.
[0026] Optionally, the virtual port information is transmitted to the intelligent network card, so that the intelligent network card creates virtual network port information and accesses the elastic bare metal of the service end through the virtual network port information, and the intelligent network card sends virtual network port information to the service end, comprising:
[0027] The mounting identification number is obtained, and the mounting identification number is used to represent the network address information corresponding to the intelligent network card;
[0028] The network configuration information is subjected to address extraction to obtain a first access address of the user end;
[0029] The access interface of the intelligent network card is determined according to the first access address and the mounting identification number;
[0030] The second access address of the intelligent network card is determined according to the access interface;
[0031] The second access address is taken as virtual network port information.
[0032] Optionally, after the second access address is taken as virtual network port information, the method further comprises:
[0033] In response to a virtual network port binding request of the user end, a virtual machine representative port is generated according to the second access address and the network configuration information;
[0034] The virtual machine representative port is taken as virtual network port information, and the virtual machine representative port is transmitted to the user end.
[0035] Optionally, after the mounting operation according to the storage configuration information and the network configuration information is performed, a creation result is obtained, the method further comprises:
[0036] In response to a virtual network port unloading request of the user end, the virtual network port information corresponding to the user end is obtained;
[0037] The mounting identification number is determined according to the virtual network port information;
[0038] The second access address of the intelligent network card is called according to the mounting identification number;
[0039] The access interface is determined according to the second access address;
[0040] The access interface is deleted to obtain a first deletion result;
[0041] The first deletion result is sent to the user end.
[0042] Optionally, after the mounting operation according to the storage configuration information and the network configuration information is performed, a creation result is obtained, the method further comprises:
[0043] in response to a virtual machine representative port unbinding request transmitted by the user end, obtaining virtual network port information transmitted by the user end;
[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 end.
[0046] Optionally, in the case that the first access address and the network card access address are not the same;
[0047] updating the virtual port information according to the network card access address, to obtain new virtual port information.
[0048] In another aspect, an embodiment of the present application provides a device for creating an elastic bare metal based on an intelligent network card, the device comprising:
[0049] an obtaining module configured to, in response to a user end's request for creating an elastic bare metal, obtain creation information of the elastic bare metal, the creation information comprising storage configuration information and network configuration information;
[0050] a generating module configured to generate virtual port information according to the creation information, the virtual port information comprising a virtual machine representative port;
[0051] a transmitting module configured to transmit the virtual port information to an intelligent network card, so that the intelligent network card creates virtual network port information and accesses the elastic bare metal of the service end through the virtual network port information, and the intelligent network card sends the virtual network port information to the service end;
[0052] a receiving module configured to receive the virtual network port information sent by the intelligent network card;
[0053] a mounting module configured to, in the case that the first access address and the network card access address are the same, perform a mounting operation on the intelligent network card according to the storage configuration information and the network configuration information, to obtain a creation result, the creation result comprising mounted virtual hard disk information and network information.
[0054] In still 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] the processor, when executing the computer program instructions, implements the method for creating an elastic bare metal based on an intelligent network card as described in the first aspect.
[0056] In still another aspect, an embodiment of the present application provides a computer storage medium, which has computer program instructions stored thereon, and the computer program instructions are executed by a processor to implement the intelligent network card-based elastic bare metal creation method according to the first aspect.
[0057] In still another aspect, an embodiment of the present application provides a computer program product, and instructions in the computer program product are executed by a processor of an electronic device to enable the electronic device to perform the intelligent network card-based elastic bare metal creation method according to the first aspect.
[0058] The intelligent network card-based elastic bare metal creation method, device, equipment, storage medium and program product provided by the embodiments of the present application can, in the embodiments of the present application, when creating an elastic bare metal, the server creates information according to the user end, and on the basis of the original elastic bare metal in the server, the storage and network devices are virtually created on the intelligent network card according to the storage configuration information and the network configuration information, that is, the virtual network port information, so that the user end can directly access the elastic bare metal information through the virtual network port information, and the creation of the intelligent network card-based elastic bare metal is realized. The interaction between the server and the intelligent network card shortens the creation period, simplifies the creation operation, and reduces the operation and maintenance cost without manual intervention. BRIEF DESCRIPTION OF DRAWINGS
[0059] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiments of the present application will be briefly introduced. Those skilled in the art can obtain other drawings according to these drawings without creating any creative labor.
[0060] Figure 1 is a structural schematic diagram of the intelligent network card-based elastic bare metal creation system provided by the embodiments of the present application;
[0061] Figure 2 is a flowchart of the intelligent network card-based elastic bare metal creation system provided by an embodiment of the present application;
[0062] Figure 3 is a flowchart of the intelligent network card-based elastic bare metal creation method provided by an embodiment of the present application;
[0063] Figure 4 is a flowchart of the network mounting operation method provided by an embodiment of the present application;
[0064] Figure 5 is a structural schematic diagram of the intelligent network card-based elastic bare metal creation device provided by another embodiment of the present application;
[0065] Figure 6is a structural schematic diagram of an electronic device provided by another embodiment of the present application. DETAILED DESCRIPTION
[0066] The features and exemplary embodiments of various aspects of the present application will be described below in detail, in order to make the purposes, technical solutions and advantages of the present application more clear and apparent, the present application will be further described in detail below in combination with the drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, but not to limit the present application. For those skilled in the art, the present application can be implemented without some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by showing examples of the present application.
[0067] It should be noted that, in this paper, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitation, the elements defined by the statement "include" do not exclude the presence 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 with the characteristics of traditional physical server, and has virtualization service function of cloud computing technology, and is the product of combination of hardware and software advantages, and its essence is a server with cloud computing service function and physical device performance. The bare metal server can be seamlessly connected and compatible with other cloud services provided by cloud vendors, such as network service (for example, vpc private network), cloud database service, etc.
[0070] Elastic bare metal is a new type of computing product with both virtual machine elasticity and physical machine performance and characteristics.
[0071] In order to solve the problems in the prior art, the embodiments of the present application provide an elastic bare metal creation method and device based on an intelligent network card, equipment, a storage medium and a program product.
[0072] In the embodiment of the present application, when the elastic bare metal is created, the server creates the storage and network devices on the intelligent network card according to the storage configuration information and the network configuration information on the basis of the original elastic bare metal in the server according to the creation information of the user end, so that the user end can directly access the elastic bare metal information through the virtual port information, the creation of the elastic bare metal of the intelligent network card is realized, the creation cycle is shortened through the interaction between the server and the intelligent network card, the creation operation is simplified, manual intervention is not needed, and the operation and maintenance cost is reduced.
[0073] Firstly, the elastic bare metal creation system based on the intelligent network card provided in the embodiment of the present application is introduced.
[0074] Referring to Figure 1 , Figure 1 FIG. 1 is a structural schematic diagram of the elastic bare metal creation system based on the intelligent network card, the elastic bare metal creation system based on the intelligent network card comprises a user end 10, a server 11 and an intelligent network card 12, the user end 10 is in communication connection with the server 11 through a network, and the server 11 is in network connection with the intelligent network card 12.
[0075] In some embodiments, the user end 10 can be a computer, a tablet computer or the like intelligent device capable of logging in a system platform, the server 11 can be an electronic device capable of communicating with a physical server, and the intelligent network card 12 can be a data processing unit (DPU).
[0076] In the embodiment, the server 11 can comprise a bare metal computing node and a back-end memory, the bare metal computing node can be an electronic device, and the back-end memory can be a physical server.
[0077] Referring to Figure 2 , Figure 2 FIG. 2 is a flow schematic diagram of the elastic bare metal creation method based on the intelligent network card.
[0078] S201, the user end 10 sends a request for creating an elastic bare metal to the server 11.
[0079] S202, the server 11 acquires creation information of the elastic bare metal in response to the request for creating the elastic bare metal from the user end 10.
[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 intelligent network card 12.
[0082] S205, the intelligent 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 intelligent network card 12 transmits the virtual network port information to the service end 11.
[0084] S207, the service end 11 receives the virtual network port information sent by the intelligent network card 12.
[0085] S208, in the case that the virtual network port information and the virtual port information are the same, the intelligent network card is mounted according to the creation information, and a creation result is obtained.
[0086] S209, the creation result is sent to the user end 10.
[0087] In some embodiments, in S201, the tenant can operate the user end 10 to log in to the intelligent network card-based elastic bare metal creation system, and then send a creation request of the elastic bare metal to the service end 11 according to the guidance command of the system.
[0088] In some embodiments, in S202, the user fills in the creation information in the user end when creating the elastic bare metal in the user end 10, and the creation information can include storage configuration information and network configuration information, that is, the storage configuration information can be the running memory, data storage, data disk size, etc. of the elastic bare metal, and the network configuration information can include the access address and ip address of the user end.
[0089] In some embodiments, in S203, the service end 11 can generate virtual port information according to the creation information, which is used for the virtual access port of the elastic bare metal.
[0090] It is worth noting that when creating the elastic bare metal, the virtual port information can be generated by calling Neutron to create the virtual port information (Port) on the basis of the OpenStack basedriver, and the virtual port information is used to represent the first access address of the elastic bare metal.
[0091] In some embodiments, in S204, the service end 11 sends the Port information to the intelligent network card, and the intelligent network card 12 creates the virtual network port information according to the Port information.
[0092] In some embodiments, in S205, the intelligent network card 12 creates the virtual network port information according to the virtual port information, so that the user end 10 can access the elastic bare metal through the virtual network port information, and the virtual network port information is used to represent the network card access address of the intelligent network card, that is, the network access address is configured in the configuration process (Ironic-Agent) of the intelligent network card, so as to be associated 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, mounting 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 mounting operation can include a storage mounting operation and a network mounting operation, and the creation result can include virtual hard disk information and network information, wherein the virtual hard disk information can be a system disk and a disk symbol, and the network information can be an IP address or an access address of the network.
[0094] In some embodiments, after S208, the server 11 calls an intelligent platform management interface (ipmi) to restart the elastic bare metal by using a configuration tool (Ironic), the elastic bare metal starts to scan hardware to identify virtual hard disk information and network information, and then controls the virtual hard disk to start.
[0095] When creating the elastic bare metal, the server creates storage and network devices according to the storage configuration information and the network configuration information on the intelligent network card on the basis of the original elastic bare metal in the server according to the creation information of the user end, so that the user end can directly access the elastic bare metal information through the virtual network port information, realizes the creation of the elastic bare metal of the intelligent network card, shortens the creation period through the interaction between the server and the intelligent network card, simplifies the creation operation, and does not need manual intervention. Moreover, in the later operation and maintenance, the virtual network port and the original elastic bare metal port are the same interface, and only the unified management of the virtual machine and the elastic bare metal instance block storage service needs to be realized through the user end, thereby reducing the operation and maintenance cost.
[0096] Figure 3 A flowchart of a method for creating an elastic bare metal based on an intelligent network card is shown, which is applied to a server. Figure 3 As shown, the method for creating an elastic bare metal based on an intelligent network card includes the following steps S301-S305.
[0097] S301, in response to a request of the user end for creating an elastic bare metal, creation information of the elastic bare metal is obtained.
[0098] In one embodiment, generally when creating an elastic bare metal, the user logs in to an elastic bare metal creation system based on an intelligent network card through a user end, and supplements creation information according to a preset template built in the system, as an example, the creation information includes storage configuration information and network configuration information; after the creation information is completed, the server obtains the creation information of the user end through a communication protocol.
[0099] S302, virtual port information is generated according to the creation information.
[0100] In some embodiments, after the service end obtains the creation information, a new virtual network port needs to be created in the original elastic bare metal according to the user-provided creation information, that is, a virtual port information is generated according to the creation information to generate a virtual network port. It is understood that the virtual port information can be a second access address corresponding to the generated virtual network port.
[0101] In one embodiment, in the process of creating virtual port information, a block storage service (Cinder) in the base driver (OpenStack base driver) can be used to create a bootable volume according to the user's selected image mode. As an example, the image mode can include custom image making, virtual machine or physical machine image making, image modification and generation, etc.
[0102] It can be known that:
[0103] 1. Custom image making:
[0104] After the user writes data in the elastic bare metal instance, waits for the host to be created, and then creates an image.
[0105] Enter the bare metal server management interface through the console, select the specified bare metal, 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 images made in the image management page.
[0107] 2. Virtual machine or physical machine image making:
[0108] The user can use the system installed on the virtual machine, physical machine or container for image making.
[0109] For Linux systems, it is recommended to use ZStack Cloud's cloud host for image making, ensure that the cloud host system BIOS mode is set to UEFI, and avoid using LVM partitioning to reduce possible problems.
[0110] For Windows systems, you can use the Windows system installed on the physical server for image making.
[0111] 3. Image modification and generation:
[0112] Image making usually includes two processes: image modification and image generation.
[0113] For specific systems (such as CentOS 7.6 / 7.9), you may need to use specific scripts and dependent packages for image modification to ensure that the image is compatible with the bare metal server.
[0114] Container image support:
[0115] While not directly pertaining to bare metal images, the new generation of cloud-native bare metal solutions combine bare metal and container technologies, allowing users to quickly deploy applications through container images.
[0116] This approach provides greater flexibility and portability, enabling applications to run seamlessly across different computing platforms.
[0117] In this embodiment, the created virtual port information is returned to the network module (Nova) of the elastic bare metal for storage of the virtual port information.
[0118] In this embodiment, when it is necessary to associate the elastic bare metal and the intelligent network card, the virtual port information of the elastic bare metal needs to be sent to the intelligent network card, and the intelligent network card creates virtual network port information according to the virtual port information.
[0119] S303, transmitting the virtual port information to the intelligent network card to make the intelligent network card create virtual network port information and access the elastic bare metal of the service end through the virtual network port information, and the intelligent network card sends the virtual network port information to the service end.
[0120] Referring to Figure 4 In one specific embodiment, S303 can specifically include the following steps:
[0121] S3031, obtaining a mounting identification number.
[0122] S3032, performing address extraction on the network configuration information to obtain a first access address of the user end.
[0123] S3033, determining an access interface of the intelligent network card according to the first access address and the mounting identification number.
[0124] S3034, determining a second access address of the intelligent network card according to the access interface.
[0125] S3035, taking the second access address as the virtual port information.
[0126] In this embodiment, in order for the intelligent network card to be network-mounted on the elastic bare metal, it is necessary to obtain the mounting identification number (bdf number) of the elastic bare metal. The obtaining method can be to obtain from a local database in a local server corresponding to the elastic bare metal, or to obtain from a pre-stored mounting identification number list in the intelligent network card.
[0127] As an example, the mounting identification number is used to represent the network address information corresponding to the intelligent network card
[0128] In the creation information, the creation information generally stores the first access address of the user end. In the intelligent network card, a plurality of access interfaces are generally provided. The second access address of the intelligent network card can be determined through the access interfaces, that is, the second access address can be randomly allocated by the intelligent network card, or the second access address can be allocated by the intelligent network card according to the storage order.
[0129] Then, the second access address is taken as the virtual network port information and is sent to the server, so as to establish the network connection between the elastic bare metal and the intelligent network card.
[0130] In the embodiment, after the virtual network port information is created, the virtual network port information of the intelligent network card needs to be bound with the virtual machine, that is, the second access address is used to generate a virtual machine representative port according to the network configuration information. As an example, the virtual machine representative port can be a port for accessing the virtual machine. Then, the virtual machine representative port is taken as the virtual network port information. At this time, the newly created elastic bare metal completes the preparation before the network mounting, that is, the association with the intelligent network card and the virtual machine is established and the binding is performed through the virtual port information, 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 the virtual network port information sent by the intelligent network card;
[0132] In one embodiment, after the intelligent network card generates the virtual network port information, the intelligent network card receives the virtual network port information through the network protocol, so that the server can complete the creation operation according to the received virtual network port information.
[0133] S305, in the case that the virtual port information is the same as the virtual network port information, performing a mounting operation on the intelligent network card according to the storage configuration information and the network configuration information, to obtain a creation result.
[0134] In one specific embodiment, the creation result includes the mounted virtual hard disk information and the network information, and the mounting operation can include a network mounting operation and a storage mounting operation; that is, the server and the intelligent network card perform network mounting and storage mounting, to complete the creation of the elastic bare metal.
[0135] In the embodiment of the application, when the elastic bare metal is created, the server creates the storage and network devices according to the storage configuration information and the network configuration information on the basis of the original elastic bare metal in the server according to the creation information of the user end, that is, the virtual network port information. In one example, the virtual network port information is used to represent the network card access address of the intelligent network card. The user end can directly access the elastic bare metal information through the virtual network port information, the creation of the intelligent network card is realized, the creation period is shortened through the interaction between the server and the intelligent network card, the creation operation is simplified, manual intervention is not needed, and the operation and maintenance cost is reduced.
[0136] In one embodiment, before performing the storage mounting operation, some storage preparation is required to meet the requirements of the storage mounting operation when performing the storage mounting operation, which is more convenient and fast.
[0137] In one embodiment, before performing the mounting operation according to the storage configuration information and the network configuration information, the method further comprises the steps of:
[0138] Obtaining a mounting identification number, the mounting identification number being used to represent the storage location information corresponding to the user terminal;
[0139] Determining a storage initiator and a storage location identifier according to the storage configuration information;
[0140] Creating a storage block device according to the storage initiator and the storage location identifier;
[0141] Obtaining storage interface information of the intelligent network card;
[0142] Storing the mounting identification number and the storage block device according to the storage interface information to obtain an association result, so as to realize the storage mounting operation according to the storage configuration information.
[0143] In this embodiment, before performing the storage mounting operation, the mounting identification number is used to determine the storage information of the elastic bare metal, that is, to determine which storage disks of the physical server can be used by the elastic bare metal, so the storage range needs to be determined according to the mounting identification number of the elastic bare metal, and the storage range needs to be associated with the intelligent network card, so that the user can correctly access the elastic bare metal when accessing 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 can include a storage initiator (initiator_name) and a storage location identifier (url number), and then the storage initiator and the storage location identifier are used to connect the distributed block storage of the physical server, and a storage block device (bdf device) is created in the physical server. At the same time, the storage interface information of the intelligent network card is obtained by using the above mounting identification number, and then the storage interface information is associated with the storage block device by the server to obtain an association result. At this time, the elastic bare metal can recognize the storage block device by scanning the hardware device after restarting, which facilitates the storage mounting of the elastic bare metal and the elastic bare metal.
[0145] In addition, it is worth noting that the storage mounting is connected to the file system hierarchy of the physical server through the storage interface information of the intelligent network card, so that the user can access the remote file as if accessing the local file.
[0146] In another embodiment, before performing the storage mounting operation according to the storage configuration information, the method further comprises:
[0147] acquire at least one disk;
[0148] identify the at least one disk according to a preset identification rule;
[0149] in a case where the number of disks is one, the disk is determined as a system disk;
[0150] in a case where the number of disks is at least two, one of the disks is determined as a system disk and the other disks except the system disk are determined as data disks according to the preset identification rule.
[0151] In the embodiment, since there are multiple disks in the physical server, the disks are all used to provide storage media, and the elastic bare metal needs to identify the disks to obtain disk symbols when being created. When the user's storage configuration information includes one determined disk, the determined disk is both a system disk and a data disk, that is, the system disk is used to store a system and the data disk is used as a storage medium to store some data required to be stored by a user, including but not limited to files, videos, etc.
[0152] In one specific embodiment, when the user's storage configuration information includes multiple disks, that is, the number of disks is at least two, one disk needs to be determined as a system disk and the other disks are determined as data disks. As an example, the preset identification rule can be to sort the at least two disks, acquire the size of system data and the size of the disks, calculate the difference between the size of the disks and the size of the system data, and the disk corresponding to the minimum difference is the system disk and the rest are the data disks. It is worth noting that the above preset identification rule is only an exemplary description and is not limited herein.
[0153] In one embodiment, in order to realize the life cycle management of the elastic bare metal, form a complete operation closed loop, and perform a quick operation response, the elastic bare metal also needs to be configured with an unloading volume, and not only the unloading of the storage block device but also the deletion of the network port and the unbundling of the network are realized.
[0154] After the mounting operation is performed 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 of the user end, acquiring a storage location identifier transmitted by the user end;
[0156] determining a mounting identification number according to the storage location identifier;
[0157] unloading the storage block device according to the mounting identification number to obtain an unloading result and transmitting the unloading result to the user end.
[0158] In the embodiment, since the storage mounting operation is performed based on the storage performance development kit (SPDK), when the unmounting is performed, a storage block device unmounting command of the user end is first received, the storage location identifier, i.e., the address of the storage block device corresponding to the user end, is contained in the unmounting command, the mounting identifier of the elastic bare metal is determined through the storage location identifier, the storage block device is unmounted through the mounting identifier, and the unmounting result is obtained. As an example, the unmounting result includes unmounting success and unmounting failure.
[0159] In addition, for the storage volume created by the existing Internet Small Computer System Interface (ISCSI), the ISCSI task is directly pushed out, and the configuration information of the Internet Small Computer System Interface is deleted. Since it is a conventional technology, it will not be described here.
[0160] In another embodiment, in order to realize the unmounting of the virtual network port, after the mounting operation is performed according to the storage configuration information and the network configuration information, the method further includes:
[0161] In response to the virtual network port unmounting request of the user end, the virtual network port information corresponding to the user end is obtained;
[0162] The mounting identifier is determined according to the virtual network port information;
[0163] The second access address of the intelligent network card is called according to the mounting identifier;
[0164] The access interface is determined according to the second access address;
[0165] The access interface is deleted, and the first deletion result is obtained;
[0166] The first deletion result is sent to the user end.
[0167] In the embodiment, the virtual network port unmounting request transmitted by the user end is received, the virtual network port information created in the foregoing is obtained, the mounting identifier of the elastic bare metal is determined through the virtual network port information, since the mounting identifier corresponds to the second access address of the intelligent network port, the access interface of the intelligent network card can be determined through the mounting identifier, and then the access interface is deleted to obtain the first deletion result. The first deletion result includes success or failure of deletion, and finally the first deletion result is sent to the user end, so that the user knows the first deletion result.
[0168] In another embodiment, after the mounting operation is performed according to the storage configuration information and the network configuration information, the method further includes:
[0169] In response to the virtual machine representative port unbinding request transmitted by the user end, the virtual network port information transmitted by the user end is acquired;
[0170] The virtual machine representative port is deleted according to the virtual port information, and a second deletion result is obtained;
[0171] The second deletion result is transmitted to the user end.
[0172] In the embodiment, the virtual machine representative port also needs to be unbound to realize the disassociation of the virtual machine and the elastic bare metal, so when the 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, a second deletion result is obtained, and the second deletion result is transmitted to the user end, so that the user end knows 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, and new virtual port information is obtained.
[0175] In the embodiment, in order to ensure the consistency of the elastic bare metal and the intelligent network card, the network card access address and the virtual port need to be updated. Only when the network card access address and the virtual port information of the elastic bare metal are consistent, the elastic bare metal can be accessed through the intelligent network card. Therefore, the virtual port information can be updated through the network card access address, so that the virtual port information is consistent with the network card access address.
[0176] It is worth noting that the embodiments of the present application directly create / delete system disks through the storage block service (Cinder), which significantly shortens the resource delivery period, reduces the cost of later operation and maintenance, and improves the overall automation level and resource delivery efficiency of resource delivery.
[0177] In addition, by managing system disks through the storage block service, direct mounting through SPDK can significantly shorten the creation period and improve the creation efficiency.
[0178] In another aspect, since the elastic bare metal is associated with the intelligent network card, the virtual network port, the storage block device creation, and the storage block device deletion interface are uniformly configured, so that the same interface can be used to manage the life cycle of the traditional elastic bare metal and the intelligent network card at the same time, thereby reducing the development workload.
[0179] Referring to Figure 5 The embodiments of the present application provide an elastic bare metal creation device 500 based on an intelligent network card, which comprises:
[0180] The acquisition module 501 is configured to acquire creation information of the elastic bare metal in response to a user terminal creating an elastic bare metal request, the creation information including storage configuration information and network configuration information.
[0181] The generation module 502 is configured to generate virtual port information according to the creation information, the virtual port information including a virtual machine representative port.
[0182] The transmission module 503 is configured to transmit the virtual port information to an intelligent network card, so that the intelligent network card creates virtual network port information and accesses the elastic bare metal of the service terminal through the virtual network port information, and the intelligent network card sends the virtual network port information to the service terminal.
[0183] The receiving module 504 is configured to receive the virtual network port information sent by the intelligent network card.
[0184] The mounting module 505 is configured to perform a mounting operation on the intelligent network card according to the storage configuration information and the network configuration information in a case where the first access address is the same as the network card access address, to obtain a creation result, the creation result including virtual hard disk information and network information of the mounting.
[0185] As an optional implementation manner, the mounting module 505 can also be configured to:
[0186] Obtain a mounting identification number, the mounting identification number being used to represent storage location information corresponding to the user terminal;
[0187] Determine a storage initiator and a storage location identifier according to the storage configuration information;
[0188] Create a storage block device according to the storage initiator and the storage location identifier;
[0189] Obtain storage interface information of the intelligent network card;
[0190] According to the storage interface information, the mounting identification number and the storage block device are stored in association, to obtain an association result, so as to realize the storage mounting operation according to the storage configuration information.
[0191] As an optional implementation manner, the mounting module 505 can also be configured to:
[0192] Obtain at least one disk;
[0193] Identify the at least one disk according to a preset identification rule;
[0194] In a case where the number of the disks is one, the disk is determined as a system disk;
[0195] In a case where the number of the disks is at least two, one of the disks is determined as a system disk and the other disks except the system disk are determined as data disks according to the preset identification rule.
[0196] As an optional implementation, the mounting module 505 can also be configured to:
[0197] In response to the storage block device unloading command of the user end, obtain the storage location identifier transmitted by the user end;
[0198] Determine the mounting identification number according to the storage location identifier;
[0199] Unload the storage block device according to the mounting identification number, obtain the unloading result, and transmit the unloading result to the user end.
[0200] As an optional implementation, the transmission module 503 can also be configured to:
[0201] Obtain the mounting identification number, which is used to represent the network address information corresponding to the intelligent network card;
[0202] Extract the address from the network configuration information to obtain the first access address of the user end;
[0203] Determine the access interface of the intelligent network card according to the first access address and the mounting identification number;
[0204] Determine the second access address of the intelligent network card according to the access interface;
[0205] Take the second access address as the virtual network port information.
[0206] As an optional implementation, the transmission module 503 can also be configured to:
[0207] In response to the virtual network port binding request of the user end, generate a virtual machine representative port according to the second access address and the network configuration information;
[0208] Take the virtual machine representative port as the virtual network port information, and transmit the virtual machine representative port to the user end.
[0209] As an optional implementation, the mounting module 505 can also be configured to:
[0210] In response to the virtual network port unloading request of the user end, obtain the virtual network port information corresponding to the user end;
[0211] Determine the mounting identification number according to the virtual network port information;
[0212] Call the second access address of the intelligent network card according to the mounting identification number;
[0213] Determine the access interface according to the second access address;
[0214] Delete the access interface to obtain the first deletion result;
[0215] The first deletion result is sent to the user terminal.
[0216] As an optional implementation, the mounting module 505 can also be configured to:
[0217] In response to the virtual machine representative port unbinding request transmitted by the user terminal, the virtual network port information transmitted by the user terminal is acquired;
[0218] The virtual machine representative port is deleted according to the virtual port information, and a second deletion result is obtained;
[0219] The second deletion result is transmitted to the user terminal.
[0220] As an optional implementation, the mounting module 505 can also be configured to:
[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, and new virtual port information is obtained.
[0223] Figure 6 A hardware structure schematic diagram of an electronic device provided by an embodiment of the present application is shown.
[0224] The electronic device can include a processor 601 and a memory 602 having computer program instructions stored therein.
[0225] Specifically, the processor 601 can include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement one or more embodiments of the present application.
[0226] The memory 602 can include a mass storage for data or instructions. By way of example and not limitation, the memory 602 can 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 can include a removable or non-removable (or fixed) media, or the memory 602 is a non-volatile solid-state memory. The memory 602 can be internal or external to the integrated gateway disaster recovery device.
[0227] In one example, the memory 602 can be a Read Only Memory (ROM). In one example, the ROM can be a mask programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM), or a flash memory, or a combination of two or more of these.
[0228] The memory 602 can include a read only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical, or other physical / tangible memory storage device. Thus, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions that, when executed (e.g., by one or more processors), are operable to perform the operations described with reference to the method of creating a smart NIC-based elastic bare metal according to the first aspect of the present disclosure.
[0229] The processor 601 implements the method of creating a smart NIC-based elastic bare metal according to the first aspect of the present disclosure by reading and executing computer program instructions stored in the memory 602. Figure 1 The processor 601 implements the method of creating a smart NIC-based elastic bare metal according to the first aspect of the present disclosure by reading and executing computer program instructions stored in the memory 602.
[0230] In one example, the electronic device can further include a communication interface 603 and a bus 604. Wherein, as shown, the processor 601, the memory 602, and the communication interface 603 are connected through the bus 604 and complete communication between each other. Figure 5 As shown, the processor 601, the memory 602, the communication interface 603 are connected through the bus 604 and complete communication between each other.
[0231] The communication interface 603 is mainly used to realize the communication between each module, device, unit and / or equipment in the embodiments of the present application.
[0232] Bus 604 includes a hardware, software, or both that couples components of electronic device to each other. As an example and not by way of limitation, bus can include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand™ interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or another suitable bus or a combination of two or more of these. Where appropriate, bus 604 can include one or more buses. Although this application describes and shows a particular bus, this application contemplates any suitable bus or interconnect.
[0233] The electronic device can perform the video query method in the embodiments of the application, thereby realizing the described method and device for creating flexible bare metal based on an intelligent network card.
[0234] In addition, in combination with the video query method in the above embodiments, the embodiments of the application can provide a computer storage medium to implement. The computer storage medium has computer program instructions stored thereon; the computer program instructions are executed by a processor to implement any one of the above embodiments of the method for creating flexible bare metal based on an intelligent network card.
[0235] In an optional embodiment, in combination with the method for creating flexible bare metal based on an intelligent network card in the above embodiments, the embodiments of the application can provide a computer program product to implement, 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 above embodiments of the method for creating flexible bare metal based on an intelligent network card.
[0236] It needs to be clear that the application is not limited to the specific configurations and processes described above and shown in the drawings. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the 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 steps, after understanding the spirit of the application.
[0237] The functional blocks shown in the structural block diagrams above can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application specific integrated circuits (ASICs), appropriate firmware, plug-ins, functional cards, and the like. When implemented in software, the elements of the present application are program or code segments that are used to perform the required tasks. The program or code segments can be stored in a machine-readable medium, or transmitted through a data signal carried in a carrier wave over a transmission medium or communication link. A "machine-readable medium" includes any medium that can store or transport information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memory, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, and the like. The code segments can be downloaded via computer networks such as the Internet, intranets, and the like.
[0238] It is also important to note that the examples in the present application are described based on a series of steps or apparatuses to describe some methods or systems. However, the present application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the examples, or in an order different from the examples, or several steps can be performed simultaneously.
[0239] The above generally describes aspects of the present application with reference to a flowchart and / or a block diagram of methods, apparatuses (systems) and computer program products according to embodiments of the present application. It should be understood that each block of the flowchart and / or block diagram, and combinations of blocks 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 apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus implement the functions / acts specified in the flowchart and / or block diagram block or blocks. The processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special-purpose application processor, or a field programmable logic circuit. It can also be understood that each block of the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can also be implemented by special-purpose hardware to perform the specified functions or acts, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0240] The above is only a specific embodiment of the present application, and those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, modules and units can refer to the corresponding processes in the foregoing method embodiments, which will not be described here. It should be understood that the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be covered within the protection scope of the present application.
Claims
1. A method for creating a smart NIC-based elastic bare metal, characterized in that, Applied to a server side, comprising: In response to a user side creating an elastic bare metal request, obtaining creation information of the elastic bare metal, the creation information including storage configuration information and network configuration information; According to the creation information, virtual port information is generated, and the virtual port information is used to represent a second access address of the elastic bare metal; The virtual port information is transmitted to an intelligent network card, so that the intelligent network card creates virtual network port information, and accesses the elastic bare metal of the server side through the virtual network port information, the intelligent network card sends virtual network port information to the server side, and the virtual network port information is used to represent a network card access address of the intelligent network card; Receiving the virtual network port information sent by the intelligent network card; In the case that the virtual port information is the same as the virtual network port information, the intelligent network card is mounted according to the storage configuration information and the network configuration information, and a creation result is obtained, the creation result including mounted virtual hard disk information and network information; The virtual port information is transmitted to an intelligent network card, so that the intelligent network card creates virtual network port information, and accesses the elastic bare metal of the server side through the virtual network port information, the intelligent network card sends virtual network port information to the server side, and the virtual network port information is used to represent a network card access address of the intelligent network card; Obtaining a mounting identification number, the mounting identification number is used to represent the network address information corresponding to the intelligent network card; The network configuration information is extracted to obtain a first access address of the user side; According to the first access address and the mounting identification number, the access interface of the intelligent network card is determined; According to the access interface, the second access address of the intelligent network card is determined; The second access address is used as virtual network port information.
2. The method of claim 1, wherein, The mounting operation includes storage mounting, and before the mounting operation according to the storage configuration information and the network configuration information, the method further comprises: Obtaining a mounting identification number, the mounting identification number is used to represent the storage location information corresponding to the user side; According to the storage configuration information, a storage initiator and a storage location identifier are determined; According to the storage initiator and the storage location identifier, a storage block device is created; Obtaining storage interface information of the intelligent network card; According to the storage interface information, the mounting identification number and the storage block device are stored to obtain an association result, so as to realize the storage mounting operation according to the storage configuration information.
3. The method of claim 2, wherein, Before the storage mounting operation according to the storage configuration information, the method further comprises: Obtaining at least one disk; According to a preset identification rule, the at least one disk is identified; In the case that the number of the disks is one, the disk is determined as a system disk; In the case that the number of the disks is at least two, one of the at least two disks is determined as a system disk according to a preset identification rule, and the other disks except the system disk are determined as data disks.
4. The method of claim 2, wherein, After the mounting operation according to the storage configuration information and the network configuration information, the method further comprises: In response to a user side storage block device uninstalling command, obtaining a storage location identifier transmitted by the user side; determining a mounting identifier according to the storage location identifier; unmounting the storage block device according to the mounting identifier to obtain an unmounting result, and transmitting the unmounting result to the user end.
5. The method of claim 1, wherein, After the second access address is taken as the virtual network port information, the method further comprises: generating a virtual machine representative port according to the second access address and the network configuration information in response to a virtual network port binding request of the user end; taking the virtual machine representative port as the virtual network port information, and transmitting the virtual machine representative port to the user end.
6. The method of claim 1, wherein, After the mounting operation is performed according to the storage configuration information and the network configuration information to obtain a creation result, the method further comprises: obtaining the virtual network port information corresponding to the user end in response to a virtual network port unmounting request of the user end; determining a mounting identifier according to the virtual network port information; calling a second access address of the intelligent network card according to the mounting identifier; determining the access interface according to the second access address; deleting the access interface to obtain a first deletion result; transmitting the first deletion result to the user end.
7. The method of claim 5, wherein, After the mounting operation is performed according to the storage configuration information and the network configuration information to obtain a creation result, the method further comprises: obtaining the virtual network port information transmitted by the user end in response to a virtual machine representative port unbinding request transmitted by the user end; 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 end.
8. The method of claim 1, wherein, in the case that the first access address and the network card access address are not the same; updating the virtual port information according to the network card access address to obtain new virtual port information. 9.A smartNIC-based elastic bare metal creation apparatus, characterized by comprising: The device comprises: an obtaining module configured to obtain creation information of the elastic bare metal in response to a creation request of the elastic bare metal of the user end, the creation information comprising storage configuration information and network configuration information; a generating module configured to generate virtual port information according to the creation information, the virtual port information comprising a virtual machine representative port; a transmitting module configured to transmit the virtual port information to an intelligent network card, so that the intelligent network card creates virtual network port information, and accesses the elastic bare metal of a service end through the virtual network port information, and the intelligent network card sends the virtual network port information to the service end; a receiving module configured to receive the virtual network port information sent by the intelligent network card; a mounting module configured to perform a mounting operation on the intelligent network card according to the storage configuration information and the network configuration information in the case that a first access address and a network card access address are the same, to obtain a creation result, the creation result comprising mounted virtual hard disk information and network information; the transmitting module comprises: an identifier obtaining unit configured to obtain a mounting identifier, the mounting identifier being used to represent network address information corresponding to the intelligent network card; a first address extracting unit configured to extract an address from the network configuration information to obtain a first access address of the user end; an interface determining unit configured to determine an access interface of the intelligent network card according to the first access address and the mounting identifier; A second address determining unit is configured to determine a second access address of the intelligent network card according to the access interface; A network port information determining unit is configured to take the second access address as virtual network port information.
10. An electronic device based on claim 9, wherein, The device comprises a processor and a memory storing computer program instructions; The processor executes the computer program instructions to implement the method for creating an elastic bare metal based on an intelligent network card according to any one of claims 1-8.
11. A computer readable storage medium, characterized in that, The computer readable storage medium stores computer program instructions, and the computer program instructions are executed by the processor to implement the method for creating an elastic bare metal based on an intelligent network card according to any one of claims 1-8.
12. A computer program product, characterised in that, The instructions in the computer program product are executed by the processor of the electronic device to enable the electronic device to implement the method for creating an elastic bare metal based on an intelligent network card according to any one of claims 1-8.
Citation Information
Patent Citations
Virtual network configuration method and system of bare metal server and intelligent network card
CN114070723A
Bare metal server management method and device and readable storage medium
CN116185609A