Network card PXE function test method, system, electronic equipment and storage medium

By configuring the virtualized environment and virtual machines on the test server, the testing of the network card PXE function is implemented, solving the problems of high testing complexity and cost in the existing technology, and improving the testing efficiency and purity.

CN115589379BActive Publication Date: 2025-04-29INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211273968.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-18
Publication Date
2025-04-29
Estimated Expiration
2042-10-18

AI Technical Summary

Technical Problem

The prior art requires special deployment of PXE servers when testing network card PXE functions, and the configuration process is complicated, especially in a multi-local network environment, resulting in low testing efficiency and high cost.

Method used

By installing the network card to be tested on the test server and configuring the virtualization environment, two virtual machines are created, one of which provides PXE services and the other is configured to start from the network card to be tested. If the PXE function boot interface is displayed, it is determined that the PXE function of the network card is normal.

Benefits of technology

It realizes PXE functional testing of network card on a test server, simplifies the testing process, reduces material and time costs, avoids external environment interference, and improves the purity and efficiency of the test.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115589379B_ABST
    Figure CN115589379B_ABST
Patent Text Reader

Abstract

The present application provides a network card PXE function test method, system, electronic device and storage medium, including installing the network card to be tested to the test server; configuring the software environment of the test server to ensure that the test server supports the creation of virtual machines; creating a first virtual machine, and using the first virtual machine to configure the PXE server environment to provide PXE functions; creating a second virtual machine, and configuring the startup mode of the second virtual machine to start from the network card to be tested; starting the second virtual machine, if the PXE function boot interface is displayed, it is determined that the PXE function of the network card to be tested is normal. By virtualizing the traditional test server, starting two virtual machines, one virtual machine provides the PXE service function, and the other virtual machine controls the network card, and testing the network card's own support for the PXE function; the PXE function test of the network card can be implemented on a test server, effectively realizing the lightweight test method, and effectively saving material costs and time costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent network card testing, and in particular to a server test preparation method, system, electronic equipment and storage medium. Background Art

[0002] Preboot eXecution Environment (PXE) provides a way to start a computer through a network interface. The protocol is divided into client and server ends. With the continuous development and improvement of the PXE protocol, it is increasingly supported by many brands of network cards. As a result, the PXE function of smart network cards is also widely used in the server field. Network cards with PXE functions can support batch filling systems and diskless boot startup in server clusters. For servers, the deployment of large-scale test environments and production environments is of great significance. Therefore, the support of smart network cards for PXE functions is a key item to consider when selecting network cards and introducing components into servers.

[0003] There are existing testing methods for the PXE function of the network card, such as the patent CN113746694A, which proposes to deploy a network of a test machine and a machine to be tested, and the test machine cooperates with the designated machine to be tested to perform a PXE boot test in a loop. During the boot mode, the system is installed through the KS automatic response file, thereby verifying the network configuration of the network card and the stability of the PXE function. It is necessary to specially deploy a server that can provide PXE service functions (referred to as the PXE server), and the PXE server needs to open the DHCP (Dynamic Host Configuration Protocol) service and the TFTP (Trivial File Transfer Protocol) service, and it is also necessary to further deploy the files and environment required for PXE booting, and its configuration process is relatively complicated; at the same time, after the network card to be tested is installed on the test server, it needs to be connected to the local area network of the PXE server. For a test environment with multiple local area networks, its installation and deployment is relatively inconvenient.

[0004] Therefore, there is an urgent need for a network card PXE function testing method that can improve testing efficiency and reduce costs to solve the above technical problems of the prior art. Summary of the invention

[0005] In order to solve the deficiencies of the prior art, the main purpose of the present invention is to provide a network card PXE function test method, system, electronic device and storage medium to solve the above technical problems of the prior art.

[0006] In order to achieve the above object, the present invention provides a method for testing the PXE function of a network card, the method comprising:

[0007] Install the network card to be tested to the test server;

[0008] Configuring the software environment of the test server to ensure that the test server supports virtual machine creation;

[0009] Creating a first virtual machine, and using the first virtual machine to configure a PXE server environment to provide a PXE function;

[0010] Create a second virtual machine, and configure the startup mode of the second virtual machine to start from the network card to be tested;

