Method for automatically processing faults of virtualized host machine

Through the combination of an automatic operation and maintenance platform and python scripts, the automatic handling of virtualized host failures is realized, which solves the problem of poor timeliness of fault handling in the existing technology, improves resource utilization efficiency and reduces operational costs.

CN119473678APending Publication Date: 2025-02-18JIANGSU SUNING BANK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411534261.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

In the prior art, the fault handling of virtualized hosts relies on manual inspection and processing, resulting in poor timeliness of fault discovery and processing, affecting the stability of the virtual machine and resource utilization efficiency.

Method used

The host hardware device status query is initiated through the automatic operation and maintenance platform to determine whether there are faulty characters in the status code. If it exists, it is marked as an abnormal host. The virtual machine will be automatically migrated through python scripts, isolated the abnormal host, and hardware replacement and resources will be performed Adjust to ensure the balance of cluster resources.

Benefits of technology

It realizes the automated processing of virtualized host failures, improves the timeliness of fault handling and resource utilization efficiency, and reduces human error and operational costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473678A_ABST
    Figure CN119473678A_ABST
Patent Text Reader

Abstract

The invention discloses a method for automatically processing faults of a virtualized host machine. The method comprises the steps that an automatic operation and maintenance platform initiates state query of hardware equipment of a host machine; the automatic operation and maintenance platform judges and marks the abnormal host machine according to the state code, and then migrates the virtual machine on the abnormal host machine; after the host machine proxy client inquires that the abnormal host machine does not operate the virtual machine, a migration completion result is returned to the automatic operation and maintenance platform; after receiving a returned migration completion result, the automatic operation and maintenance platform automatically isolates the abnormal host machine out of a cluster, and then performs exception repair and fault part replacement, the automatic operation and maintenance platform adds the repaired host machine into the cluster again, and after state query is normal, when cluster resources exceed a set threshold value, the host machine is returned to the abnormal host machine. And part of virtual machines on other host machines in the cluster are gradually migrated to the maintained host machine. According to the method, the host machine can be timely found and automatically handled after being abnormal, and manual participation is not needed in the handling process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method for automatically handling virtualized host machine failures. Background Art

[0002] With the continuous development of finance, the business environment faced by banks has become more complex, and the availability requirements for various business systems have become increasingly higher. A large number of business systems are running on virtualization platforms. However, with the increase in the number and age of servers and other equipment, the failure rate has increased year by year. The current host machine fault handling has the following shortcomings:

[0003] 1. Host machine failures and anomalies rely on manual inspections. Inspection personnel log in to relevant platforms at regular intervals to check alarm logs and equipment status. Fault discovery is not automated, which affects the timeliness of fault handling. If the frequency of manual inspections is four times a day, that is, an on-site inspection is conducted every 6 hours on average, when equipment failure occurs, the response personnel cannot be notified immediately;

[0004] 2. Fault handling relies on manual intervention. When the host machine is found to be abnormal, the relevant person in charge needs to be notified and the fault must be handled through manual remote login. Fault handling must go through multiple processes such as reporting, change, and implementation, which increases the running time of the virtual machine on the faulty host machine and affects the stability of the virtual machine operation. If the hard disk is not handled in time, it will cause a major accident of data loss;

[0005] 3. After the fault is resolved, the virtual machine needs to be manually migrated back, which fails to balance resources, causing uneven operation of host resources in the cluster and inability to fully utilize cluster resources. Summary of the invention

[0006] The purpose of the present invention is to provide a method for automatically handling virtualized host machine failures in view of the deficiencies in the prior art.

[0007] To achieve the above object, the present invention provides a method for automatically handling virtualized host machine failures, comprising:

[0008] The automatic operation and maintenance platform initiates a status query of the host machine's hardware devices;

[0009] The host returns the status code of the hardware device to the automatic operation and maintenance platform, and the automatic operation and maintenance platform determines whether there is a fault character in the returned status code. If there is a fault character in the status code, the host is marked as an abnormal host, and then the virtual machine on the abnormal host is migrated by calling the python script;

[0010] The host agent client uses a Python script to query whether there is a virtual machine running on the abnormal host. If there is no virtual machine running, the migration completion result is returned to the automatic operation and maintenance platform;

[0011] After receiving the returned migration completion result, the automatic operation and maintenance platform calls the python script to automatically isolate the abnormal host from the cluster;

[0012] After the abnormal host machine is isolated, abnormal repair and faulty parts replacement are performed on the abnormal host machine;

[0013] After completing the hardware replacement, the automatic operation and maintenance platform will re-add the repaired host machine to the cluster and re-initiate a status query of the host machine's hardware equipment. If there is no fault character in the status code of the repaired host machine, it will determine whether the cluster resources exceed the set threshold. If the cluster resources exceed the set threshold, some virtual machines on other host machines in the cluster will be gradually migrated to the repaired host machine until the cluster resources are lower than the set threshold.

[0014] Furthermore, the migration method of the virtual machine is as follows:

