A method, apparatus, device and storage medium for creating a smart network interface card (NIC) system image.
By using a smart network interface card (NIC) system image creation method, the acquisition, installation, and packaging of image files are automated, solving the cumbersome problem of reinstalling and packaging smart NIC systems, and achieving functional optimization and cost reduction.
Patent Information
- Application Number
- CN202211296684.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-21
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2042-10-21
AI Technical Summary
The creation of smart network interface card (NIC) system image files in existing technologies lacks automation, making NIC system reinstallation and repackaging cumbersome and increasing the workload and R&D costs for development and testing personnel.
A method for creating a smart network interface card (NIC) system image is provided. This method involves obtaining an initial image file and software package from a physical server, installing them into the smart NIC system, and then packaging, decompressing, and replacing them to generate a custom target image file.
It completely eliminates the cumbersome process of reinstalling and repackaging the network card system, optimizes the functions of the smart network card system, reduces the workload of development and testing personnel, saves human resources, and lowers R&D costs.
Smart Images

Figure CN115904402B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, device and storage medium for creating a smart network card system image. Background Technology
[0002] Currently, software-defined data centers are a hot technology. VMware, as the world's largest virtualization vendor, has achieved the virtualization of software-defined applications and all the resources they require, such as servers, storage, networking, and security functions, and then combined all elements to create a software-defined data center, thus transcending physical subnet boundaries.
[0003] However, while there are no hardware bottlenecks in network performance between virtual machines on the same physical node on virtualization platforms, achieving ideal network performance across different physical nodes remains a significant challenge. Currently, the mainstream solution for accelerating network virtualization in virtualized networks is to use OpenvSwitch (OVS, a virtual switching software). This involves offloading OVS flow tables to hardware using smart network interface cards (NICs), allowing traffic to be forwarded and handled directly by the hardware when communicating between physical nodes. However, the internal systems of smart NICs often require installation using BFB (Browser over Flow) image files. Currently, most smart NIC manufacturers only provide pre-made BFB images and do not offer automated image creation. Therefore, automating the creation of smart NIC system image files is a problem that needs to be solved by those skilled in the art. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a method, apparatus, device, and storage medium for creating a smart network interface card (NIC) system image, which can completely eliminate the cumbersome process of reinstalling and repackaging the NIC system, optimize the relevant functions of the smart NIC system, greatly reduce the workload of development and testing personnel, save human resources, and effectively reduce R&D costs. The specific solution is as follows:
[0005] In a first aspect, this application discloses a method for creating a smart network interface card (NIC) system image, applied to a physical server with a smart NIC installed, comprising:
[0006] Obtain the image file related to the smart network card from the physical server to obtain the initial image file, and install the initial image file into the smart network card system;
[0007] The software package to be installed is obtained from the physical server, the target software package is obtained, and the target software package is installed into the smart network card system;
[0008] Obtain the current image file, which includes the target software package and the initial image file, from the smart network card, and package the current image file using the smart network card to obtain a packaged data file package;
[0009] The initial image file is decompressed to obtain the target file system image, and the packaged data file package is used to replace the data file package in the target file system image to obtain the replaced file system image;
[0010] The replaced file system image is packaged to obtain the target image file.
[0011] Optionally, obtaining the image file related to the smart network card from the physical server to obtain the initial image file includes:
[0012] Obtain the bfb type image file related to the smart network card from the physical server to obtain the initial image file.
[0013] Optionally, installing the initial image file into the smart network interface card system includes:
[0014] The initial image file is installed into the smart network card system via the rshim port.
[0015] Optionally, the step of packaging the current image file to obtain a packaged data file package includes:
[0016] Remove unnecessary files from the current image file to obtain the image file after removal;
[0017] The removed image files are packaged to obtain a packaged data file package.
[0018] Optionally, obtaining the target software package from the physical server includes:
[0019] The target software package is obtained by retrieving the RPM package to be installed from the physical server.
[0020] Optionally, before obtaining the image file related to the smart network interface card from the physical server, the method further includes:
[0021] Check if the initial image file related to the smart network card and the target software package to be installed exist in the local storage hardware device information directory;
[0022] Check if the preset directory contains information related to the smart network card;
[0023] Check whether the smart network card system and the physical server system have established a normal connection;
[0024] If the storage hardware device information directory contains the initial image file related to the smart network card and the target software package to be installed, the preset directory contains information related to the smart network card, and the smart network card system has established a normal connection with the physical server system, then the step of obtaining the image file related to the smart network card from the physical server is executed.
[0025] Optionally, installing the target software package into the smart network interface card system includes:
[0026] Copy the target software package to the smart network interface card system, and check whether the target software package is compatible with the smart network interface card system;
[0027] If the target software package is compatible with the smart network interface card system, then the target software package is installed into the smart network interface card system.
[0028] Secondly, this application discloses a smart network interface card (NIC) system image creation device, applied to a physical server with a smart NIC installed, comprising:
[0029] The first image file acquisition module is used to acquire the image file related to the smart network card from the physical server to obtain the initial image file;
[0030] The image file installation module is used to install the initial image file into the smart network card system;
[0031] The software package acquisition module is used to acquire the software package to be installed from the physical server to obtain the target software package;
[0032] A software package installation module is used to install the target software package into the smart network interface card system;
[0033] The second image file acquisition module is used to acquire a current image file including the target software package and the initial image file from the smart network card;
[0034] The image file packaging module is used to package the current image file through the smart network card to obtain a packaged data file package;
[0035] The image file decompression module is used to decompress the initial image file to obtain the target file system image;
[0036] The data file package replacement module is used to replace the data file package in the target file system image with the packaged data file package to obtain the replaced file system image.
[0037] The file system image packaging module is used to package the replaced file system image to obtain the target image file.
[0038] Thirdly, this application discloses an electronic device, including a processor and a memory; wherein, when the processor executes a computer program stored in the memory, it implements the aforementioned method for creating a smart network card system image.
[0039] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned method for creating a smart network card system image.
[0040] As can be seen, this application is applied to physical servers with smart network interface cards (NICs) installed. First, an initial image file is obtained from the physical server, containing an image file related to the smart NIC. This initial image file is then installed into the smart NIC system. Next, a target software package is obtained from the physical server and installed into the smart NIC system. Then, a current image file, including the target software package and the initial image file, is obtained from the smart NIC. This current image file is then packaged using the smart NIC to obtain a packaged data file package. The initial image file is then decompressed to obtain a target file system image. The packaged data file package replaces the data file package in the target file system image to obtain a replaced file system image. Finally, the replaced file system image is packaged to obtain the target image file. This application completely eliminates the cumbersome process of reinstalling and packaging the NIC system, optimizes the relevant functions of the smart NIC system, greatly reduces the workload of development and testing personnel, saves human resources, and effectively reduces R&D costs. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0042] Figure 1 This is a flowchart of a method for creating a smart network interface card system image, as disclosed in this application.
[0043] Figure 2 This application discloses a flowchart of a specific method for creating a smart network interface card system image.
[0044] Figure 3 This application discloses a specific flowchart of a smart network interface card (NIC) system image creation process.
[0045] Figure 4 This is a schematic diagram of the structure of a smart network card system image creation device disclosed in this application;
[0046] Figure 5 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0047] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0048] This application discloses a method for creating a smart network interface card (NIC) system image, applied to a physical server with a smart NIC installed. See also... Figure 1 As shown, the method includes:
[0049] Step S11: Obtain the image file related to the smart network card from the physical server to obtain the initial image file, and install the initial image file into the smart network card system.
[0050] It should be noted that this embodiment is applied to physical servers with smart network cards pre-installed. The smart network card includes, but is not limited to, network cards that have an operating system, have a DPU (Distributed Processing Unit), and are capable of secondary development on the network card system (such as the CentOS system with Arm (Advanced RISC Machine) architecture) to meet some network or storage-related offloading functions.
[0051] In this embodiment, after determining the physical server, an initial image file is obtained from the physical server by retrieving the image file related to the smart network card. Then, the obtained initial image file is installed into the system of the smart network card. The initial image file is an officially prepared image file provided by the manufacturer of the smart network card. Specifically, the physical server can be a Linux server that supports the smart network card.
[0052] It should be noted that before obtaining the image file related to the smart network card from the physical server, the process specifically includes: checking whether the initial image file related to the smart network card and the target software package to be installed exist in the local storage hardware device information directory; checking whether the information related to the smart network card is recorded in the preset directory; checking whether the smart network card system and the physical server system have established a normal connection; if the initial image file related to the smart network card and the target software package to be installed exist in the storage hardware device information directory, the information related to the smart network card is recorded in the preset directory, and the smart network card system and the physical server system have established a normal connection, then the step of obtaining the image file related to the smart network card from the physical server is executed. For example, before retrieving the image file related to the smart network card from the physical server, check whether the image file related to the smart network card and the target package to be installed (such as an rpm package) exist in the / home / directory, whether the default / dev / rshim0 directory contains information related to the smart network card, and whether a normal communication connection has been established between the physical server system and the smart network card system. If all three conditions are met, it indicates that a reliable connection has been established between the physical server system and the smart network card system, and that the image file related to the smart network card is currently stored in the physical server.
[0053] Step S12: Obtain the software package to be installed from the physical server, obtain the target software package, and install the target software package into the smart network card system.
[0054] In this embodiment, after the initial image file is installed into the smart network card system, the software package to be installed (such as an RPM package) is further obtained from the physical server to obtain the target software package. Then, the target software package is installed into the smart network card system. The number of target software packages can be one or more, and no specific limitation is made here.
[0055] It should be noted that installing the target software package into the smart network interface card (NIC) system may specifically include: copying the target software package to the smart NIC system and checking whether the target software package is compatible with the smart NIC system; if the target software package is compatible with the smart NIC system, then installing the target software package into the smart NIC system. That is, after copying the target software package to the smart NIC system, the compatibility between the target software package and the smart NIC system is first checked. If the target software package is compatible with the smart NIC system, then the corresponding installation operation is performed, that is, the target software package is installed into the smart NIC system.
[0056] Step S13: Obtain the current image file including the target software package and the initial image file from the smart network card, and package the current image file using the smart network card to obtain a packaged data file package.
[0057] In this embodiment, after the target software package is installed into the smart network card system, the current image file can be further obtained from the smart network card, and then the current image file can be packaged by the smart network card to obtain a packaged data file package; wherein, the current image file includes the target software package and the initial image file.
[0058] Step S14: Decompress the initial image file to obtain the target file system image, and replace the data file package in the target file system image with the packaged data file package to obtain the replaced file system image.
[0059] In this embodiment, after the current image file is packaged by the smart network card to obtain a packaged data file package, the initial image file is decompressed to obtain a decompressed target file system image. Then, the packaged data file package replaces the data file package in the target file system image, that is, the latest custom data file package replaces the data file package in the officially made image file, thereby obtaining the replaced file system image.
[0060] Step S15: Package the replaced file system image to obtain the target image file.
[0061] In this embodiment, after replacing the data file package in the target file system image with the packaged data file package to obtain the replaced file system image, the replaced file system image is further packaged to obtain the packaged target image file.
[0062] As can be seen, this embodiment of the application is applied to a physical server with a smart network interface card (NIC) installed. First, an initial image file is obtained from the physical server, containing an image file related to the smart NIC. This initial image file is then installed into the smart NIC system. Next, a target software package is obtained from the physical server and installed into the smart NIC system. Then, a current image file, including the target software package and the initial image file, is obtained from the smart NIC. This current image file is then packaged using the smart NIC to obtain a packaged data file package. The initial image file is then decompressed to obtain a target file system image. The packaged data file package replaces the data file package in the target file system image to obtain a replaced file system image. Finally, the replaced file system image is packaged to obtain the target image file. This embodiment of the application completely eliminates the cumbersome process of reinstalling and packaging the NIC system, optimizes the relevant functions of the smart NIC system, greatly reduces the workload of development and testing personnel, saves human resources, and effectively reduces R&D costs.
[0063] This application discloses a specific method for creating a smart network interface card (NIC) system image, applied to a physical server with a smart NIC installed. See [link to relevant documentation]. Figure 2 As shown, the method includes:
[0064] Step S21: Obtain the bfb type image file related to the smart network card from the physical server to obtain the initial image file, and install the initial image file into the smart network card system through the rshim port.
[0065] In this embodiment, a BFB-type image file related to the smart network interface card (NIC) is first obtained from the physical server to obtain the official initial image file provided by the NIC manufacturer. Then, this initial image file is installed into the smart NIC system via the RSM port. For example, the following command is executed to install the initial image file:
[0066] cat CentOSxxx.bfb> / dev / rshimX / boot.
[0067] Step S22: Obtain the rpm package to be installed from the physical server to obtain the target software package, copy the target software package to the smart network card system, and then check whether the target software package is compatible with the smart network card system.
[0068] In this embodiment, the initial image file is installed into the smart network card system through the rshim port. After the smart network card is powered on, the required software packages can be installed according to specific application requirements. For example, the target software package can be obtained by obtaining the rpm package to be installed from the physical server. Then, the target software package is copied to the smart network card system, and then the compatibility between the target software package and the smart network card system is checked.
[0069] Step S23: If the target software package is compatible with the smart network card system, then install the target software package into the smart network card system.
[0070] In this embodiment, if the target software package is compatible with the smart network card system, the target software package can be further installed into the smart network card system, such as installing a bfb type image file in the current / home directory into the smart network card system.
[0071] Step S24: Obtain the current image file including the target software package and the initial image file from the smart network card, and remove unnecessary files from the current image file through the smart network card to obtain the removed image file. Then, package the removed image file to obtain the packaged data file package.
[0072] In this embodiment, after the target software package is installed into the smart network interface card (NIC) system, a current image file including the target software package and the initial image file can be obtained from the smart NIC. Then, unnecessary files are removed from the current image file using the smart NIC to obtain a removed image file. Next, the removed image file is packaged to obtain a packaged data file package. In one specific implementation, the following instructions are executed to remove unnecessary files from the current image file:
[0073]
[0074]
[0075] At this point, the image.tar.xz file of the current image is located in the / tmp / directory, and files that are not intended to be included in the tar archive are excluded using the --exclude option.
[0076] Step S25: Decompress the initial image file to obtain the target file system image, and replace the data file package in the target file system image with the packaged data file package to obtain the replaced file system image.
[0077] In this embodiment, after packaging the removed image file into a packaged data file package, the initial image file is decompressed on the physical server hosting the smart network card to obtain a decompressed target file system image. Then, the packaged data file package replaces the data file package in the target file system image to obtain a corresponding replaced file system image. For example, the following command is executed to decompress the CentOSxxx.bfb image file in the / tmp / directory of the current physical server:
[0078] mlx-mkbfb-x.. / CentOSxxx.bfb;
[0079] Then execute the following command to decompress the extracted file system image dump-initramfs-v0 again:
[0080] mkdir rootfs;
[0081] cd rootfs;
[0082] gunzip-c.. / dump-initramfs-v0|cpio-idm.
[0083] Next, go to . / centos and replace the image.tar.xz file in the / tmp / directory of the current physical server with the image.tar.xz file generated above;
[0084] Then execute the following commands to regenerate the file system image:
[0085] find.|cpio-oc|xz--threads=0 -9--verbose--check=crc32
[0086] --lzma2=dict=32MiB>.. / updated-initramfs.
[0087] Step S26: Package the replaced file system image to obtain the target image file.
[0088] In this embodiment, after replacing the data file package in the target file system image with the packaged data file package to obtain the replaced file system image, the replaced file system image can be repackaged to generate a bfb package using the following command:
[0089] cd..
[0090] mlx-mkbfb --initramfs updated-initramfs1 CentOSxxx.bfb updated-install.bfb.
[0091] In one specific implementation, see Figure 3 As shown, the updated image file is first packaged using the smart network card to obtain a new image file. Then, the bfb image file in the / home directory of the physical server is decompressed. Next, the new image file packaged by the smart network card replaces the bfb image file decompressed by the physical server. Finally, the replaced bfb image file is repackaged and saved to the physical server.
[0092] As can be seen, this embodiment of the application is applied to a physical server with a smart network interface card (NIC) installed. First, an initial image file of type BFB related to the smart NIC is obtained from the physical server. The initial image file is then installed into the smart NIC system via the RSM port. Next, the target software package is obtained from the physical server and copied to the smart NIC system. The compatibility between the target software package and the smart NIC system is then checked. If they are compatible, the target software package is installed into the smart NIC system. Then, a current image file including the target software package and the initial image file is obtained from the smart NIC. Unnecessary files are removed from the current image file using the smart NIC. The removed image file is then packaged to obtain a packaged data file package. Next, the initial image file is decompressed to obtain a target file system image. The packaged data file package replaces the data file package in the target file system image to obtain a replaced file system image. Finally, the replaced file system image is packaged. This application embodiment allows for highly customized image files based on specific application requirements, eliminating the strong dependence on original BFB type image files. Only an RPM package and an existing BFB type image file are needed to complete the update. Furthermore, it can automatically detect whether the RPM package is compatible with the smart network card system, thereby completely eliminating the tedious process of reinstalling or repackaging the network card system for smart network card developers and testers, optimizing the relevant functions of the smart network card system, and effectively reducing R&D costs.
[0093] Accordingly, this application also discloses a smart network interface card (NIC) system image creation device, applied to a physical server with a smart NIC installed. See [link to relevant documentation]. Figure 4 As shown, the device includes:
[0094] The first image file acquisition module 11 is used to acquire the image file related to the smart network card from the physical server to obtain the initial image file;
[0095] Image file installation module 12 is used to install the initial image file into the smart network card system;
[0096] The software package acquisition module 13 is used to acquire the software package to be installed from the physical server to obtain the target software package;
[0097] Package installation module 14 is used to install the target package into the smart network card system;
[0098] The second image file acquisition module 15 is used to acquire a current image file including the target software package and the initial image file from the smart network card;
[0099] The image file packaging module 16 is used to package the current image file through the smart network card to obtain a packaged data file package;
[0100] The image file decompression module 17 is used to decompress the initial image file to obtain a target file system image;
[0101] The data file package replacement module 18 is used to replace the data file package in the target file system image with the packaged data file package to obtain the replaced file system image.
[0102] The file system image packaging module 19 is used to package the replaced file system image to obtain the target image file.
[0103] The specific workflow of each of the above modules can be found in the relevant content disclosed in the foregoing embodiments, and will not be repeated here.
[0104] As can be seen, this embodiment of the application is applied to a physical server with a smart network interface card (NIC) installed. First, an initial image file is obtained from the physical server, containing an image file related to the smart NIC. This initial image file is then installed into the smart NIC system. Next, a target software package is obtained from the physical server and installed into the smart NIC system. Then, a current image file, including the target software package and the initial image file, is obtained from the smart NIC. This current image file is then packaged using the smart NIC to obtain a packaged data file package. The initial image file is then decompressed to obtain a target file system image. The packaged data file package replaces the data file package in the target file system image to obtain a replaced file system image. Finally, the replaced file system image is packaged to obtain the target image file. This embodiment of the application completely eliminates the cumbersome process of reinstalling and packaging the NIC system, optimizes the relevant functions of the smart NIC system, greatly reduces the workload of development and testing personnel, saves human resources, and effectively reduces R&D costs.
[0105] In some specific embodiments, the first image file acquisition module 11 may specifically include:
[0106] The first image file acquisition unit is used to acquire a bfb type image file related to the smart network card from the physical server to obtain an initial image file.
[0107] In some specific embodiments, the image file installation module 12 may specifically include:
[0108] The image file installation unit is used to install the initial image file into the smart network card system via the rshim port.
[0109] In some specific embodiments, the image file packaging module 16 may specifically include:
[0110] The file removal unit is used to remove unnecessary files from the current image file to obtain a removed image file.
[0111] The image file packaging unit is used to package the removed image files to obtain a packaged data file package.
[0112] In some specific embodiments, the software package acquisition module 13 may specifically include:
[0113] The RPM package acquisition unit is used to obtain the RPM package to be installed from the physical server, thereby obtaining the target software package.
[0114] In some specific embodiments, before the first image file acquisition module 11, there may be:
[0115] The first information checking unit is used to check whether the initial image file related to the smart network card and the target software package to be installed exist in the local storage hardware device information directory;
[0116] The second information checking unit is used to check whether information related to the smart network card is recorded in the preset directory;
[0117] A connection check unit is used to check whether a normal connection has been established between the smart network card system and the physical server system;
[0118] The execution unit is configured to execute the step of obtaining the image file related to the smart network card from the physical server if the initial image file related to the smart network card and the target software package to be installed exist in the storage hardware device information directory, the information related to the smart network card is recorded in the preset directory, and the smart network card system has established a normal connection with the physical server system.
[0119] In some specific embodiments, the software package installation module 14 may specifically include:
[0120] A software package copying unit is used to copy the target software package to the smart network interface card system;
[0121] A compatibility checking unit is used to check whether the target software package is compatible with the smart network interface card system;
[0122] The software package installation unit is configured to install the target software package into the smart network interface card system if the target software package is compatible with the smart network interface card system.
[0123] Furthermore, embodiments of this application also disclose an electronic device, Figure 5 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.
[0124] Figure 5 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the intelligent network card system image creation method disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0125] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0126] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0127] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the smart network card system image creation method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.
[0128] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned method for creating a smart network interface card system image. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0129] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0130] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0131] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0132] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0133] The above provides a detailed description of the method, apparatus, device, and storage medium for creating a smart network card system image provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for creating a smart network interface card (NIC) system image, characterized in that, Applied to physical servers equipped with smart network interface cards, including: Obtain the image file related to the smart network card from the physical server to obtain the initial image file, and install the initial image file into the smart network card system; The software package to be installed is obtained from the physical server, the target software package is obtained, and the target software package is installed into the smart network card system; Obtain the current image file, which includes the target software package and the initial image file, from the smart network card, and package the current image file using the smart network card to obtain a packaged data file package; The initial image file is decompressed to obtain the target file system image, and the packaged data file package is used to replace the data file package in the target file system image to obtain the replaced file system image; The replaced file system image is packaged to obtain the target image file; The step of packaging the current image file to obtain a packaged data file package includes: removing unnecessary files from the current image file to obtain a removed image file; and packaging the removed image file to obtain a packaged data file package.
2. The method for creating a smart network interface card system image according to claim 1, characterized in that, The step of obtaining the image file related to the smart network card from the physical server to obtain the initial image file includes: Obtain the bfb type image file related to the smart network card from the physical server to obtain the initial image file.
3. The method for creating a smart network interface card system image according to claim 1, characterized in that, The step of installing the initial image file into the smart network card system includes: The initial image file is installed into the smart network card system via the rshim port.
4. The method for creating a smart network interface card system image according to claim 1, characterized in that, The step of obtaining the target software package from the physical server includes: The target software package is obtained by retrieving the RPM package to be installed from the physical server.
5. The method for creating a smart network interface card system image according to claim 1, characterized in that, Before obtaining the image file related to the smart network card from the physical server, the method further includes: Check if the initial image file related to the smart network card and the target software package to be installed exist in the local storage hardware device information directory; Check if the preset directory contains information related to the smart network card; Check whether the smart network card system and the physical server system have established a normal connection; If the storage hardware device information directory contains the initial image file related to the smart network card and the target software package to be installed, the preset directory contains information related to the smart network card, and the smart network card system has established a normal connection with the physical server system, then the step of obtaining the image file related to the smart network card from the physical server is executed.
6. The method for creating a smart network interface card system image according to any one of claims 1 to 5, characterized in that, The step of installing the target software package into the smart network interface card system includes: Copy the target software package to the smart network interface card system, and check whether the target software package is compatible with the smart network interface card system; If the target software package is compatible with the smart network interface card system, then the target software package is installed into the smart network interface card system.
7. A device for creating an image of a smart network interface card system, characterized in that, Applied to physical servers equipped with smart network interface cards, including: The first image file acquisition module is used to acquire the image file related to the smart network card from the physical server to obtain the initial image file; The image file installation module is used to install the initial image file into the smart network card system; The software package acquisition module is used to acquire the software package to be installed from the physical server to obtain the target software package; A software package installation module is used to install the target software package into the smart network interface card system; The second image file acquisition module is used to acquire a current image file including the target software package and the initial image file from the smart network card; The image file packaging module is used to package the current image file through the smart network card to obtain a packaged data file package; The image file decompression module is used to decompress the initial image file to obtain the target file system image; The data file package replacement module is used to replace the data file package in the target file system image with the packaged data file package to obtain the replaced file system image. The file system image packaging module is used to package the replaced file system image to obtain the target image file; The image file packaging module is specifically used to remove unnecessary files from the current image file to obtain a removed image file; and to package the removed image file to obtain a packaged data file package.
8. An electronic device, characterized in that, It includes a processor and a memory; wherein, when the processor executes a computer program stored in the memory, it implements the method for creating a smart network card system image as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer programs are executed by a processor, they implement the method for creating a smart network card system image as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method and device for generating mirror image files
CN106843976A
Method, apparatus, computer device and storage medium for generating upgrade package
CN109144519A