An IP exception processing method, apparatus, device, and medium

By working together with the virtualization platform and virtual machine enhancement tools, the IP address of the virtual machine network card device is automatically identified and reconfigured, which solves the problem of IP configuration loss caused by changes in the virtual machine network card address and enhances the stability of the virtualization platform.

CN117041213BActive Publication Date: 2026-06-02ZHENGZHOU YUNHAI INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHENGZHOU YUNHAI INFORMATION TECH CO LTD
Filing Date
2023-08-11
Publication Date
2026-06-02

Smart Images

  • Figure CN117041213B_ABST
    Figure CN117041213B_ABST
Patent Text Reader

Abstract

The application discloses an IP exception processing method and device, equipment and a medium, and relates to the technical field of computers. The method comprises detecting the state of a virtual machine enhancement tool, saving IP configuration information of all network cards in a target virtual machine to a local database if the virtual machine enhancement tool is in a state of completed startup, monitoring whether a device change event occurs in the current target virtual machine, detecting whether device address information in the current network card is changed when it is monitored that the device change event occurs, detecting the IP state of all current network cards if the change occurs, screening out target IP configuration information corresponding to the abnormal IP if it is detected that there is an abnormal IP in an unusable state at present, and reconfiguring the abnormal IP based on the target IP configuration information by using the virtual machine enhancement tool, so as to avoid the problem that IP configuration is lost due to address change, realize real-time configuration and exception processing of the IP, and enhance the stability of the virtualization platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to an IP anomaly handling method, apparatus, device, and medium. Background Technology

[0002] Unlike traditional physical machines, virtual machines allow for custom configuration of many hardware components, such as the CPU (Central Processing Unit), memory, network card, and GPU (Graphics Processing Unit). This means that the hardware configuration may differ each time the machine boots, leading to problems that wouldn't occur on a physical machine. When adding hardware to a virtual machine, each piece of hardware must be assigned a corresponding PCI device address. In a physical environment, due to the limited number of PCI slots and limited expandability, the corresponding device addresses are relatively fixed. However, in a virtualization environment, a virtual machine can support 32, 64, or even 128 PCI (Peripheral Component Interconnect) devices. As more and more PCI devices are assigned to a virtual machine, the likelihood of the original virtual machine's PCI device addresses being modified increases. When the original PCI device addresses are changed, especially for network cards, the virtual machine's operating system may perceive the original network card as removed and a new one installed, resulting in the loss of the original network configuration and causing a series of problems. Based on existing virtualization capabilities, IP / MAC binding can be used to directly bind the network card to an IP (Internet Protocol Address) and a MAC (Media Access Control Address) address. However, this requires manual configuration and is relatively complex to modify.

[0003] As can be seen from the above, how to automatically identify virtual machine network card devices, avoid the problem of IP configuration loss due to address changes, realize real-time IP configuration and anomaly handling, and enhance the stability of virtualization platforms are problems that need to be solved in this field. Summary of the Invention

[0004] In view of this, the purpose of this invention is to provide an IP anomaly handling method, apparatus, device, and medium that can automatically identify virtual machine network card devices, avoid IP configuration loss due to address changes, achieve real-time IP configuration and anomaly handling, and enhance the stability of the virtualization platform. The specific solution is as follows:

[0005] Firstly, this application discloses an IP anomaly handling method applied to a virtualization platform, comprising:

[0006] The status of the virtual machine enhancement tools in the target virtual machine is detected. If the virtual machine enhancement tools are in a started state, the IP configuration information of all network cards in the target virtual machine is saved to the local database. The system also monitors whether any device change events have occurred in the target virtual machine.

[0007] When a device change event is detected in the target virtual machine, it is checked whether the device address information in the network card has changed; the device change event is a device change event based on the peripheral component interconnection standard.

[0008] If a change in the device address information in the network card is detected, the IP status of all the network cards is checked.

[0009] If an abnormal IP with an unavailable status is detected, the target IP configuration information corresponding to the abnormal IP is filtered from the local database, and the abnormal IP is reconfigured using the virtual machine enhancement tool based on the target IP configuration information.