[0011] The second virtual machine is started, and if a PXE function boot interface is displayed, it is determined that the PXE function of the network card to be tested is normal.

[0012] In some embodiments, the network card to be tested includes a single-port network card to be tested and a dual-port network card to be tested, and the step of installing the network card to be tested on the test server includes:

[0013] If the network card to be tested is a single-port network card to be tested, two of the single-port network cards to be tested are installed on the test server, and the single-port network cards to be tested are directly connected via a network cable;

[0014] If the network card to be tested is a dual-port network card to be tested, then install one of the dual-port network card to be tested to the test server, wherein two network ports on the dual-port network card to be tested are directly connected via a network cable;

[0015] Among them, the two network ports corresponding to the network card to be tested installed in the test server are recorded as a first physical network port and a second physical network port.

[0016] In some embodiments, configuring the PXE server environment using the first virtual machine to provide the PXE function includes:

[0017] Turn off the firewall;

[0018] Enable Dynamic Host Configuration Service, Simple File Transfer Service, and Hypertext Transfer Service;

[0019] Importing and executing a PXE service file to configure a PXE server environment, wherein the PXE service file includes at least a boot file, a kernel file, and a boot menu file;

[0020] The first virtual machine is connected to the network card to be tested based on the first physical network port.

[0021] In some embodiments, configuring the startup mode of the second virtual machine to be started from the network card to be tested includes:

[0022] Modify the basic input and output system of the second virtual machine to a unified scalable mode;

[0023] Deleting the original virtual device in the network card option corresponding to the first virtual machine, and adding the network card to be tested in the network card option based on the second physical network port;

[0024] Add the network card option to be tested in the startup options and delete the original virtual device boot option.

[0025] In some embodiments, the method further comprises:

[0026] Installing a network card firmware management tool in the test server;

[0027] After modifying the firmware register value to disable the PXE function of the network card to be tested, restart the second virtual machine;

[0028] If the PXE function boot interface cannot be displayed, it is determined that the PXE function of the network card switch to be tested is normal.

[0029] In some embodiments, configuring the software environment of the test server includes:

[0030] Installing a Linux operating system and a virtualization management program in the test server;

[0031] After the virtualization management program is installed, attempt to install a test virtual machine;

[0032] If the test virtual machine starts normally, the software environment configuration is successful, otherwise the Linux operating system configuration and the installation package corresponding to the virtualization management program are adjusted until the test virtual machine starts normally.

[0033] In some embodiments, after installing the network card to be tested on the test server, the method further includes:

[0034] Modifying the basic input and output system settings in the test server to ensure that the central processing unit in the test server supports the virtualization function;

[0035] The firmware version of the network card to be tested is refreshed to the version to be tested to avoid the problem that the firmware version does not support the PXE function.

[0036] In a second aspect, the present application provides a network card PXE function test system, the system comprising:

[0037] Installation module, used to install the network card to be tested to the test server;

[0038] A configuration module, used to configure the software environment of the test server to ensure that the test server supports virtual machine applications;

[0039] A processing module, used to create a first virtual machine, and use the first virtual machine to configure a PXE server environment to provide a PXE function;

[0040] The processing module is further used to create a second virtual machine, and configure the startup mode of the second virtual machine to be started from the network card to be tested;

[0041] The analysis module is used to determine that the PXE function of the network card to be tested is normal if a PXE function boot interface is displayed after the second virtual machine is started.

[0042] In a third aspect, the present application provides an electronic device, the electronic device comprising:

[0043] one or more processors;

[0044] and a memory associated with the one or more processors, the memory being used to store program instructions, the program instructions when read and executed by the one or more processors performing the following operations:

[0045] Install the network card to be tested to the test server;

[0046] Configuring the software environment of the test server to ensure that the test server supports virtual machine creation;

[0047] Creating a first virtual machine, and using the first virtual machine to configure a PXE server environment to provide a PXE function;

[0048] Create a second virtual machine, and configure the startup mode of the second virtual machine to start from the network card to be tested;

[0049] The second virtual machine is started, and if a PXE function boot interface is displayed, it is determined that the PXE function of the network card to be tested is normal.

