CN115589379A - Network card PXE function test method, system, electronic device and storage medium - Google Patents

Network card PXE function test method, system, electronic device and storage medium Download PDF

Info

Publication number
CN115589379A
CN115589379A CN202211273968.2A CN202211273968A CN115589379A CN 115589379 A CN115589379 A CN 115589379A CN 202211273968 A CN202211273968 A CN 202211273968A CN 115589379 A CN115589379 A CN 115589379A
Authority
CN
China
Prior art keywords
network card
tested
virtual machine
pxe
function
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211273968.2A
Other languages
Chinese (zh)
Inventor
高杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202211273968.2A priority Critical patent/CN115589379A/en
Publication of CN115589379A publication Critical patent/CN115589379A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a PXE function test method, a PXE function test system, electronic equipment and a storage medium for a network card, wherein the method comprises the steps of installing the network card to be tested to a test server; configuring a software environment of a test server to ensure that the test server supports virtual machine creation; creating a first virtual machine, and configuring a PXE server environment by using the first virtual machine to provide a PXE function; creating a second virtual machine, and configuring the starting mode of the second virtual machine to be starting from the network card to be tested; and starting the second virtual machine, and if a PXE function guide interface is displayed, judging that the function of the PXE of the network card to be tested is normal. The method comprises the steps that a traditional test server is virtualized, two virtual machines are started, one virtual machine provides a PXE service function, the other virtual machine controls a network card, and the test network card supports the PXE function; the PXE function test of the network card can be realized on one test server, the light weight of the test method is effectively realized, and the material cost and the time cost are effectively saved.

Description