[0015] ① The automatic operation and maintenance platform sends a command to migrate the virtual machine to the host machine A to be migrated;

[0016] ② The automatic operation and maintenance platform sends a command to the host machine B to which the virtual machine is to be migrated to accept the virtual machine;

[0017] ③ Host A and host B start migrating virtual machines after coordination until all virtual machines on host A are completely migrated to host B;

[0018] ④Host A sends the network configuration information of the migrated virtual machine to host B;

[0019] ⑤Host B configures the virtual network card of the migrated virtual machine according to the received network configuration information;

[0020] ⑥Host B sends an IP packet to the switch, and sends it with the IP address and MAC address of the virtual machine, so that the switch automatically updates the MAC-Link table inside the switch after receiving the IP packet. When the switch subsequently receives a Layer 2 packet sent to this virtual machine, it forwards it to the link of host B.

[0021] Furthermore, the network configuration information includes the MAC address, traffic control, security policy and IP address of the virtual machine.

[0022] Furthermore, the hardware device includes a power supply, a hard disk, a CPU and a memory of the host machine.

[0023] Furthermore, the status query and status code are respectively initiated and returned through an API interface.

[0024] Beneficial effects: 1. Improve efficiency

[0025] Compared with manual inspection, automatic inspection can continuously, all-weather, and high-frequency monitor the equipment, which is more efficient. At the same time, automatic inspection can also automatically alarm, allowing staff to find equipment failures and abnormalities more quickly.

[0026] 2. Reduce costs

[0027] Automatic inspection does not require human participation, which reduces the number of inspection staff and inspection costs. It can also reduce maintenance costs and equipment failure repair costs, thereby reducing the company's operating costs.

[0028] 3. Reduce human error

[0029] Automatic inspections generally use digital and automated methods to reduce the interference of human factors on data and avoid the occurrence of human errors.

[0030] 4. The data is more accurate

[0031] Automatic inspection uses computer technology to achieve high-precision, high-sensitivity, and high-real-time monitoring and data collection, greatly improving the accuracy of the data.

[0032] 5. Effectively improve security and stability

[0033] Automatic inspection can promptly detect equipment failures and abnormalities and take corresponding measures in a timely manner, thereby effectively improving the safety and stability of the equipment. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 It is a flowchart of a method for automatically handling virtualization host machine failures;

[0035] Figure 2 The figure is a flowchart of virtual machine migration. DETAILED DESCRIPTION

[0036] The present invention is further explained below in conjunction with the accompanying drawings and specific embodiments. The embodiments are implemented based on the technical solution of the present invention. It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention.

[0037] like Figure 1 As shown, an embodiment of the present invention provides a method for automatically handling virtualized host machine failures, including:

[0038] The automatic operation and maintenance platform initiates a status query of the hardware equipment of the host machine. Among them, the automatic operation and maintenance platform is used to uniformly manage the daily operation and maintenance of IT assets, such as health checks, batch rapid deployment, intelligent configuration, automatic fault handling, and business recovery. In the present invention, as an inspection and scheduling server, the automatic operation and maintenance platform can be deployed in a front-end and back-end separation manner, mainly initiating host machine status inspection information collection and resource usage threshold viewing, mainly through tomcat deployment, and the deployment method is binary deployment. The front end mainly handles administrator interaction and display; the deployment adopts the method of nginx proxy static resources, and the deployment method is binary deployment. The inspection and scheduling platform contains information such as host machine resource collection and resource threshold setting. The deployment adopts the method of mysql database, which is responsible for data storage, management of host machine information collection and status judgment; the scheduling platform uses a customized script to call the script to migrate the virtual machine when a host machine exception occurs, and after the migration is completed, the host machine resource threshold is checked to confirm the balance of host machine resource usage. The host machine is a physical server that provides computing and storage resources for the virtual machine. The above-mentioned hardware equipment includes the power supply, hard disk, CPU and memory of the host machine. The automatic operation and maintenance platform can initiate status queries of the host's hardware devices through the API interface (Application Programming Interface). The API interface is an application programming interface, which is a set of predefined functions or methods that allow applications or developers to access the functions of software or hardware through these interfaces without having to deeply understand its internal working mechanism or source code.

[0039] The host machine can return the status code of the hardware device to the automatic operation and maintenance platform through the API interface. The automatic operation and maintenance platform determines whether there are fault characters (keywords such as fault) in the returned status code. If there are fault characters in the status code, the host machine is marked as an abnormal host machine, and then the virtual machine on the abnormal host machine is migrated by calling the python script. If there are no fault characters in the status code, it means that all hosts in the cluster are normal. A virtual machine refers to a simulated computer environment running on the current operating system.

[0040] The host agent client uses a python script to query whether there is a virtual machine running on the abnormal host. If no virtual machine is running, the migration completion result is returned to the automatic operation and maintenance platform.

[0041] After receiving the returned migration completion result, the automatic operation and maintenance platform calls the Python script to automatically isolate the abnormal host from the cluster.