[0050] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program enables a computer to perform the following operations:

[0051] Install the network card to be tested to the test server;

[0052] Configuring the software environment of the test server to ensure that the test server supports virtual machine creation;

[0053] Creating a first virtual machine, and using the first virtual machine to configure a PXE server environment to provide a PXE function;

[0054] Create a second virtual machine, and configure the startup mode of the second virtual machine to start from the network card to be tested;

[0055] The second virtual machine is started, and if a PXE function boot interface is displayed, it is determined that the PXE function of the network card to be tested is normal.

[0056] The beneficial effects achieved by this application are:

[0057] The present application provides a method for testing the PXE function of a network card, including installing the network card to be tested to a test server; configuring the software environment of the test server to ensure that the test server supports the creation of a virtual machine; creating a first virtual machine, and using the first virtual machine to configure the PXE server environment to provide the PXE function; creating a second virtual machine, and configuring the startup mode of the second virtual machine to start from the network card to be tested; starting the second virtual machine, if the PXE function boot interface is displayed, it is determined that the PXE function of the network card to be tested is normal. Through the virtualization function of the test server, two virtual machines are started, one virtual machine provides the PXE service function, and the other virtual machine controls the network card to test the network card's own support for the PXE function; the PXE function test of the network card can be implemented on a test server, and the traditional physical test server can be virtualized, effectively realizing the lightweight test method, and effectively saving material costs and time costs.

[0058] At the same time, the method disclosed in the present application can also isolate the network card PXE function test from the test server itself, making the PXE function test of the network card more pure and avoiding interference from the external environment; further, if a stability test is to be performed, the PXE boot system will be written to the virtual disk, effectively avoiding frequent repartitioning and formatting operations of the physical disk, reducing the loss of the physical disk life, and at the same time, because the virtual device can be initialized quickly, it can effectively reduce the time used for multiple cycles. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work, among which:

[0060] Figure 1 This is a schematic diagram of the network card PXE function test topology provided in an embodiment of the present application;

[0061] Figure 2 It is a schematic diagram of a network card PXE function testing method provided in an embodiment of the present application;

[0062] Figure 3 This is a network card PXE function test system architecture diagram provided in an embodiment of the present application;

[0063] Figure 4It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0065] It should be understood that in the description of the present application, unless the context clearly requires otherwise, words such as "include", "comprises", and the like in the entire specification and claims should be interpreted as inclusive rather than exclusive or exhaustive; that is, the meaning of "including but not limited to".

[0066] It should also be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, "plurality" means two or more.

[0067] It should be noted that the terms "S1", "S2", etc. are only used for the purpose of describing the steps, and do not specifically refer to the order or sequence, nor are they used to limit the present application. They are only for the convenience of describing the method of the present application, and cannot be understood as indicating the order of the steps. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present application.

[0068] Embodiment 1

[0069] The present application embodiment provides a method for testing the PXE function of a network card; specifically, using the method disclosed in this embodiment to test the PXE function of the network card includes:

[0070] S1. Build a hardware test environment and install the network card to be tested on the test server.

[0071] Specifically, when setting up the hardware environment, you must ensure that the test server supports hardware virtualization. Currently, servers generally support hardware virtualization. For CPU (Central Processing Unit) virtualization, some machines’ hardware supports it, but you need to modify the options in the BIOS (Basic Input Output System) to ensure that hardware virtualization is supported, that is, modify the CPU’s VT (Vanderpool, virtualization technology) in the BIOS settings to enabled.

[0072] In addition, affected by the type of network card to be tested, the strategies for building the hardware environment are different. Currently, there are two main types of network cards based on the number of network ports: single-port network card and dual-port network port. The construction strategies are as follows: When a single-port network card is selected as the network card to be tested, two single-port network cards to be tested are installed on the test server. The two single-port network cards to be tested are directly connected through a network cable, and the two network ports are recorded as the first physical network port and the second physical network port; when a dual-port network card is selected as the network card to be tested, only one network port needs to be installed on the test server. The two network ports on the dual-port network card to be tested are directly connected through a network cable. Similarly, the two network ports are recorded as the first physical network port (eth0) and the second physical network port (eth1). After the network card to be tested is installed on the test server, it is also necessary to ensure that the network card to be tested can be normally identified on the link. Therefore, the embodiment of the present application also proposes to refresh the firmware version of the network card to be tested to the version to be tested after the network card to be tested is installed on the server to be tested. The reason is that the PXE function of the network card to be tested is not supported under a specific version or additional settings are required to enable the PXE function of the network card to be tested.

[0073] S2. Configure the software environment of the test server to ensure that a virtual machine can be created in the test server.

[0074] Specifically, the software environment of the test server configured above mainly refers to the software packages required for installing Linux OS (Operating System) and installing KVM (Kernel-based Virtual Machine). KVM refers to a lightweight virtualization management program module, which mainly comes from the Linux kernel. It is an open source system virtualization module that requires hardware support and belongs to full virtualization. In the Linux system, the necessary software is installed through the system's own command yum (yellowdog update manage) tool. The specific commands are as follows: yum install kvmlibvirtpython-virtinst qemu-kvm virt-viewer bridge-utils. After the download is complete, start the relevant services. The specific command is: / etc / init.d / libvirtd start. Copy the complete CentOS8.2 system ISO file to the / root path, where the ISO file is a file system released by the International Organization for Standardization (ISO) for optical disc media, usually referring to an optical disc image file. After that, you can use the virt-manager command in the graphical interface to open the KVM virtual machine management interface and try to install a test virtual machine. Specifically, you can select CentOS8.2.iso under / root as the system image to install, and keep other settings as default. If the test virtual machine created at this time starts normally, continue with the subsequent operations. Otherwise, check whether there are problems in the system configuration files and software packages based on the error information that can be reported, adjust the system configuration files and check the software environment until the test virtual machine can be installed and started normally. The test virtual machine at this time is only used to determine whether the software environment in the test server supports KVM, that is, to ensure that the operating system in the test server can start the virtual machine, and does not participate in the subsequent PXE function test.

[0075] S3. Create a first virtual machine (VMA), and configure a PXE server environment in the first virtual machine to provide a PXE service function.

[0076] After the KVM environment is prepared normally, create the first virtual machine, specify the ISO file required by the operating system, and install it with the default CPU and memory configuration. Before starting the first virtual machine, you need to modify the hardware configuration and configure the network card (NIC, network interface controller) option to eth0:macvtap mode. The specific operation is to select Customize configuration before install before starting the virtual machine, and select Finish to enter the configuration interface before starting the virtual machine. Select the NIC configuration option menu, select the eth0:macvtap option through the following menu, and start the first virtual machine after applying the settings. After starting the first virtual machine, you can see the virtualized network port in the first virtual machine, recorded as the first virtual network port (veth0), which is actually the device virtualized by the first physical network port (veth0), that is, it is connected to the network card to be tested through the first physical network port.

[0077] After the first virtual machine is turned on, a PXE server environment is configured in the first virtual machine to enable the first virtual machine to provide a PXE service function. The specific configuration method mainly includes: 1. Turning off the firewall; 2. Modifying the DHCP (Dynamic Host Configuration Protocol) service configuration file, turning on the dynamic host configuration service, and using the first virtual network port as the dynamic host configuration service network port; 3. Configure the TFTP (Trivial File Transfer Protocol) service configuration file and turn on the simple file transfer service, using the first virtual network port as the simple file transfer service network port; 4. Configure the HTTP (HyperText Transfer Protocol) service configuration file and turn on the hypertext transfer service; 5. Importing PXE service files, including boot files, kernel files, boot menu files, boot image files and other files; wherein, the files required for the PXE function vary according to the operating system. For example, in the embodiment of the present application, CentOS can be extracted. 8.2's bootx64.efi is used as the boot file, grub.cfg is used as the menu file, vmlinuz and initrd.img are used as kernel files, and CentOS8.2.iso is used as the boot image. The embodiment of the present application does not specifically limit the selection of specific boot files, kernel files, boot menu files, etc.

[0078] S4. Create a second virtual machine (VM B), and configure the startup mode of the second virtual machine to start from the network card to be tested.

[0079] When creating a second virtual machine, there is no need to specify an ISO file for booting, but network booting (ie, booting through PXE) is selected, wherein the virtual CPU, memory and hard disk of the second virtual machine can be configured by default. Before starting the second virtual machine, you need to modify the hardware configuration, select Customize configurationbefore install, select the network card option, then delete the virtual device in this device list, and then select Add device, that is, add a PCIE device. The added PCIE device number is the second physical network port number (that is, the added PCIE device is the network card to be tested); save the settings, you can see that a PCIE device (network card to be tested) has been added to the virtual machine device list, and open the Boot Options option to see the newly added PCIE device option for the boot device. Check the PCIE device option and uncheck the virtual device boot option to ensure that the second virtual machine can only be booted and started through the PCIE device (that is, configure the startup method of the second virtual machine to start from the network card to be tested); in addition, you need to change the BIOS type of virtual machine B to UEFI (Unified Extensible Firmware Interface) mode. The above unified extensible mode corresponds to bootx64.efi in the PXE server built by the first virtual machine. Only in this mode can the boot be completed normally. After the configuration is completed, it will be formed Figure 1 Topology shown.

[0080] S5. Start the second virtual machine. If a PXE function boot interface is displayed, it is determined that the PXE function of the network card to be tested is normal.

[0081] Specifically, after the configuration of the second virtual machine is completed, the second virtual machine is started. If the PXE function boot interface can be displayed, and then the system installation interface is entered, it can be determined that the PXE function of the network card to be tested is normal. Further, in order to detect the effectiveness of the PXE function test, the embodiment of the present application also proposes to install a network card firmware management tool in the test server operating system, and modify the value of the firmware register through the network card firmware management tool so that the PXE function of the unified scalable mode of the network card to be tested is turned off, and then the second virtual machine is restarted. At this time, if it is displayed that the boot device cannot be found, it can be determined that the network card to be tested can normally turn off the PXE function, and further verify that the switch PXE function of the network card to be tested is effective.

[0082] In addition, in order to facilitate the testing of the stability of the PXE function of the network card, the embodiment of the present application also proposes that a KS (kickstart)) automatic response file can be created to realize the automatic installation of the PXE boot system, and automatically restart the second virtual machine after the system is successfully installed to realize the cyclic testing of the PXE function of the network card to verify the stability of the PXE function of the network card. Among them, the PXE boot system will be written into the virtual disk, which effectively avoids the frequent repartitioning and formatting operations of the physical disk, reduces the loss of the life of the physical disk, and at the same time, because the virtual device can be initialized quickly, it can effectively reduce the time used for multiple cycles. Among them, Kickstart is one of the unattended installation methods, and its working principle is to record various parameters filled in by manual intervention during the installation process and generate a file named ks.cfg; if there is a situation where parameters need to be filled in during the automatic installation process, the installation program will first search for the ks.cfg file, and if the appropriate parameters are found, the parameters found will be adopted; if not found, a dialog box will pop up to let the installer write manually; therefore, the KS automatic response file covers all the parameters that need to be filled in during the installation process, and can be used to realize the automatic installation of the PXE boot system.

[0083] Embodiment 2

[0084] Corresponding to the above-mentioned embodiment 1, the embodiment of the present application also provides a network card PXE function testing method, such as Figure 2 As shown, specifically including:

[0085] 2100. Install the network card to be tested to the test server;

[0086] Preferably, the network card to be tested includes a single-port network card to be tested and a dual-port network card to be tested, and the step of installing the network card to be tested on the test server includes:

[0087] 2110. If the network card to be tested is a single-port network card to be tested, two of the single-port network cards to be tested are installed on the test server, and the single-port network cards to be tested are directly connected via a network cable;

[0088] 2120. If the network card to be tested is a dual-port network card to be tested, install one of the dual-port network card to be tested to the test server, wherein two network ports on the dual-port network card to be tested are directly connected via a network cable;

[0089] Among them, the two network ports corresponding to the network card to be tested installed in the test server are recorded as a first physical network port and a second physical network port.

[0090] Preferably, after installing the network card to be tested on the test server, the method further includes:

[0091] 2130. Modify the basic input and output system settings in the test server to ensure that the central processing unit in the test server supports the virtualization function;

[0092] 2140. Refresh the firmware version of the network card to be tested to the version to be tested to avoid the problem that the firmware version does not support the PXE function.

[0093] 2200. Configuring the software environment of the test server to ensure that the test server supports virtual machine creation;

[0094] Preferably, the software environment of configuring the test server includes:

[0095] 2210. Installing a Linux operating system and a virtualization management program in the test server;

[0096] 2220. After the virtualization management program is installed, attempt to install a test virtual machine;

[0097] 2230. If the test virtual machine starts normally, the software environment configuration is successful. Otherwise, adjust the Linux operating system configuration and the installation package corresponding to the virtualization management program until the test virtual machine starts normally.

[0098] 2300. Create a first virtual machine, and use the first virtual machine to configure a PXE server environment to provide a PXE function;

[0099] Preferably, configuring a PXE server environment using the first virtual machine to provide a PXE function includes:

[0100] 2310. Turn off the firewall;

[0101] 2320. Enable Dynamic Host Configuration Service, Simple File Transfer Service, and Hypertext Transfer Service;

[0102] 2330. Import and execute a PXE service file to configure a PXE server environment, wherein the PXE service file includes at least a boot file, a kernel file, and a boot menu file;

[0103] The first virtual machine is connected to the network card to be tested based on the first physical network port.

[0104] 2400. Create a second virtual machine, and configure a startup mode of the second virtual machine to be started from the network card to be tested;

[0105] Preferably, the configuration of starting the second virtual machine from the network card to be tested includes:

[0106] 2410. Modify the basic input and output system of the second virtual machine to a unified scalable mode;

[0107] 2420. Delete the original virtual device in the network card option corresponding to the first virtual machine, and add the network card to be tested in the network card option based on the second physical network port;

[0108] 2430. Add the network card option to be tested in the startup options and delete the original virtual device boot option.

[0109] 2500. Start the second virtual machine. If a PXE function boot interface is displayed, it is determined that the PXE function of the network card to be tested is normal.

[0110] Preferably, the method further comprises:

[0111] 2510. Install a network card firmware management tool in the test server;

[0112] 2520. After modifying the firmware register value to disable the PXE function of the network card to be tested, restart the second virtual machine;

[0113] 2530. If the PXE function boot interface cannot be displayed, it is determined that the PXE function of the network card switch to be tested is normal.

[0114] Embodiment 3

[0115] like Figure 3 As shown, corresponding to the above-mentioned embodiment 1 and embodiment 2, the embodiment of the present application provides a network card PXE function test system, the system comprising:

[0116] An installation module 310 is used to install the network card to be tested to the test server;

[0117] A configuration module 320, configured to configure the software environment of the test server to ensure that the test server supports virtual machine applications;

[0118] The processing module 330 is used to create a first virtual machine, and use the first virtual machine to configure a PXE server environment to provide a PXE function;

[0119] The processing module 330 is further used to create a second virtual machine, and configure the startup mode of the second virtual machine to be started from the network card to be tested;

[0120] The analysis module 340 is used to determine that the PXE function of the network card to be tested is normal if a PXE function boot interface is displayed after the second virtual machine is started.

[0121] In some embodiments, the installation module 310 is also used to install two of the single-port network cards to be tested to the test server when the network card to be tested is a single-port network card to be tested, and the single-port network cards to be tested are directly connected via a network cable; the installation module 310 is also used to install one of the dual-port network cards to be tested to the test server when the network card to be tested is a dual-port network card to be tested, and the two network ports on the dual-port network card to be tested are directly connected via a network cable; wherein, the two network ports corresponding to the network card to be tested installed in the test server are recorded as a first physical network port and a second physical network port.

[0122] In some embodiments, the processing module 330 is also used to turn off the firewall; turn on the dynamic host configuration service, simple file transfer service and hypertext transfer service; import and execute the PXE service file to configure the PXE server environment, and the PXE service file includes at least a boot file, a kernel file, and a boot menu file; wherein the first virtual machine is connected to the network card to be tested based on the first physical network port.

[0123] In some embodiments, the processing module 330 is also used to modify the basic input and output system of the second virtual machine to a unified scalable mode; the processing module 330 is also used to delete the original virtual device in the network card option corresponding to the first virtual machine, and add the network card to be tested in the network card option based on the second physical network port; the processing module 330 is also used to add the network card option to be tested in the startup option and delete the original virtual device boot option.