Network card PXE function test method, system, electronic device and storage medium
Technical Field
The invention relates to the field of intelligent network card testing, in particular to a server testing preparation method, a server testing preparation system, electronic equipment and a storage medium.
Background
The Preboot execution environment (PXE) provides a way to start a computer through a network interface, and the protocol is divided into a client and a server. With the continuous development and improvement of the PXE protocol, the PXE protocol is more and more commonly supported by network cards of many brands, and consequently, the PXE function of the smart network card is also widely applied in the field of servers. The network card with the PXE function can support batch filling systems in server clusters and diskless boot starting, and has important significance for deployment of large-batch test environments and production environments for the servers, so that the support condition of the intelligent network card to the PXE function is a key item considered when the network card is selected and components are introduced into the servers.
In the existing test method for the PXE function of the network card, for example, in patent CN113746694A, a network of a tester and a to-be-tested machine is deployed, the tester and a specified to-be-tested machine cooperate to circularly execute a PXE boot test, and a file installation system is automatically responded by KS in a boot mode process, so that the network configuration of the network card and the PXE function stability are verified. A server (referred to as a PXE server for short) capable of providing a PXE service function needs to be specially deployed, the PXE server needs to start a DHCP (Dynamic Host Configuration Protocol) service and a TFTP (simple file transfer Protocol) service, and further files and environments needed for PXE boot need to be deployed, and the Configuration process is complex; meanwhile, after the network card to be tested is installed on the test server, the network card to be tested needs to be connected to the local area network of the PXE server, and the installation and deployment of the network card to be tested are inconvenient for a test environment with multiple local area networks.
Therefore, a method for testing the PXE function of the network card, which can improve the testing efficiency and reduce the cost, is needed to solve the above technical problems in the prior art.
Disclosure of Invention
In order to solve the defects of the prior art, the present invention provides a method, a system, an electronic device and a storage medium for testing a PXE function of a network card, so as to solve the above technical problems of the prior art.
In order to achieve the above object, a first aspect of the present invention provides a method for testing a PXE function of a network card, where the method includes:
installing a network card to be tested to a test server;
configuring a software environment of the test server to ensure that the test server supports virtual machine creation;
creating a first virtual machine, and configuring a PXE server environment by using the first virtual machine to provide a PXE function;
creating a second virtual machine, and configuring the starting mode of the second virtual machine to be starting from a network card to be tested;
and starting the second virtual machine, and if a PXE function guide interface is displayed, judging that the PXE function of the network card to be tested is normal.
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 mounting the network card to be tested to the test server includes:
if the network card to be tested is a single-port network card to be tested, installing two single-port network cards to be tested to the test server, and directly connecting the single-port network cards to be tested through a network cable;
if the network card to be tested is a double-port network card to be tested, installing one double-port network card to be tested to the test server, wherein two network ports on the double-port network card to be tested are directly connected through a network cable;
and recording two network ports corresponding to the network card to be tested installed in the test server as a first physical network port and a second physical network port.
In some embodiments, configuring a PXE server environment with the first virtual machine to provide PXE functionality includes:
closing the firewall;
starting a dynamic host configuration service, a simple file transmission service and a hypertext transmission service;
importing and executing a PXE service file to configure a PXE service end environment, wherein the PXE service file at least comprises a boot file, a kernel file and a boot menu file;
and the first virtual machine is connected to the network card to be tested based on the first physical network port.
In some embodiments, the configuring the starting mode of the second virtual machine is starting from a network card to be tested, and includes:
modifying a basic input and output system of the second virtual machine into a unified extensible mode;
deleting original virtual equipment 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 interface;
and adding a network card option to be tested in the starting option and deleting the original virtual equipment guiding option.
In some embodiments, the method further comprises:
installing a network card firmware management tool in the test server;
after the firmware register value is modified to close the PXE function of the network card to be tested, restarting a second virtual machine;
and if the PXE function boot interface cannot be displayed, judging that the function of the network card switch to be tested PXE is normal.
In some embodiments, said configuring the software environment of the test server comprises:
installing a Linux operating system and a virtualization management program in the test server;
after the virtualization management program is installed, trying to install a test virtual machine;
and if the test virtual machine is normally started, 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 is normally started.
In some embodiments, after the installing the network card to be tested to the test server, the method further includes:
modifying the basic input and output system setting in the test server to ensure that a central processing unit in the test server supports a virtualization function;
and refreshing the firmware version of the network card to be tested as the version to be tested so as to avoid the problem that the firmware version does not support the PXE function.
In a second aspect, the present application provides a network card PXE function test system, where the system includes:
the mounting module is used for mounting the network card to be tested to the test server;
a configuration module for configuring a software environment of the test server to ensure that the test server supports virtual machine applications;
the system comprises a processing module, a PXE server environment and a PXE server function, wherein the processing module is used for creating a first virtual machine and configuring the PXE server environment by using the first virtual machine to provide the PXE function;
the processing module is further used for creating a second virtual machine and configuring the starting mode of the second virtual machine to be starting from the network card to be tested;
and the analysis module is used for judging that the PXE function of the network card to be tested is normal if a PXE function guide interface is displayed after the second virtual machine is started.
In a third aspect, the present application provides an electronic device, comprising:
one or more processors;
and memory associated with the one or more processors for storing program instructions that, when read and executed by the one or more processors, perform operations comprising:
installing a network card to be tested to a test server;
configuring a software environment of the test server to ensure that the test server supports virtual machine creation;
creating a first virtual machine, and configuring a PXE server environment by using the first virtual machine to provide PXE functions;
creating a second virtual machine, and configuring the starting mode of the second virtual machine to be starting from a network card to be tested;
and starting the second virtual machine, and if a PXE function guide interface is displayed, judging that the PXE function of the network card to be tested is normal.
In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, the computer program causing a computer to perform the following operations:
installing a network card to be tested to a test server;
configuring a software environment of the test server to ensure that the test server supports virtual machine creation;
creating a first virtual machine, and configuring a PXE server environment by using the first virtual machine to provide PXE functions;
creating a second virtual machine, and configuring the starting mode of the second virtual machine to be starting from a network card to be tested;
and starting the second virtual machine, and if a PXE function guide interface is displayed, judging that the PXE function of the network card to be tested is normal.
The beneficial effect that this application realized does:
the application provides a PXE function test method of a network card, which comprises the steps of installing the network card to be tested to a test server; configuring a software environment of the test server to ensure that the test server supports virtual machine creation; creating a first virtual machine, and configuring a PXE server environment by using the first virtual machine to provide PXE functions; creating a second virtual machine, and configuring the starting mode of the second virtual machine to be starting from a network card to be tested; and starting the second virtual machine, and if a PXE function boot interface is displayed, judging that the function of the PXE of the network card to be tested is normal. Starting two virtual machines through the virtualization function of the test server to realize that one virtual machine provides a PXE service function, and the other virtual machine controls a network card to test the support of the network card to the PXE function; the PXE function test of the network card can be realized on one test server, the traditional entity test server is virtualized, the test method is light in weight effectively, and the material cost and the time cost are effectively saved.
Meanwhile, the method disclosed by the application can also realize the isolation of the PXE function test of the network card and the test server, so that the PXE function test of the network card is purer, and the interference of the external environment is avoided; furthermore, if a stability test is required, the PXE boot system can be written into the virtual disk, so that frequent re-partition and formatting operations of the physical disk are effectively avoided, the loss of the service life of the physical disk is reduced, and meanwhile, the virtual device can be initialized quickly, so that the time for multiple cycles can be effectively reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without inventive efforts, wherein:
fig. 1 is a schematic diagram of a PXE function test topology provided in the embodiment of the present application;
fig. 2 is a schematic diagram illustrating a PXE function testing method for a network card according to an embodiment of the present disclosure;
fig. 3 is a block diagram of a PXE function test system of the network card according to the embodiment of the present disclosure;
fig. 4 is a structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
It should be understood that throughout the description of this application, unless the context clearly requires otherwise, the words "comprise", "comprising", and the like, in the specification and claims are to be interpreted in an inclusive sense rather than in an exclusive or exhaustive sense; that is, what is meant is "including, but not limited to".
It will be further understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In addition, in the description of the present application, "a plurality" means two or more unless otherwise specified.
It should be noted that the terms "S1", "S2", etc. are used for descriptive purposes only, are not intended to refer specifically to an order or sequential meaning, nor are they intended to limit the present application, but are merely used for convenience in describing the method of the present application and are not to be construed as indicating the order of the steps. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present application.
Example one
The embodiment of the application provides a PXE function test method for a network card; specifically, the testing of the PXE function of the network card by using the method disclosed in this embodiment includes:
s1, building a hardware test environment, and installing the network card to be tested to a test server.
Specifically, when a hardware environment is built, it is required to ensure that a test server supports a hardware virtualization function, and at present, the server generally supports the hardware virtualization function, where for virtualization of a CPU (Central Processing Unit), some machines support hardware themselves, but options in a BIOS (Basic Input Output System) need to be modified to ensure that hardware virtualization can be supported, that is, VT (vandeool, virtualization technology) of the CPU in the BIOS setting is enabled (feasible).
In addition, influenced by the type of the network card to be tested, the strategy is different when the hardware environment is built, and at present, two kinds of network cards are mainly distinguished according to the number of network ports: the single-port network card and the double-port network interface have the following establishing strategies respectively: when a single-port network card is selected as a network card to be tested, a test server is provided with two single-port network cards to be tested, the two single-port network cards to be tested are directly connected through a network cable, and the two network ports are marked as a first physical network port and a second physical network port; when the dual-port network card is selected as the network card to be tested, only one test server needs to be installed, two network ports on the dual-port network card to be tested are directly connected through a network cable, and similarly, the two network ports are respectively marked as a first physical network port (eth 0) and a second physical network port (eth 1). After the network card to be tested is installed in the test server, it is further necessary to ensure that the network card to be tested can be normally identified on the link, so that the embodiment of the present application further proposes that the firmware version of the network card to be tested is refreshed when the network card to be tested is installed in the test server, where the firmware version is the version to be tested, because the PXE function of the network card to be tested is not supported in a specific version or needs to be additionally set to open the PXE function of the network card to be tested.
S2, configuring a software environment of the test server to ensure that a virtual machine can be created in the test server.
Specifically, the software environment configuring the test server mainly refers to a software package required for installing a Linux OS (Operating System) and installing a KVM (Kernel-based virtual Machine). The KVM is a lightweight virtualization management program module, mainly from a Linux kernel, is an open-source system virtualization module, needs hardware support, and belongs to full virtualization. Installing necessary software in a Linux system through a system self-contained command yum (yellowdog update management) tool, wherein the specific commands are as follows: yum install kvm libvirtpython-virtinst qemu-kvm virt-viewer bridge-utils. After downloading is completed, relevant services are started, and the specific command is as follows: d/libvirtual start. The complete Centos8.2 system ISO file is copied to/root path, wherein the ISO file is a file system issued by the International Organization for Standardization (ISO) for optical disc media, and is usually referred to as an optical disc image file. Then, a virtual machine management interface of the KVM can be opened through a virt-manager command in the imaging interface, the test virtual machine is tried to be installed, specifically CentOS8.2.Iso under root can be selected/installed as a system mirror image, and other settings are defaults; if the created test virtual machine is started normally, continuing the subsequent operation, otherwise, checking whether the system configuration file and the software package have problems according to the error information which can be reported, adjusting the system configuration file and checking the software environment until the test virtual machine can be normally installed and started; at this time, the test virtual machine is only used to determine whether the software environment in the test server supports KVM, i.e. it is ensured that the operating system in the test server can start the virtual machine and does not participate in the subsequent PXE function test.
S3, creating a first Virtual Machine (VMA), and configuring a PXE service end environment in the first VMA to enable the first VMA to provide a PXE service function.
After the KVM environment is prepared normally, a first virtual machine is created, and the first virtual machine is installed with default CPU and memory configuration through an ISO file required by a specified operating system. Before a first virtual machine is started, hardware configuration needs to be modified, a Network Interface Controller (NIC) option is configured to be an eth0: macvtap mode, and the method specifically operates to select a custom configuration before starting the virtual machine, and select Finish to enter a configuration interface before starting the virtual machine. And selecting a configuration option menu of the NIC, selecting an eth0 option through the following menu, namely a macvtap option, and starting the first virtual machine after setting the application. After the first virtual machine is started, the virtualized port in the first virtual machine can be seen, which is marked as a first virtual port (veth 0), and the virtualized port is actually a device virtualized by a first physical port (veth 0), that is, the virtualized port is connected with the network card to be tested through the first physical port.
After a first virtual machine is started, a PXE service end environment is configured in the first virtual machine so that the first virtual machine can provide a PXE service function, and the specific configuration method mainly comprises the following steps: 1. closing the firewall; 2. modifying a DHCP (Dynamic Host Configuration Protocol) service Configuration file, starting a Dynamic Host Configuration service, and taking a first virtual network interface as a Dynamic Host Configuration service network interface; 3. configuring a TFTP (simple File transfer protocol) service configuration File and starting a simple File transfer service, wherein a first virtual network port is used as a simple File transfer service network port; 4. configuring an HTTP (Hypertext Transfer Protocol) service configuration file and starting a HyperText Transfer service; 5. importing PXE service files including a boot file, a kernel file, a boot menu file, a boot image file and the like; for example, in the embodiment of the present application, bootx64.Efi of CentOS8.2 may be extracted as a boot file, grub.cfg as a menu file, vmlinux and initrd.img as a kernel file, and CentOS8.2.Iso as a boot image.
And S4, creating a second virtual machine (VM B), and configuring the starting mode of the second virtual machine to be starting from the network card to be tested.
And creating a second virtual machine, and selecting network boot (namely PXE boot) without specifying an ISO file for booting, wherein a virtual CPU, a memory and a hard disk of the second virtual machine can be configured according to default. Before starting the second virtual machine, the hardware configuration needs to be modified, a custom configuration before instance option is selected, a network card option is selected, then the virtual devices in the device list are deleted, then additional devices are selected, namely PCIE devices are added, and the number of the added PCIE devices is the number of the second physical network port before the first virtual machine is started (namely, the added PCIE devices are the network cards to be tested); storing the settings, namely, adding a PCIE device (network card to be tested) in the virtual machine device list, opening the Boot Options to see a PCIE device option added to the Boot device, checking the PCIE device option, and checking out the virtual device Boot option therein, so as to ensure that the second virtual machine can only be booted through the PCIE device (that is, configuring a Boot mode of the second virtual machine to be booted from the network card to be tested); in addition, the BIOS type of the virtual machine B needs to be modified to be UEFI (Unified Extensible Firmware Interface) mode, the Unified Extensible mode corresponds to bootx64.Efi in the PXE server constructed by the first virtual machine, and the booting can be normally completed only in this mode. The topology shown in fig. 1 is formed after the configuration is completed.
And S5, starting the second virtual machine, and if a PXE function boot interface is displayed, judging that the PXE function of the network card to be tested is normal.
Specifically, after the configuration of the second virtual machine is completed, the second virtual machine is started, and if a PXE function boot interface can be displayed, and then a 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 validity of the PXE function test, the embodiment of the present application further provides that a network card firmware (firmware) management tool is installed in the test server operating system, the value of the firmware register is modified by the network card firmware management tool, so that the PXE function of the unified extensible mode of the network card to be tested is turned off, then the second virtual machine is restarted, if 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 the PXE function of the network card switch to be tested is further verified to be valid.
In addition, in order to facilitate testing of the stability of the network card PXE function, the embodiment of the present application further provides that a KS (kick start)) automatic response file may be created to implement automatic installation of the PXE boot system, and the second virtual machine is automatically restarted after the system is successfully installed to implement circular testing of the network card PXE function, so as to verify the stability of the network card PXE function. The PXE boot system can be written into the virtual disk, so that frequent re-partition and formatting operation of the physical disk is effectively avoided, the loss of the service life of the physical disk is reduced, and meanwhile, the virtual device can be quickly initialized, so that the time for multiple cycles can be effectively reduced. The Kickstart is one of unattended installation modes, and the operating principle of the Kickstart is that various parameters filled by manual intervention are recorded in the installation process, and a file named ks.cfg is generated; if the parameter needs to be filled in the automatic installation process, the installation program firstly searches the ks.cfg file, and if the proper parameter is found, the found parameter is adopted; if not, popping up a dialog box to allow the installation to start manual writing; therefore, the KS auto-answer file covers all parameters needing to be filled in the installation process, and the KS auto-answer file can be used for realizing the automatic installation of the PXE boot system.
Example two
Corresponding to the first embodiment, an embodiment of the present application further provides a method for testing a PXE function of a network card, as shown in fig. 2, specifically including:
2100. installing a network card to be tested to a test server;
preferably, the network card to be tested includes a single-port network card to be tested and a double-port network card to be tested, the installation of the network card to be tested to the test server includes:
2110. if the network card to be tested is a single-port network card to be tested, installing two single-port network cards to be tested to the test server, and directly connecting the single-port network cards to be tested through a network cable;
2120. if the network card to be tested is a double-port network card to be tested, installing one double-port network card to be tested to the test server, wherein two network ports on the double-port network card to be tested are directly connected through a network cable;
and recording two network ports corresponding to the network card to be tested in the test server as a first physical network port and a second physical network port.
Preferably, after the network card to be tested is installed in the test server, the method further includes:
2130. modifying the basic input and output system setting in the test server to ensure that a central processing unit in the test server supports a virtualization function;
2140. and refreshing the firmware version of the network card to be tested into the version to be tested so as to avoid the problem that the firmware version does not support the PXE function.
2200. Configuring a software environment of the test server to ensure that the test server supports virtual machine creation;
preferably, the configuring the software environment of the test server includes:
2210. installing a Linux operating system and a virtualization management program in the test server;
2220. after the virtualization management program is installed, trying to install a test virtual machine;
2230. and if the test virtual machine is normally started, 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 is normally started.
2300. Creating a first virtual machine, and configuring a PXE server environment by using the first virtual machine to provide PXE functions;
preferably, the configuring, by using the first virtual machine, the PXE server environment to provide the PXE function includes:
2310. closing the firewall;
2320. starting a dynamic host configuration service, a simple file transmission service and a hypertext transmission service;
2330. importing and executing a PXE service file to configure a PXE service end environment, wherein the PXE service file at least comprises a boot file, a kernel file and a boot menu file;
and the first virtual machine is connected to the network card to be tested based on the first physical network port.
2400. Creating a second virtual machine, and configuring the starting mode of the second virtual machine to be starting from a network card to be tested;
preferably, the configuring the starting mode of the second virtual machine is starting from a network card to be tested, and includes:
2410. modifying a basic input and output system of the second virtual machine into a unified extensible mode;
2420. deleting original virtual equipment 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 interface;
2430. and adding a network card option to be tested in the starting option and deleting the original virtual equipment guiding option.
2500. And starting the second virtual machine, and if a PXE function guide interface is displayed, judging that the PXE function of the network card to be tested is normal.
Preferably, the method further comprises:
2510. installing a network card firmware management tool in the test server;
2520. after the firmware register value is modified to close the PXE function of the network card to be tested, restarting a second virtual machine;
2530. and if the PXE function boot interface cannot be displayed, judging that the function of the network card switch to be tested PXE is normal.
EXAMPLE III
As shown in fig. 3, corresponding to the first embodiment and the second embodiment, an embodiment of the present application provides a network card PXE function testing system, where the system includes:
the installation module 310 is used for installing the network card to be tested to the test server;
a configuration module 320 configured to configure the software environment of the test server to ensure that the test server supports virtual machine applications;
the processing module 330 is configured to create a first virtual machine, and configure a PXE server environment with the first virtual machine to provide a PXE function;
the processing module 330 is further configured to create a second virtual machine, and configure a starting manner of the second virtual machine to be started from the network card to be tested;
the analysis module 340 is configured 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.
In some embodiments, the installing module 310 is further configured to install two 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, where the single-port network cards to be tested are directly connected through a network cable; the installing module 310 is further configured to install one dual-port network card to be tested to the test server when the network card to be tested is a dual-port network card to be tested, where two ports on the dual-port network card to be tested are directly connected through a network cable; and recording two network ports corresponding to the network card to be tested installed in the test server as a first physical network port and a second physical network port.
In some embodiments, the processing module 330 is further configured to close a firewall; starting a dynamic host configuration service, a simple file transmission service and a hypertext transmission service; importing and executing a PXE service file to configure a PXE server environment, wherein the PXE service file at least comprises a boot file, a kernel file and a boot menu file; and the first virtual machine is connected to the network card to be tested based on the first physical network port.
In some embodiments, the processing module 330 is further configured to modify the bios of the second virtual machine to a unified extensible mode; the processing module 330 is further configured to delete an original virtual device in a 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 further configured to add a to-be-tested network card option to the start options and delete the original virtual device boot option.
In some embodiments, the analysis module 340 is further configured to modify a firmware register value by using a firmware management tool for installing a network card in the test server to close the PXE function of the network card to be tested, and restart the second virtual machine after closing the PXE function; the analysis module 340 is further configured to determine that the network card switch to be tested PXE functions are normal when the PXE function boot interface cannot be displayed.
In some embodiments, the configuration module 320 is further configured to install a Linux operating system and a virtualization hypervisor within the test server; after the virtualization management program is installed, the configuration module 320 is further configured to try to install a test virtual machine; if the test virtual machine is started normally, the software environment configuration is successful, otherwise, the configuration module 320 is further configured to adjust the Linux operating system configuration and the installation package corresponding to the virtualization management program until the test virtual machine is started normally.
In some embodiments, the installation module 310 is further configured to modify basic input output system settings in the test server to ensure that a central processor in the test server supports virtualization functionality; the installing module 310 is further configured to refresh the firmware version of the network card to be tested into the version to be tested, so as to avoid a problem that the firmware version does not support the PXE function.
Example four
Corresponding to all the above embodiments, an embodiment of the present application provides an electronic device, including:
one or more processors; and memory associated with the one or more processors for storing program instructions that, when read and executed by the one or more processors, perform the steps of:
step A, installing a network card to be tested to a test server;
step B, configuring a software environment of the test server to ensure that the test server supports virtual machine creation;
step C, creating a first virtual machine, and configuring a PXE server environment by using the first virtual machine to provide a PXE function;
step D, creating a second virtual machine, and configuring the starting mode of the second virtual machine to be starting from the network card to be tested;
and starting the second virtual machine, and if a PXE function boot interface is displayed, judging that the function of the PXE of the network card to be tested is normal.
Fig. 4 schematically shows an architecture of an electronic device, which may specifically 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 by a bus 430.
The processor 410 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solution provided by the present Application.
The Memory 420 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static terminal device, a dynamic terminal device, or the like. The memory 420 may store an operating system 421 for controlling execution of the electronic device 400, a Basic Input Output System (BIOS) 422 for controlling low-level operation of the electronic device 400. In addition, a web browser 423, a data storage management system 424, an icon font processing system 424, and the like may also be stored. The icon font processing system 424 may be an application program that implements the operations of the foregoing steps in this embodiment of the application. In summary, 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 called to be executed by the processor 410.
The input/output interface 413 is used for connecting an input/output module to input and output information. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The network interface 414 is used to connect a communication module (not shown in the figure) to implement communication interaction between the present device and other devices. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, bluetooth and the like).
Bus 430 includes a path that transfers information between the various components of the device, such as processor 410, video display adapter 411, disk drive 412, input/output interface 413, network interface 414, and memory 420.
In addition, the electronic device 400 may also obtain information of specific pickup conditions from a virtual resource object pickup condition information database for performing condition judgment, and the like.
It should be noted that although the above-mentioned devices only show the processor 410, the video display adapter 411, the disk drive 412, the input/output interface 413, the network interface 414, the memory 420, the bus 430 and so on, in a specific implementation, the device may also include other components necessary for normal execution. Furthermore, it will be understood by those skilled in the art that the apparatus described above may also include only the components necessary to implement the solution of the present application, and not necessarily all of the components shown in the figures.
EXAMPLE six
In response to all the above embodiments, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, where the computer program causes a computer to operate as follows:
installing a network card to be tested to a test server;
configuring a software environment of the test server to ensure that the test server supports virtual machine creation;
creating a first virtual machine, and configuring a PXE server environment by using the first virtual machine to provide PXE functions;
creating a second virtual machine, and configuring the starting mode of the second virtual machine to be starting from a network card to be tested;
and starting the second virtual machine, and if a PXE function boot interface is displayed, judging that the function of the PXE of the network card to be tested is normal.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, or the like, and includes several instructions for enabling a computer device (which may be a personal computer, a cloud server, or a network device) to execute the method according to the embodiments or some parts of the embodiments of the present application.
All the embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, the system or system embodiments are substantially similar to the method embodiments and therefore are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described system and system embodiments are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (10)