[0042] After the isolation of the abnormal host machine is completed, the abnormal host machine is reported for abnormality repair and the faulty parts are replaced.

[0043] After the hardware replacement is completed, the automatic operation and maintenance platform will re-add the repaired host machine to the cluster and re-initiate a status query of the host machine's hardware devices through the API interface. If there is no fault character in the status code of the repaired host machine, it will determine whether the cluster resources exceed the set threshold. If the cluster resources exceed the set threshold, some virtual machines on other host machines in the cluster will be gradually migrated to the repaired host machine until the cluster resources are lower than the set threshold.

[0044] See also Figure 2 , the migration method of the above virtual machine is as follows:

[0045] The automatic operation and maintenance platform sends a command to migrate the virtual machine to the host machine A from which the virtual machine is to be migrated.

[0046] The automatic operation and maintenance platform sends an instruction to accept the virtual machine to the host machine B to which the virtual machine is to be migrated. Specifically, the instruction to migrate the virtual machine and the instruction to accept the virtual machine are issued by the migration control module of the automatic operation and maintenance platform. The migration modules on the host machines A and B receive the instructions to migrate the virtual machine and the instructions to accept the virtual machine, and control the execution of subsequent migration work.

[0047] ③ Host A and host B start migrating virtual machines after coordination until the virtual machines on host A are completely migrated to host B.

[0048] ④Host A sends the network configuration information of the migrated virtual machine to host B. The above network configuration information includes the MAC address, traffic control, security policy and IP address of the virtual machine.

[0049] ⑤Host B configures the virtual network card of the migrated virtual machine according to the received network configuration information.

[0050] ⑥Host B sends an IP packet to the switch, and sends it with the IP address and MAC address of the virtual machine. The purpose is to let the switch automatically update the MAC-Link table inside the switch after receiving the IP packet. Then, when the switch receives the second-layer packet sent to this virtual machine, it will forward it to the link of host B.

[0051] In addition, the virtual machine cluster can be configured with the same compatible hardware, the same network labels and port policies, so that when virtual machine migration occurs, cross-cluster migration can be performed.

[0052] The above is only a preferred embodiment of the present invention. It should be noted that for ordinary technicians in this technical field, other parts not specifically described belong to the prior art or common knowledge. Several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered as the protection scope of the present invention.

Claims

1. A method for automatically handling virtualized host machine failures, characterized in that: include: The automatic operation and maintenance platform initiates a status query of the host machine's hardware devices; The host returns the status code of the hardware device to the automatic operation and maintenance platform, and the automatic operation and maintenance platform determines whether there is a fault character in the returned status code. If there is a fault character in the status code, the host is marked as an abnormal host, and then the virtual machine on the abnormal host is migrated by calling the python script; The host agent client uses a Python script to query whether there is a virtual machine running on the abnormal host. If there is no virtual machine running, the migration completion result is returned to the automatic operation and maintenance platform; After receiving the returned migration completion result, the automatic operation and maintenance platform calls the python script to automatically isolate the abnormal host from the cluster; After the abnormal host machine is isolated, abnormal repair and faulty parts replacement are performed on the abnormal host machine; After completing the hardware replacement, the automatic operation and maintenance platform will re-add the repaired host machine to the cluster and re-initiate a status query of the host machine's hardware equipment. If there is no fault character in the status code of the repaired host machine, it will determine whether the cluster resources exceed the set threshold. If the cluster resources exceed the set threshold, some virtual machines on other host machines in the cluster will be gradually migrated to the repaired host machine until the cluster resources are lower than the set threshold.

2. A method for automatically handling virtualized host machine failures according to claim 1, characterized in that: The migration method of the virtual machine is specifically as follows: ① The automatic operation and maintenance platform sends a command to migrate the virtual machine to the host machine A to be migrated; ② The automatic operation and maintenance platform sends a command to the host machine B to which the virtual machine is to be migrated to accept the virtual machine; ③ Host A and host B start migrating virtual machines after coordination until all virtual machines on host A are completely migrated to host B; ④Host A sends the network configuration information of the migrated virtual machine to host B; ⑤Host B configures the virtual network card of the migrated virtual machine according to the received network configuration information; ⑥Host B sends an IP packet to the switch, and sends it with the IP address and MAC address of the virtual machine, so that the switch automatically updates the MAC-Link table inside the switch after receiving the IP packet. When the switch subsequently receives a Layer 2 packet sent to this virtual machine, it forwards it to the link of host B.

3. A method for automatically handling virtualized host machine failures according to claim 2, characterized in that: The network configuration information includes the MAC address, traffic control, security policy and IP address of the virtual machine.

4. The method for automatically handling virtualized host machine failures according to claim 1, characterized in that: The hardware devices include the host machine's power supply, hard disk, CPU and memory.

5. The method for automatically handling virtualized host machine failures according to claim 1, characterized in that: The status query and status code are respectively initiated and returned through the API interface.