[0010] Optionally, before checking the status of the virtual machine enhancement tools in the target virtual machine, the following steps are also included:

[0011] Install virtual machine enhancement tools on the target virtual machine to establish a communication connection between the local operating system and the target virtual machine's operating system.

[0012] Optionally, monitoring whether a device change event has occurred in the current target virtual machine includes:

[0013] Monitor whether the target virtual machine currently experiences device add and / or device delete events.

[0014] Optionally, after saving the IP configuration information of all network cards in the target virtual machine to the local database, the method further includes:

[0015] Trigger an IP modification operation on the network interface card in the target virtual machine to modify the IP address that needs to be changed in the target virtual machine;

[0016] The IP address of the network interface card (NIC) in the target virtual machine is monitored in real time to determine whether the IP address of the NIC in the target virtual machine has changed.

[0017] If it is determined that the IP address of any network interface card in the target virtual machine has changed, a database update operation is triggered to update the IP configuration information in the local database accordingly based on the IP change result of the network interface card, so as to obtain the updated local database.

[0018] The IP modification operation includes: modifying the IP address that needs to be changed in the target virtual machine through the virtualization platform; or modifying the IP address that needs to be changed in the target virtual machine through the target virtual machine.

[0019] Accordingly, the database update operation includes: if the IP modification operation is performed through the virtualization platform, then the IP configuration information in the local database is updated accordingly based on the IP change result of the arbitrary network card; if the IP modification operation is performed through the target virtual machine, then the IP change result of the arbitrary network card sent by the target virtual machine through the virtual machine enhancement tool is obtained, and the IP configuration information in the local database is updated accordingly using the received IP update result.

[0020] Optionally, the step of detecting the IP status of all network cards and, if an abnormal IP with an unavailable status is detected, then filtering out the target IP configuration information corresponding to the abnormal IP from the local database, includes:

[0021] The IP status of all network cards is detected by executing a preset ping command.

[0022] If the ping command fails, it is determined that there is an abnormal IP that is currently unavailable, and the target IP configuration information corresponding to the abnormal IP is filtered from the local database.

[0023] Optionally, the step of filtering out the target IP configuration information corresponding to the abnormal IP from the local database, and reconfiguring the abnormal IP using the virtual machine enhancement tool and based on the target IP configuration information, includes:

[0024] Determine the network interface name and serial number corresponding to the abnormal IP, and filter out the target IP configuration information corresponding to the abnormal IP from the local database based on the network interface name and the serial number;

[0025] An IP reconfiguration command is generated and sent to the virtual machine enhancement tool so that the virtual machine enhancement tool can reconfigure the abnormal IP based on the target IP configuration information after receiving the IP reconfiguration command.

[0026] Optionally, after reconfiguring the abnormal IP using the virtual machine enhancement tool and based on the target IP configuration information, the method further includes:

[0027] Obtain the configuration completion information sent by the virtual machine enhancement tool, and perform status checks on the IP after configuration is completed;

[0028] If the configured IP is detected to be available, a notification message indicating successful IP reconfiguration is sent to the client.

[0029] Secondly, this application discloses an IP anomaly handling device, comprising:

[0030] The IP configuration information storage module is used to detect the status of the virtual machine enhancement tool in the target virtual machine. If the virtual machine enhancement tool is in the state of being started, the IP configuration information of all network cards in the target virtual machine is saved to the local database.

[0031] The device change event monitoring module is used to monitor whether a device change event has occurred in the target virtual machine; the device change event is a device change event based on the peripheral component interconnection standard.

[0032] The information change detection module is used to detect whether the device address information in the current network card has changed when the target virtual machine is detected to have undergone the device change event.

[0033] The IP status detection module is used to detect the IP status of all network cards when a change in the device address information in the network card is detected.

[0034] The abnormal IP reconfiguration module is used to, when an abnormal IP that is currently unavailable is detected, filter out the target IP configuration information corresponding to the abnormal IP from the local database, and reconfigure the abnormal IP using the virtual machine enhancement tool and based on the target IP configuration information.

[0035] Thirdly, this application discloses an electronic device, including:

[0036] Memory, used to store computer programs;

[0037] A processor is used to execute the computer program to implement the aforementioned IP exception handling method.

[0038] Fourthly, this application discloses a computer storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the aforementioned disclosed IP exception handling method.

[0039] As can be seen, this application provides an IP anomaly handling method, including detecting the status of the virtual machine enhancement tool in the target virtual machine; if the virtual machine enhancement tool is in a started state, then saving the IP configuration information of all network cards in the target virtual machine to a local database; monitoring whether a device change event has occurred in the current target virtual machine; when a device change event is detected, detecting whether the device address information in the current network card has changed; the device change event is a device change event based on the peripheral component interconnection standard; if a change in the device address information in the network card is detected, then detecting the IP status of all current network cards; if an abnormal IP with an unavailable status is detected, then filtering the target IP configuration information corresponding to the abnormal IP from the local database, and reconfiguring the abnormal IP using the virtual machine enhancement tool and based on the target IP configuration information. This application, through the cooperation of a virtualization platform and virtual machine enhancement tools, automatically saves the virtual network card configuration and monitors whether the address of the network card of the virtual machine target device changes when the network card address changes. After the target virtual machine is powered on, it automatically reconfigures the IP address corresponding to the original network card to avoid the problem of IP configuration loss due to address changes. This enables real-time IP configuration and anomaly handling, thereby enhancing the stability of the virtualization platform. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0041] Figure 1 This is a flowchart of an IP anomaly handling method disclosed in this application;

[0042] Figure 2 This is a flowchart of another IP anomaly handling method disclosed in this application;

[0043] Figure 3 This is a schematic diagram of the structure of an IP anomaly handling device disclosed in this application;

[0044] Figure 4 This application provides a structural diagram of an electronic device. Detailed Implementation

[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0046] Unlike traditional physical machines, virtual machines allow for custom configuration of many hardware components, such as the CPU (Central Processing Unit), memory, network card, and GPU (Graphics Processing Unit). This means that the hardware configuration may differ each time the machine boots, leading to problems that wouldn't occur on a physical machine. When adding hardware to a virtual machine, each piece of hardware must be assigned a corresponding PCI device address. In a physical environment, due to the limited number of PCI slots and limited expandability, the corresponding device addresses are relatively fixed. However, in a virtualization environment, a virtual machine can support 32, 64, or even 128 PCI (Peripheral Component Interconnect) devices. As more and more PCI devices are assigned to a virtual machine, the likelihood of the original virtual machine's PCI device addresses being modified increases. When the original PCI device addresses are changed, especially for network cards, the virtual machine's operating system may perceive the original network card as removed and a new one installed, resulting in the loss of the original network configuration and causing a series of problems. Building upon existing virtualization capabilities, IP / MAC binding can be used to directly bind the network interface card (NIC) to both an IP address (Internet Protocol Address) and a MAC address (Media Access Control Address). However, this requires manual configuration and is relatively complex. Therefore, automatically identifying virtual machine NICs, preventing IP configuration loss due to address changes, enabling real-time IP configuration and anomaly handling, and enhancing the stability of the virtualization platform are problems that need to be solved in this field.

[0047] See Figure 1 As shown in the figure, this invention discloses an IP anomaly handling method, applied to a virtualization platform, which may specifically include:

[0048] Step S11: Check the status of the virtual machine enhancement tool in the target virtual machine. If the virtual machine enhancement tool is in a state of completed startup, save the IP configuration information of all network cards in the target virtual machine to the local database.

[0049] In this embodiment, before detecting the status of the virtual machine enhancement tools in the target virtual machine, the method further includes: installing the virtual machine enhancement tools in the target virtual machine to establish a communication connection between the local operating system and the target virtual machine's operating system using the virtual machine enhancement tools. Specifically, after installing vmtools (i.e., the virtual machine enhancement tools) inside the virtual machine, the status of vmtools is detected. If vmtools is in a started state, the IP configuration information of all network cards mounted on the target device at this time is recorded and saved to a local database.

[0050] Step S12: Monitor whether the target virtual machine has experienced a device change event. When the target virtual machine is detected to have experienced a device change event, check whether the device address information in the network card has changed. The device change event is a device change event based on the peripheral component interconnection standard.

[0051] In this embodiment, after saving the IP configuration information of all network cards in the target virtual machine to the local database, the method further includes: triggering an IP modification operation for the network cards in the target virtual machine to modify the IPs in the target virtual machine that need to be changed; monitoring the IPs of the network cards in the target virtual machine in real time to determine whether the IPs of the network cards in the target virtual machine have changed; if it is determined that the IP of any network card in the target virtual machine has changed, triggering a database update operation to update the IP configuration information in the local database according to the IP change result of any network card, so as to obtain the updated local database; wherein, the IP modification operation includes: through the virtual machine The virtualization platform modifies the IP address that needs to be changed in the target virtual machine; or, the target virtual machine modifies the IP address that needs to be changed in the target virtual machine. Correspondingly, the database update operation includes: if the IP modification operation is performed through the virtualization platform, then the IP configuration information in the local database is updated accordingly based on the IP change result of the arbitrary network interface card; if the IP modification operation is performed through the target virtual machine, then the IP change result of the arbitrary network interface card sent by the target virtual machine through the virtual machine enhancement tool is obtained, and the received IP update result is used to update the IP configuration information in the local database accordingly. In other words, after saving the IP configuration information of all network cards in the target virtual machine to the local database, if a modification operation is triggered on the IP address of the target virtual machine via the virtualization platform, the IP address of the target virtual machine that needs to be changed will be modified, and the IP configuration information in the local database will be updated accordingly based on the IP change result of any network card. If a modification operation is triggered on the target virtual machine via the target virtual machine, the IP change result of any network card sent by the target virtual machine through the virtual machine enhancement tool will be obtained, and the IP configuration information in the local database will be updated accordingly based on the received IP update result. That is, if the IP modification operation is performed through the virtualization platform, the IP configuration information in the local database will be updated accordingly; if the IP modification operation is performed through the target virtual machine, the IP update result sent by the target virtual machine will be sent to the virtualization platform again using vmtools, and the virtualization platform will update the IP configuration information in the local database accordingly based on the IP update result.

[0052] Step S13: If a change in the device address information in the network card is detected, the IP status of all network cards is checked.

[0053] Step S14: If an abnormal IP with an unavailable status is detected, the target IP configuration information corresponding to the abnormal IP is filtered from the local database, and the abnormal IP is reconfigured using the virtual machine enhancement tool based on the target IP configuration information.

[0054] In this embodiment, after reconfiguring the abnormal IP using the virtual machine enhancement tool and based on the target IP configuration information, the method further includes: obtaining configuration completion information sent by the virtual machine enhancement tool, and performing a status check on the configured IP again; if the configured IP is detected to be in an available state, a prompt message indicating successful IP reconfiguration is sent to the client. Specifically, after reconfiguration, vmtools sends the configuration completion information to the virtualization platform. At this time, the virtualization platform performs a status check on the IP again. If the configured IP is in an available state, a prompt message indicating successful IP reconfiguration is sent to the client, reminding the user that the network configuration has been restored due to the change of the network card PCI device address.

[0055] In this embodiment, the status of the virtual machine enhancement tool in the target virtual machine is detected. If the virtual machine enhancement tool is in a started state, the IP configuration information of all network cards in the target virtual machine is saved to the local database. The system monitors whether a device change event has occurred in the target virtual machine. When a device change event is detected, it checks whether the device address information in the network card has changed. The device change event is a device change event based on the peripheral component interconnection standard. If a change in the device address information in the network card is detected, the IP status of all network cards is checked. If an abnormal IP with an unavailable status is detected, the target IP configuration information corresponding to the abnormal IP is filtered from the local database, and the abnormal IP is reconfigured using the virtual machine enhancement tool and based on the target IP configuration information. This application, through the cooperation of a virtualization platform and virtual machine enhancement tools, automatically saves the virtual network card configuration and monitors whether the address of the network card of the virtual machine target device changes when the network card address changes. After the target virtual machine is powered on, it automatically reconfigures the IP address corresponding to the original network card to avoid the problem of IP configuration loss due to address changes. This enables real-time IP configuration and anomaly handling, thereby enhancing the stability of the virtualization platform.