1. A method for testing PXE function of a network card is characterized by comprising the following steps:
installing a network card to be tested to a test server;
configuring a software environment of the test server to ensure that the test server supports virtual machine creation;
creating a first virtual machine, and configuring a PXE server environment by using the first virtual machine to provide a PXE function;
creating a second virtual machine, and configuring the starting mode of the second virtual machine to be starting from a network card to be tested;
and starting the second virtual machine, and if a PXE function guide interface is displayed, judging that the PXE function of the network card to be tested is normal.
2. The method of claim 1, wherein the network card to be tested comprises a single-port network card to be tested and a dual-port network card to be tested, and the installing the network card to be tested to the test server comprises:
if the network card to be tested is a single-port network card to be tested, installing two single-port network cards to be tested to the test server, and directly connecting the single-port network cards to be tested through a network cable;
if the network card to be tested is a double-port network card to be tested, installing one double-port network card to be tested to the test server, wherein two network ports on the double-port network card to be tested are directly connected through a network cable;
and recording two network ports corresponding to the network card to be tested installed in the test server as a first physical network port and a second physical network port.
3. The method as recited in claim 2, wherein configuring a PXE server environment with the first virtual machine to provide PXE functionality comprises:
closing the firewall;
starting a dynamic host configuration service, a simple file transmission service and a hypertext transmission service;
importing and executing a PXE service file to configure a PXE service end environment, wherein the PXE service file at least comprises a boot file, a kernel file and a boot menu file;
and the first virtual machine is connected to the network card to be tested based on the first physical network port.
4. The method according to claim 2, wherein the configuring the starting manner of the second virtual machine is starting from a network card to be tested, and comprises:
modifying a basic input and output system of the second virtual machine into a unified extensible mode;
deleting original virtual equipment 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 interface;
and adding a network card option to be tested in the starting option and deleting the original virtual equipment guiding option.
5. The method of claim 3, further comprising:
installing a network card firmware management tool in the test server;
after the firmware register value is modified to close the PXE function of the network card to be tested, restarting a second virtual machine;
and if the PXE function boot interface cannot be displayed, judging that the function of the network card switch to be tested PXE is normal.
6. The method of claim 3, wherein configuring the software environment of the test server comprises:
installing a Linux operating system and a virtualization management program in the test server;
after the virtualization management program is installed, trying to install a test virtual machine;
and if the test virtual machine is normally started, 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 is normally started.
7. The method according to claim 4, wherein after installing the network card to be tested to the test server, the method further comprises:
modifying the basic input and output system setting in the test server to ensure that a central processing unit in the test server supports a virtualization function;
and refreshing the firmware version of the network card to be tested as the version to be tested so as to avoid the problem that the firmware version does not support the PXE function.
8. A network card PXE function test system is characterized in that the system comprises:
the installation module is used for installing the network card to be tested to the test server;
the configuration module is used for configuring the software environment of the test server so as to ensure that the test server supports virtual machine application;
the system comprises a processing module, a PXE server environment and a PXE server function, wherein the processing module is used for creating a first virtual machine and configuring the PXE server environment by using the first virtual machine to provide the PXE function;
the processing module is further used for creating a second virtual machine and configuring the starting mode of the second virtual machine to be starting from the network card to be tested;
and the analysis module is used for judging 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.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
and memory associated with the one or more processors, the memory for storing program instructions that, when read and executed by the one or more processors, perform the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that it stores a computer program which causes a computer to execute the method of any one of claims 1-7.
CN202211273968.2A 2022-10-18 2022-10-18 Network card PXE function test method, system, electronic device and storage medium Pending CN115589379A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211273968.2A CN115589379A (en) 2022-10-18 2022-10-18 Network card PXE function test method, system, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211273968.2A CN115589379A (en) 2022-10-18 2022-10-18 Network card PXE function test method, system, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN115589379A true CN115589379A (en) 2023-01-10