[0124] In some embodiments, the analysis module 340 is also used to modify the firmware register value using the network card firmware management tool installed in the test server to turn off the PXE function of the network card to be tested, and restart the second virtual machine after turning it off; the analysis module 340 is also used to determine that the PXE function of the network card to be tested switch is normal when the PXE function boot interface cannot be displayed.

[0125] In some embodiments, the configuration module 320 is also used to install a Linux operating system and a virtualization hypervisor in the test server; after the virtualization hypervisor is installed, the configuration module 320 is also used to attempt to install a test virtual machine; if the test virtual machine starts normally, the software environment configuration is successful, otherwise the configuration module 320 is also used to adjust the Linux operating system configuration and the installation package corresponding to the virtualization hypervisor until the test virtual machine starts normally.

[0126] In some embodiments, the installation module 310 is also used to modify the basic input and output system settings in the test server to ensure that the central processing unit in the test server supports virtualization functions; the installation module 310 is also used to refresh the firmware version of the network card to be tested to the version to be tested to avoid the problem that the firmware version does not support the PXE function.

[0127] Embodiment 4

[0128] Corresponding to all the above embodiments, an embodiment of the present application provides an electronic device, including:

[0129] One or more processors; and a memory associated with the one or more processors, the memory being used to store program instructions, the program instructions when read and executed by the one or more processors, performing the following steps:

[0130] Step A: Install the network card to be tested on the test server;

[0131] Step B: configuring the software environment of the test server to ensure that the test server supports virtual machine creation;

[0132] Step C: creating a first virtual machine, and using the first virtual machine to configure a PXE server environment to provide a PXE function;

[0133] Step D: creating a second virtual machine, and configuring the startup mode of the second virtual machine to be started from the network card to be tested;

[0134] The second virtual machine is started, and if a PXE function boot interface is displayed, it is determined that the PXE function of the network card to be tested is normal.

[0135] in, Figure 4 The architecture of the electronic device is exemplarily shown, which may include a processor 410, a video display adapter 411, a disk drive 412, an input / output interface 413, a network interface 414, and a memory 420. The processor 410, the video display adapter 411, the disk drive 412, the input / output interface 413, the network interface 414, and the memory 420 may be communicatively connected via a bus 430.

[0136] Among them, the processor 410 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solution provided in this application.

[0137] The memory 420 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static terminal device, dynamic terminal device, etc. The memory 420 can store an operating system 421 for controlling the execution of the electronic device 400, and a basic input and output system (BIOS) 422 for controlling the low-level operations of the electronic device 400. In addition, a web browser 423, a data storage management system 424, and an icon font processing system 424, etc. can also be stored. The above-mentioned icon font processing system 424 can be an application program that specifically implements the operations of the aforementioned steps in the embodiment of the present application. In short, when the technical solution provided in the present application is implemented by software or firmware, the relevant program code is stored in the memory 420 and is called and executed by the processor 410.

[0138] The input / output interface 413 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0139] The network interface 414 is used to connect to a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0140] The bus 430 comprises a pathway for transmitting information between the various components of the device (eg, the processor 410, the video display adapter 411, the disk drive 412, the input / output interface 413, the network interface 414, and the memory 420).

[0141] In addition, the electronic device 400 can also obtain information on specific collection conditions from the virtual resource object collection condition information database for use in condition judgment, etc.

[0142] It should be noted that, although the above device only shows a processor 410, a video display adapter 411, a disk drive 412, an input / output interface 413, a network interface 414, a memory 420, a bus 430, etc., in the specific implementation process, the device may also include other components necessary for normal execution. In addition, it can be understood by those skilled in the art that the above device may also only include components necessary for implementing the solution of the present application, and does not necessarily include all the components shown in the figure.

[0143] Embodiment 6

[0144] Corresponding to all the above embodiments, the embodiments of the present application further provide a computer-readable storage medium, characterized in that it stores a computer program, and the computer program enables the computer to operate as follows:

[0145] Install the network card to be tested to the test server;

[0146] Configuring the software environment of the test server to ensure that the test server supports virtual machine creation;

[0147] Creating a first virtual machine, and using the first virtual machine to configure a PXE server environment to provide a PXE function;

[0148] Create a second virtual machine, and configure the startup mode of the second virtual machine to start from the network card to be tested;

[0149] The second virtual machine is started, and if a PXE function boot interface is displayed, it is determined that the PXE function of the network card to be tested is normal.

[0150] It can be seen from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., including several instructions for enabling a computer device (which can be a personal computer, a cloud service end, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.

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

[0152] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A network card PXE function test method, characterized in that: The method comprises: Install the network card to be tested to the test server, where the two network ports corresponding to the network card to be tested are respectively recorded as the first physical network port and the second physical network port; Modifying basic input and output system settings in the test server to ensure that the central processing unit in the test server supports virtualization function; Refresh the firmware version of the network card to be tested to the version to be tested to avoid the firmware version not supporting the PXE function; Configuring the software environment of the test server to ensure that the test server supports virtual machine creation; Creating a first virtual machine, and using the first virtual machine to configure a PXE server environment to provide a PXE function, wherein the first virtual machine is connected to the network card to be tested based on the first physical network port; Create a second virtual machine, select network boot, and modify the basic input and output system of the second virtual machine to a unified scalable mode; Deleting the original virtual device in the network card option corresponding to the first virtual machine, and adding the network card to be tested in the network card option based on the second physical network port; Add the network card option to be tested in the startup options and delete the original virtual device boot option; and configuring the startup mode of the second virtual machine to be started from the network card to be tested; Starting the second virtual machine; If the PXE function boot interface is displayed, it is determined that the PXE function of the network card to be tested is normal; Installing a network card firmware management tool in the test server; Modify the firmware register value to disable the PXE function of the network card to be tested, and restart the second virtual machine; If the PXE function boot interface cannot be displayed, it is determined that the PXE function of the network card to be tested is normal; The PXE is a pre-boot execution environment.

2. The method according to claim 1, characterized in that: The network card to be tested includes a single-port network card to be tested and a dual-port network card to be tested. The step of installing the network card to be tested on the test server includes: If the network card to be tested is a single-port network card to be tested, two of the single-port network cards to be tested are installed on the test server, and the single-port network cards to be tested are directly connected via a network cable; If the network card to be tested is a dual-port network card to be tested, then one of the dual-port network cards to be tested is installed on the test server, wherein two network ports on the dual-port network card to be tested are directly connected via a network cable.

3. The method according to claim 2, characterized in that The using the first virtual machine to configure the PXE server environment to provide the PXE function includes: Turn off the firewall; Enable Dynamic Host Configuration Service, Simple File Transfer Service, and Hypertext Transfer Service; Import and execute the PXE service file to configure the PXE server environment, wherein the PXE service file at least includes a boot file, a kernel file, and a boot menu file.

4. The method according to claim 1, characterized in that: The software environment of the test server is configured, including: Installing a Linux operating system and a virtualization management program in the test server; After the virtualization management program is installed, attempt to install a test virtual machine; If the test virtual machine starts normally, the software environment configuration is successful, otherwise the Linux operating system configuration and the installation package corresponding to the virtualization management program are adjusted until the test virtual machine starts normally.

5. A network card PXE function test system implementing claim 1, characterized in that: The system comprises: Installation module, used to install the network card to be tested to the test server; A configuration module, used to configure the software environment of the test server to ensure that the test server supports virtual machine applications; A processing module, configured to create a first virtual machine, and use the first virtual machine to configure a PXE server environment to provide a PXE function; The processing module is further used to create a second virtual machine, and configure the startup mode of the second virtual machine to be started from the network card to be tested; The analysis module is used to determine that the PXE function of the network card to be tested is normal if a PXE function boot interface is displayed after the second virtual machine is started.

6. An electronic device, characterized in that: The electronic device comprises: one or more processors; And a memory associated with the one or more processors, the memory is used to store program instructions, and when the program instructions are read and executed by the one or more processors, the method according to any one of claims 1-4 is executed.

7. A computer-readable storage medium, characterized in that: The computer program stores a computer program, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Container-based network card pressure test method and device

    CN113886153A