[0056] See Figure 2 As shown in the figure, this invention discloses an IP anomaly handling method, applied to a virtualization platform, which may specifically include:

[0057] Step S21: Check the status of the virtual machine enhancement tool in the target virtual machine. If the virtual machine enhancement tool is in a state of completed startup, save the IP configuration information of all network cards in the target virtual machine to the local database.

[0058] Step S22: Monitor whether the target virtual machine has experienced a device change event. When the target virtual machine is detected to have experienced a device change event, check whether the device address information in the network card has changed. The device change event is a device change event based on the peripheral component interconnection standard.

[0059] In this embodiment, it is monitored whether the target virtual machine has a device addition event and / or device deletion event. When the target virtual machine has a device addition event and / or device deletion event, for example, when a PCI device is updated, such as adding or deleting a network card, disk, GPU, etc., the device address information in the network card has been changed.

[0060] Step S23: If a change in the device address information in the network card is detected, the IP status of all network cards is detected by executing a preset ping command.

[0061] Step S24: If the ping command fails, determine that there is an abnormal IP that is currently unavailable, and determine the network card name and serial number corresponding to the abnormal IP. Based on the network card name and serial number, filter out the target IP configuration information corresponding to the abnormal IP from the local database.

[0062] S25: Generate an IP reconfiguration command and send the IP reconfiguration command to the virtual machine enhancement tool so that the virtual machine enhancement tool can reconfigure the abnormal IP based on the target IP configuration information after obtaining the IP reconfiguration command.

[0063] In this embodiment, a preset ping command is executed to detect the IP status of all network cards. If the ping command is executed successfully, it means that the change of the network card device address has not caused the IP loss problem. If the ping command is not executed successfully, the network configuration of the network card that lost the IP is restored (i.e., the reconfiguration process).

[0064] The specific reconfiguration process is as follows: the network interface card (NIC) name and serial number corresponding to the abnormal IP are determined. Then, the virtualization platform filters the target IP configuration information corresponding to the abnormal IP from the local database using the NIC name and serial number. The IP reconfiguration command is then sent to vmtools. After receiving the command, vmtools reconfigures the abnormal IP based on the target IP configuration information.

[0065] This invention proposes an automated solution for scenarios where IP addresses are lost due to changes in the PCI address of a virtual machine's network adapter. Through the cooperation of VMtools and the virtualization platform, it ensures that problems are detected immediately and configurations are automatically restored, enhancing the stability of the virtualization platform. The key point of this application is that, through the cooperation of the virtualization platform and VMtools, it automatically saves the virtual network adapter configuration and monitors whether the PCI device address of the virtual machine's network adapter has changed in offline mode. Upon booting the virtual machine, it automatically restores the original network configuration corresponding to the network adapter, thus preventing the inability of applications within the virtual machine to run due to IP address loss.

[0066] In this embodiment, the status of the virtual machine enhancement tool in the target virtual machine is detected. If the virtual machine enhancement tool is in a started state, the IP configuration information of all network cards in the target virtual machine is saved to the local database. The system monitors whether a device change event has occurred in the target virtual machine. When a device change event is detected, it checks whether the device address information in the network card has changed. The device change event is a device change event based on the peripheral component interconnection standard. If a change in the device address information in the network card is detected, the IP status of all network cards is checked. If an abnormal IP with an unavailable status is detected, the target IP configuration information corresponding to the abnormal IP is filtered from the local database, and the abnormal IP is reconfigured using the virtual machine enhancement tool and based on the target IP configuration information. This application, through the cooperation of a virtualization platform and virtual machine enhancement tools, automatically saves the virtual network card configuration and monitors whether the address of the network card of the virtual machine target device changes when the network card address changes. After the target virtual machine is powered on, it automatically reconfigures the IP address corresponding to the original network card to avoid the problem of IP configuration loss due to address changes. This enables real-time IP configuration and anomaly handling, thereby enhancing the stability of the virtualization platform.

[0067] See Figure 3 As shown, this embodiment of the invention discloses an IP anomaly handling device, which may specifically include:

[0068] The IP configuration information storage module 11 is used to detect the status of the virtual machine enhancement tool in the target virtual machine. If the virtual machine enhancement tool is in the state of having been started, the IP configuration information of all network cards in the target virtual machine is saved to the local database.

[0069] The device change event monitoring module 12 is used to monitor whether a device change event has occurred in the target virtual machine; the device change event is a device change event based on the peripheral component interconnection standard.

[0070] The information change detection module 13 is used to detect whether the device address information in the current network card has changed when the target virtual machine is detected to have undergone the device change event.

[0071] IP status detection module 14 is used to detect the IP status of all network cards when a change in device address information in the network card is detected.

[0072] The abnormal IP reconfiguration module 15 is used to, when an abnormal IP with an unavailable status is detected, filter out the target IP configuration information corresponding to the abnormal IP from the local database, and reconfigure the abnormal IP using the virtual machine enhancement tool and based on the target IP configuration information.

[0073] In this embodiment, the status of the virtual machine enhancement tool in the target virtual machine is detected. If the virtual machine enhancement tool is in a started state, the IP configuration information of all network cards in the target virtual machine is saved to the local database. The system monitors whether a device change event has occurred in the target virtual machine. When a device change event is detected, it checks whether the device address information in the network card has changed. The device change event is a device change event based on the peripheral component interconnection standard. If a change in the device address information in the network card is detected, the IP status of all network cards is checked. If an abnormal IP with an unavailable status is detected, the target IP configuration information corresponding to the abnormal IP is filtered from the local database, and the abnormal IP is reconfigured using the virtual machine enhancement tool and based on the target IP configuration information. This application, through the cooperation of a virtualization platform and virtual machine enhancement tools, automatically saves the virtual network card configuration and monitors whether the address of the network card of the virtual machine target device changes when the network card address changes. After the target virtual machine is powered on, it automatically reconfigures the IP address corresponding to the original network card to avoid the problem of IP configuration loss due to address changes. This enables real-time IP configuration and anomaly handling, thereby enhancing the stability of the virtualization platform.

[0074] In some specific embodiments, the IP configuration information storage module 11 may specifically include:

[0075] The communication connection establishment module is used to install virtual machine enhancement tools in the target virtual machine so as to establish a communication connection between the local operating system and the target virtual machine operating system using the virtual machine enhancement tools.

[0076] In some specific embodiments, the device change event monitoring module 12 may specifically include:

[0077] The device change event monitoring module is used to monitor whether the target virtual machine has experienced device addition and / or device deletion events.

[0078] In some specific embodiments, the IP configuration information storage module 11 may specifically include:

[0079] The IP modification module is used to trigger an IP modification operation on the network card in the target virtual machine, so as to modify the IP address in the target virtual machine that needs to be changed.

[0080] The IP real-time monitoring module is used to monitor the IP of the network card in the target virtual machine in real time to determine whether the IP of the network card in the target virtual machine has changed.

[0081] The IP configuration information update module is used to trigger a database update operation if it is determined that the IP of any network card in the target virtual machine has changed, so as to update the IP configuration information in the local database accordingly based on the IP change result of the arbitrary network card, so as to obtain the updated local database.

[0082] The IP modification module is used to modify the IP address that needs to be changed in the target virtual machine through the virtualization platform; or, to modify the IP address that needs to be changed in the target virtual machine through the target virtual machine.

[0083] The database update module is used to update the IP configuration information in the local database accordingly based on the IP change result of the arbitrary network card if the IP modification operation is performed through the virtualization platform; and to obtain the IP change result of the arbitrary network card sent by the target virtual machine through the virtual machine enhancement tool, and update the IP configuration information in the local database accordingly using the received IP update result if the IP modification operation is performed through the target virtual machine.

[0084] In some specific embodiments, the IP status detection module 14 may specifically include:

[0085] The IP status detection module is used to detect the current IP status of all network cards by executing a preset ping command.

[0086] In some specific embodiments, the abnormal IP reconfiguration module 15 may specifically include:

[0087] The target IP configuration information filtering module is used to determine that there is an abnormal IP with an unavailable status if the ping command fails to execute, and to filter out the target IP configuration information corresponding to the abnormal IP from the local database.

[0088] In some specific embodiments, the abnormal IP reconfiguration module 15 may specifically include:

[0089] The target IP configuration information filtering module is used to determine the network interface name and serial number corresponding to the abnormal IP, and filter the target IP configuration information corresponding to the abnormal IP from the local database based on the network interface name and the serial number.

[0090] A reconfiguration module is used to generate an IP reconfiguration command and send the IP reconfiguration command to the virtual machine enhancement tool, so that after the virtual machine enhancement tool obtains the IP reconfiguration command, it can reconfigure the abnormal IP based on the target IP configuration information.

[0091] In some specific embodiments, the abnormal IP reconfiguration module 15 may specifically include:

[0092] The status detection module is used to obtain the configuration completion information sent by the virtual machine enhancement tool, and to perform status detection on the IP after the configuration is completed.

[0093] The prompt message sending module is used to send a prompt message to the client indicating that the IP reconfiguration was successful if it is detected that the IP is available after the configuration is completed.

[0094] Figure 4 This is a schematic diagram of an electronic device provided in an embodiment of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the IP exception handling method performed by the electronic device disclosed in any of the foregoing embodiments.

[0095] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0096] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored on it include operating system 221, computer program 222 and data 223, etc., and the storage method can be temporary storage or permanent storage.

[0097] The operating system 221 manages and controls the various hardware devices on the electronic device 20 and the computer program 222 to enable the processor 21 to perform operations and processing on the data 223 in the memory 22. The operating system 221 can be Windows, Unix, Linux, etc. The computer program 222, in addition to including a computer program capable of performing the IP exception handling method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, may further include computer programs capable of performing other specific tasks. The data 223 may include data received by the IP exception handling device from external devices, as well as data collected by its own input / output interface 25.

[0098] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0099] Furthermore, embodiments of this application also disclose a computer-readable storage medium storing a computer program, which, when loaded and executed by a processor, implements the IP exception handling method steps disclosed in any of the foregoing embodiments.

[0100] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0101] The above provides a detailed description of the IP anomaly handling method, apparatus, device, and storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for handling IP anomalies, characterized in that, Applied to virtualization platforms, including: The status of the virtual machine enhancement tool in the target virtual machine is detected. If the virtual machine enhancement tool is in a state of completed startup, the IP configuration information of all network cards in the target virtual machine is saved to the local database. Monitor whether the target virtual machine has experienced a device change event. When the target virtual machine is detected to have experienced a device change event, check whether the device address information in the network card has changed. The device change event is a device change event based on the peripheral component interconnection standard. If a change in the device address information in the network card is detected, the IP status of all the network cards is checked. If an abnormal IP with an unavailable status is detected, the target IP configuration information corresponding to the abnormal IP is filtered from the local database, and the abnormal IP is reconfigured using the virtual machine enhancement tool based on the target IP configuration information. After saving the IP configuration information of all network cards in the target virtual machine to the local database, the process also includes: triggering an IP modification operation for the network cards in the target virtual machine to modify the IPs that need to be changed in the target virtual machine; monitoring the IPs of the network cards in the target virtual machine in real time to determine whether the IPs of the network cards in the target virtual machine have changed; if it is determined that the IP of any network card in the target virtual machine has changed, triggering a database update operation to update the IP configuration information in the local database accordingly based on the IP change result of any network card, so as to obtain the updated local database. The IP modification operation includes: modifying the IP address that needs to be changed in the target virtual machine through the virtualization platform; or modifying the IP address that needs to be changed in the target virtual machine through the target virtual machine. Correspondingly, the database update operation includes: if the IP modification operation is performed through the virtualization platform, the IP configuration information in the local database is updated accordingly based on the IP change result of any network card; if the IP modification operation is performed through the target virtual machine, the IP change result of any network card sent by the target virtual machine through the virtual machine enhancement tool is obtained, and the IP configuration information in the local database is updated accordingly using the received IP update result.

2. The IP anomaly handling method according to claim 1, characterized in that, Before detecting the status of the virtual machine enhancement tools in the target virtual machine, the process also includes: Install virtual machine enhancement tools on the target virtual machine to establish a communication connection between the local operating system and the target virtual machine's operating system.

3. The IP anomaly handling method according to claim 1, characterized in that, The monitoring of whether the target virtual machine has experienced a device change event includes: Monitor whether the target virtual machine currently experiences device add and / or device delete events.

4. The IP anomaly handling method according to claim 1, characterized in that, The step involves checking the IP status of all network cards. If an abnormal IP with an unavailable status is detected, the target IP configuration information corresponding to the abnormal IP is filtered from the local database, including: The IP status of all network cards is detected by executing a preset ping command. If the ping command fails, it is determined that there is an abnormal IP that is currently unavailable, and the target IP configuration information corresponding to the abnormal IP is filtered from the local database.

5. The IP anomaly handling method according to claim 1, characterized in that, The step of filtering out the target IP configuration information corresponding to the abnormal IP from the local database, and reconfiguring the abnormal IP using the virtual machine enhancement tool and based on the target IP configuration information, includes: Determine the network interface name and serial number corresponding to the abnormal IP, and filter out the target IP configuration information corresponding to the abnormal IP from the local database based on the network interface name and the serial number; An IP reconfiguration command is generated and sent to the virtual machine enhancement tool so that the virtual machine enhancement tool can reconfigure the abnormal IP based on the target IP configuration information after receiving the IP reconfiguration command.

6. The IP anomaly handling method according to any one of claims 1 to 5, characterized in that, After reconfiguring the abnormal IP using the virtual machine enhancement tool and based on the target IP configuration information, the process further includes: Obtain the configuration completion information sent by the virtual machine enhancement tool, and perform status checks on the IP after configuration is completed; If the configured IP is detected to be available, a notification message indicating successful IP reconfiguration is sent to the client.

7. An IP anomaly handling device, characterized in that, include: The IP configuration information storage module is used to detect the status of the virtual machine enhancement tool in the target virtual machine. If the virtual machine enhancement tool is in the state of being started, the IP configuration information of all network cards in the target virtual machine is saved to the local database. The device change event monitoring module is used to monitor whether a device change event has occurred in the target virtual machine; the device change event is a device change event based on the peripheral component interconnection standard. The information change detection module is used to detect whether the device address information in the current network card has changed when the target virtual machine is detected to have undergone the device change event. The IP status detection module is used to detect the IP status of all network cards when a change in the device address information in the network card is detected. The abnormal IP reconfiguration module is used to, when an abnormal IP with an unavailable status is detected, filter out the target IP configuration information corresponding to the abnormal IP from the local database, and reconfigure the abnormal IP using the virtual machine enhancement tool and based on the target IP configuration information; After saving the IP configuration information of all network cards in the target virtual machine to the local database, the process also includes: triggering an IP modification operation for the network cards in the target virtual machine to modify the IPs that need to be changed in the target virtual machine; monitoring the IPs of the network cards in the target virtual machine in real time to determine whether the IPs of the network cards in the target virtual machine have changed; if it is determined that the IP of any network card in the target virtual machine has changed, triggering a database update operation to update the IP configuration information in the local database accordingly based on the IP change result of any network card, so as to obtain the updated local database. The IP modification operation includes: modifying the IP address that needs to be changed in the target virtual machine through the virtualization platform; or modifying the IP address that needs to be changed in the target virtual machine through the target virtual machine. Correspondingly, the database update operation includes: if the IP modification operation is performed through the virtualization platform, the IP configuration information in the local database is updated accordingly based on the IP change result of any network card; if the IP modification operation is performed through the target virtual machine, the IP change result of any network card sent by the target virtual machine through the virtual machine enhancement tool is obtained, and the IP configuration information in the local database is updated accordingly using the received IP update result.

8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the IP anomaly handling method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer programs are executed by a processor, they implement the IP exception handling method as described in any one of claims 1 to 6.