Family

ID=84780296

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211273968.2A Pending CN115589379A (en) 2022-10-18 2022-10-18 Network card PXE function test method, system, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN115589379A (en)

Similar Documents

Publication Publication Date Title
CN109558157B (en) Computer implemented method and system for saving firmware settings
US9501289B2 (en) Method of a UEFI firmware and computer system thereof
US20200089522A1 (en) Configuration of speed of virtual network interface card
US11550593B2 (en) Information handling system quick boot
US10303458B2 (en) Multi-platform installer
US9184991B2 (en) Method and apparatus for developing service processor solutions
JP2003527654A (en) Method, system and computer readable storage medium for automatic device driver configuration
US9262178B2 (en) Method for reducing platform boot times by providing lazy input/output abstractions
US10606677B2 (en) Method of retrieving debugging data in UEFI and computer system thereof
EP1372069A2 (en) Method system and software for configuring a graphics processing communication mode
US8335891B2 (en) Method and system for configuring a storage array
KR101249735B1 (en) Device and method for executing Android applications on general purpose operating systems, and computer readable recording medium for the same
CN107135462B (en) Bluetooth pairing method of UEFI firmware and computing system thereof
CN111475175B (en) Method, device and medium for installing and guiding operation system based on ARM server
WO2022199335A1 (en) Method, apparatus and device for controlling firmware upgrade of server component, and storage medium
CN115061871A (en) Computer performance test method, device and medium
CN116450046A (en) Cloud disk implementation method and device, intelligent network card, server and storage medium
EP4296860A1 (en) Method for running startup program of electronic device, and electronic device
CN115589379A (en) Network card PXE function test method, system, electronic device and storage medium
US20140136777A1 (en) Method and system for configuring a storage array
US10599412B2 (en) Operating system installation on a computing device with multiple redundant drives
CN113868128B (en) Method and device for testing PXE (PCI express) guide function and storage medium
US11789821B1 (en) Out-of-band method to change boot firmware configuration
US20240036896A1 (en) Generating installation images based upon dpu-specific capabilities
US11921582B2 (en) Out of band method to change boot firmware configuration

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination