Fault recovery method of virtual machine, computing device and computing system

By simulating the serial port transmission of fault information between the host and the virtual machine and determining the repair plan from the fault knowledge base, direct communication solves the network dependency problem in virtual machine network fault repair and improves the repair success rate and efficiency.

CN118567889AInactive Publication Date: 2024-08-30XFUSION DIGITAL TECH CO LTD

Patent Information

Application Number
CN202410490332.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-22
Publication Date
2024-08-30
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the existing technology, virtual machine network fault repair methods rely on network intervention, resulting in the faulty virtual machine being unable to form a local area network with the switch, which reduces the repair success rate.

Method used

By simulating the serial port for data transmission between the host and the target virtual machine, fault information is obtained and the repair plan is determined from the fault knowledge base, and communication is conducted directly between the host and the virtual machine to avoid network intervention.

Benefits of technology

It improves the success rate of repairing virtual machine network faults, solves the dependency problem in the network fault repair process, and enhances the reliability and efficiency of fault repair.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567889A
    Figure CN118567889A
Patent Text Reader

Abstract

The embodiment of the invention provides a fault repairing method of a virtual machine, computing equipment and a computing system, relates to the technical field of servers, and can improve the success rate of repairing a fault of the virtual machine. The method comprises the following steps: acquiring fault information of a target fault from a target virtual machine through a simulation serial port; wherein the fault information comprises a target fault identifier; the simulation serial port is a serial port formed by simulation between an operating system of the host machine and the target virtual machine; determining a target repair scheme for repairing the target fault from a fault knowledge base based on the target fault identifier; wherein the target fault is a fault to be repaired in a target virtual machine; the fault knowledge base comprises a corresponding relationship between the fault identifier and the repair scheme; and repairing the target fault according to the target repairing scheme.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of server technology, and in particular to a virtual machine fault repair method, a computing device, and a computing system. Background Art

[0002] As we all know, a virtual machine (VM) is a virtual computer with an independent operating system (OS) running on a host machine; when a network failure occurs in a virtual machine, how to repair the network failure on the virtual machine is the focus of major manufacturers.

[0003] A common method for repairing network failures on virtual machines is that the faulty virtual machine sends fault information of the failure to a management device through a switch; the management device sends a repair plan for repairing the failure to the target virtual machine through the switch; wherein the faulty virtual machine sends the fault information of the above failure to the switch through a local area network formed with the switch, so that the switch forwards the fault information to the management platform.

[0004] However, when the above-mentioned fault is a network fault in the faulty virtual machine, the faulty virtual machine may not be able to form a local area network with the switch, so the faulty virtual machine cannot send the fault information to the management device through the interactive machine. Similarly, the management device cannot send a repair plan to the faulty virtual machine through the above-mentioned switch; therefore, the success rate of repairing the virtual machine fault is reduced. Summary of the invention

[0005] The embodiments of the present application provide a virtual machine fault repair method, a computing device, and a computing system, which can improve the success rate of repairing virtual machine faults.

[0006] In order to achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0007] In a first aspect, an embodiment of the present application provides a virtual machine fault repair method, which includes: obtaining fault information of a target fault from a target virtual machine through a simulated serial port; wherein the fault information includes a target fault identifier; the simulated serial port is a serial port simulated between an operating system OS of a host machine and a target virtual machine; based on the target fault identifier, determining a target repair plan for repairing the target fault from a fault knowledge base; wherein the target fault is a fault to be repaired in the target virtual machine; the fault knowledge base includes a correspondence between a fault identifier and a repair plan; and repairing the above-mentioned target fault according to the target repair plan.

[0008] The embodiment of the present application provides a virtual machine fault repair method, in which the host machine obtains the fault information of the target fault from the target virtual machine through a simulated serial port, and the fault information includes a target fault identifier; then, the host machine determines the target repair scheme for repairing the target fault from a fault knowledge base, wherein the fault knowledge base includes the corresponding relationship between the fault identifier and the repair scheme; finally, the host machine repairs the target fault according to the target repair scheme. Since in the fault repair process, the host machine and the target virtual machine running on it transmit data through a simulated serial port, and the simulated serial port is a serial port simulated between the host machine and the target virtual machine, the communication between the host machine and the target virtual machine based on the simulated serial port does not rely on the network; and the target repair scheme is determined by the host machine from the fault knowledge base, so it is not necessary for the management device to send the repair scheme to the target virtual machine. It can be seen that the virtual machine fault repair method provided by the embodiment of the present application does not require the intervention of the network, thereby improving the success rate of repairing the network fault of the virtual machine.

[0009] In a possible implementation, the simulated serial port is a serial port simulated based on a shared area between the OS and the target virtual machine; the shared area includes: a shared memory space or a shared hard disk space.

[0010] In a possible implementation, sharing hard disk space may be achieved in the form of shared files.

[0011] In a possible implementation, repairing the target fault according to the target repair plan includes: when the target fault belongs to a first preset fault type, sending the target repair plan to the target virtual machine through the simulated serial port; wherein the first preset fault type includes software faults in the virtual machine and configuration faults in the virtual machine; calling the target virtual machine to repair the target fault based on the target repair plan; or, when the target fault belongs to a second preset fault type, calling the OS to repair the target fault based on the target repair plan; wherein the second preset fault type includes hardware faults.

[0012] In the above embodiment, the OS of the host machine obtains fault information including a target fault identifier from the target virtual machine through a simulated serial port, and obtains a target repair solution for modifying the target fault from a fault knowledge base; then, when the target fault belongs to a first preset fault type, the OS of the host machine sends the target repair solution to the target virtual machine, so that the target virtual machine repairs the target fault based on the target repair solution; when the target fault belongs to a second preset fault type, the OS of the host machine modifies the target fault in the target virtual machine based on the target repair solution; wherein, the first preset fault includes software faults in the virtual machine and configuration faults in the virtual machine, and the second preset fault type includes hardware faults. Since the OS of the above host machine determines the execution subject for repairing the target fault according to the type of the target fault, the problem that the OS of the host machine cannot repair software faults in the virtual machine is solved, thereby improving the success rate of fault repair.

[0013] In a possible implementation, repairing the target fault according to the target repair solution includes: when there is a target repair solution in the fault knowledge base and the solution type of the target repair solution is automatic repair, repairing the target fault according to the target repair solution.

[0014] In a possible implementation, the method further includes: when there is a target repair solution in the fault knowledge base and the solution type of the target repair solution is manual repair, sending an indication message to the management device; the indication message is used to instruct the user to manually repair the target fault according to the target repair solution, and the indication message includes fault information of the target fault and the target repair solution.

[0015] In the above embodiment, when the solution type of the target repair solution is manual repair, the host machine sends the target repair solution to the management device, so that the user can manually repair the above target fault based on the target repair solution. The user is not required to determine a specific repair solution based on the fault information of the target fault. Therefore, while improving the user experience, the efficiency of repairing the fault is also improved.

[0016] In a possible implementation, the method further includes: when there is no target repair solution in the fault knowledge base, sending alarm information to a management device, the alarm information including: fault information of the target fault.

[0017] In the above embodiment, when there is no target repair solution corresponding to the target fault in the fault knowledge base, the host machine sends an alarm message to the management device to let the user know in time that the target repair solution does not exist in the fault knowledge base, so that the user can manually repair the fault in time, thereby improving the user experience.

[0018] In a possible implementation, before repairing the above-mentioned target fault according to the above-mentioned target repair plan, the method also includes: sending confirmation information to the management device; the confirmation information includes fault information of the target fault and the target repair plan, and the confirmation information is used to indicate the user to determine whether to repair the target fault based on the target repair plan; the above-mentioned repairing the target fault according to the target repair plan includes: in response to the confirmation indication sent by the user through the management device, repairing the target fault according to the target repair plan.

[0019] In the above embodiment, after determining the target repair plan, the host machine sends fault information including the target fault and confirmation information of the target repair plan to the management device, so that the user can determine through the confirmation information whether the host machine repairs the target fault indicated by the above fault information based on the target repair plan, thereby improving the accuracy of the target repair plan and further improving the accuracy of fault repair.

[0020] In a possible implementation, before obtaining the fault information of the target fault from the target virtual machine through the simulated serial port, the method also includes: receiving a detection request sent by a management device; the detection request includes: an identifier of the target virtual machine; the detection request is used to indicate obtaining the fault information of the target fault from the target virtual machine.

[0021] In the second aspect, an embodiment of the present application provides a repair device, which includes: a transceiver unit, a determination unit and a repair unit; the transceiver unit is used to obtain fault information of a target fault from a target virtual machine through a simulated serial port; wherein the fault information includes a target fault identifier; the simulated serial port is a serial port simulated between an operating system OS of a host machine and a target virtual machine; the determination unit is used to determine a target repair plan for repairing the target fault from a fault knowledge base based on the target fault identifier; wherein the target fault is a fault to be repaired in the target virtual machine; the fault knowledge base includes a correspondence between a fault identifier and a repair plan; the repair unit is used to repair the target fault according to the target repair plan.

[0022] In a possible implementation, the simulated serial port is a serial port simulated based on a shared area between the OS and the target virtual machine; the shared area includes: a shared memory space or a shared hard disk space.

[0023] In a possible implementation, sharing hard disk space may be achieved in the form of shared files.

[0024] In one possible implementation, the transceiver unit is used to send a target repair plan to the target virtual machine through a simulated serial port when the target fault belongs to a first preset fault type; wherein the first preset fault type includes software faults in the virtual machine and configuration faults in the virtual machine; the repair unit is used to call the target virtual machine to repair the target fault based on the target repair plan; or, the repair unit is used to call the OS to repair the target fault based on the target repair plan when the target fault belongs to a second preset fault type; wherein the second preset fault type includes hardware faults.

[0025] In a possible implementation, the repair unit is used to repair the target fault according to the target repair solution when there is a target repair solution in the fault knowledge base and the solution type of the target repair solution is automatic repair.

[0026] In one possible implementation, the transceiver unit is used to send an indication message to the management device when there is a target repair plan in the fault knowledge base and the plan type of the target repair plan is manual repair; the indication message is used to instruct the user to manually repair the target fault according to the target repair plan, and the indication message includes the fault information of the target fault and the target repair plan.

[0027] In a possible implementation, the transceiver unit is used to send alarm information to the management device when there is no target repair solution in the fault knowledge base, and the alarm information includes: fault information of the target fault.

[0028] In one possible implementation, the transceiver unit is used to send confirmation information to the management device; the confirmation information includes fault information of the target fault and a target repair plan, and the confirmation information is used to instruct the user to determine whether to repair the target fault based on the target repair plan; the repair unit is used to respond to the confirmation indication sent by the user through the management device and repair the target fault according to the target repair plan.

[0029] In a possible implementation, the transceiver unit is used to receive a detection request sent by a management device; the detection request includes: an identifier of a target virtual machine; and the detection request is used to instruct to obtain fault information of a target fault from the target virtual machine.

[0030] In a third aspect, a computing device is provided, which includes a processor and a memory, wherein the memory and the processor are electrically connected; the memory is used to store program instructions, and the processor executes the program instructions to implement the method of the first aspect and its possible implementation methods.

[0031] In a fourth aspect, a computing system is provided, which includes: a management device and a computing device as in the third aspect; the management device is connected to the computing device via a network; the management device is used to send a detection request to the computing device, the detection request including: an identifier of a target virtual machine; the detection request is used to indicate obtaining fault information of a target fault from the target virtual machine.

[0032] In a fifth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions. When the computer instructions in the computer-readable storage medium are executed by a computing device, the computing device executes the method of the first aspect and its possible implementation methods.

[0033] In a sixth aspect, a computer program product comprising instructions is provided, which, when executed on a computing device, enables the computing device to execute the method of the above-mentioned first aspect and its possible implementation methods.

[0034] It should be understood that the beneficial effects achieved by the technical solutions of the second to sixth aspects of the embodiments of the present application and the corresponding possible implementation methods can be referred to the technical effects of the first aspect and its corresponding possible implementation methods mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 A schematic diagram of a management system provided in an embodiment of the present application;

[0036] Figure 2 A schematic diagram of the hardware structure of a computing device provided in an embodiment of the present application;

[0037] Figure 3 A schematic diagram of a system architecture of a virtual machine and an OS provided in an embodiment of the present application;

[0038] Figure 4 A schematic diagram of a virtual machine fault repair method flow chart provided in an embodiment of the present application;

[0039] Figure 5 A schematic diagram of a virtual machine management interface provided in an embodiment of the present application;

[0040] Figure 6 A schematic diagram of allocating CPU resources to a virtual machine provided in an embodiment of the present application;

[0041] Figure 7 A schematic diagram of another virtual machine fault repair method flow chart provided in an embodiment of the present application;

[0042] Figure 8 A schematic diagram of another virtual machine management interface provided in an embodiment of the present application;

[0043] Fig. 9A schematic diagram of a flow chart of another virtual machine fault repair method provided in an embodiment of the present application;

[0044] Fig.10 A schematic diagram of another virtual machine fault repair method flow chart provided in an embodiment of the present application;

[0045] Fig.11 A schematic diagram of the structure of a repair device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0047] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0048] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more. For example, multiple host machines refer to two or more host machines; multiple virtual machines refer to two or more virtual machines.

[0049] First, some concepts involved in a virtual machine fault repair method, a computing device, and a computing system provided in an embodiment of the present application are explained as follows:

[0050] Virtual machine: refers to a complete computer system with complete hardware system functions that is simulated by software and runs in a completely isolated environment. Any work that can be done in a physical computer can be done in a virtual machine. When creating a virtual machine in a computer, part of the hard disk and memory capacity of the physical machine needs to be used as the hard disk and memory capacity of the virtual machine. Each virtual machine has an independent hard disk and operating system, and can be operated like a physical machine.

[0051] Host machine: A physical computing device that runs a virtual machine in virtualization technology. The host machine can be a server, desktop computer, laptop, or other device with processing and storage capabilities.

[0052] Simulated serial port: a serial port simulated based on a shared area (including shared files or shared memory) between the host and the target virtual machine; wherein the host and the virtual machine jointly monitor the shared area (such as a shared file). When the virtual machine needs to send fault information to the host, the virtual machine writes the fault information to the shared file through the IO stream. At this time, the host detects the writing of the fault information, and the host reads the fault information from the shared file through the IO stream; thereby realizing communication between the host and the virtual machine.

[0053] Shared files: files that can be directly read and written by both the host and virtual machines.

[0054] The inventor found that when the above-mentioned fault is a network fault in the faulty virtual machine, the faulty virtual machine may not be able to form a local area network with the switch, resulting in the faulty virtual machine being unable to communicate with the management device through the switch, thereby reducing the success rate of repairing the virtual machine fault; in order to solve this problem, the embodiment of the present application provides a virtual machine fault repair method, in which the fault information of the target fault is obtained from the target virtual machine through a simulated serial port; then, a target repair scheme for repairing the target fault is determined from a fault knowledge base, wherein the fault knowledge base includes a corresponding relationship between the fault and the repair scheme; finally, the target fault is repaired according to the target repair scheme. Since in the fault repair process, the host machine and the target virtual machine running on it transmit data through a simulated serial port, and the simulated serial port is a serial port simulated between the operating system of the host machine and the target virtual machine, the host machine and the target virtual machine do not rely on the network when communicating based on the simulated serial port; and the target repair scheme is determined by the host machine from the fault knowledge base, so it is not necessary for the management device to send the repair scheme to the target virtual machine. It can be seen that the virtual machine fault repair method provided by the embodiment of the present application does not require the intervention of the network, thereby improving the success rate of repairing the network fault of the virtual machine.

[0055] The virtual machine fault repair method provided in the embodiment of the present application is applied in the following Figure 1 In the management system shown, the management system includes: a host machine 101 , a host machine 102 , a host machine 103 and a management device 104 .

[0056] The management device 104 is used to send a detection request to a target host machine among the host machines 101-103, wherein the detection request includes the identifier of the target virtual machine running on the target host machine, and the target virtual machine in the detection request is specified by the user in the above-mentioned management device 104. Among them, taking the host machine 101 as the target host machine as an example, the target virtual machine in the host machine 101 is the virtual machine that needs to repair a fault (such as a network fault) among multiple virtual machines running on the host machine 101. Among them, the management device 104 is connected to the host machines 101-103 respectively through the network (such as: establishing a network connection based on a socket); specifically, the management device 104 can be a computing device with processing capabilities such as a server and a computer.

[0057] The host machine 101 is used to receive a detection request sent by the management device 104, and the detection request includes: an identifier of a target virtual machine in the host machine 101; then, the host machine 101 obtains fault information of a target fault occurring on the target virtual machine from the target virtual machine through an analog serial port between the host machine 101 and the target virtual machine; then, the host machine 101 determines a target repair plan for repairing the target fault, and repairs the target fault in the target virtual machine based on the target repair plan.

[0058] It should be noted that the virtual machines (such as virtual machine 1012) on the host machine 101 all run on the operating system of the host machine 101, and the virtual machine 1012 communicates with the host machine 101 based on the simulated serial port; wherein the simulated serial port is a serial port simulated between the host machine 101 and the virtual machine 1012;

[0059] Among them, multiple virtual machines such as virtual machine 1011, virtual machine 1012, virtual machine ... and virtual machine 101x are running on the host machine 101. The multiple virtual machines can be virtual machines with Windows operating system or virtual machines with Linux operating system. Specifically, the host machine 101 can be a computing device with computing and storage capabilities such as a desktop computer, a notebook, and a server.

[0060] It should be understood that the relevant descriptions of host machines 102 and 103 are similar to the relevant descriptions of the above-mentioned host machine 101. For the specific descriptions of host machines 102 and 103, refer to the relevant descriptions of the above-mentioned host machine 101, which will not be repeated here.

[0061] Optionally, the above-mentioned management system may also include only a host machine and a virtual machine running on the host machine; the virtual machine sends a fault identifier to the host machine through a simulated serial port, and then the host machine determines a target repair solution from a fault knowledge base based on the fault identifier, and then the host machine sends the target repair solution to the target virtual machine through the simulated serial port.

[0062] It should be noted that the virtual machine fault repair method provided in the embodiment of the present application is applied to the scenario of repairing faults in the virtual machines in the above-mentioned management system; the above-mentioned management system is described by taking the host machines including host machines 101-host machines 103 as an example, and in actual applications, the management system may include at least one host machine; similarly, the management system is described by taking the example of multiple virtual machines running on the host machine, and in actual applications, at least one virtual machine can run on the host machine.

[0063] For example, Figure 2 It is a schematic diagram of a hardware structure of a computing device of host machine 101, host machine 102 or host machine 103. The computing device may be a server; for example, from a structural point of view, the server may be a rack server or a whole cabinet server, etc. From a performance point of view, it may be a general-purpose server or a GPU (graphics processing unit) server, etc.

[0064] The hardware part of the computing device includes a central processing unit (CPU), an out-of-band controller and a memory, and the software part mainly includes an out-of-band management module and an operating system (OS).

[0065] The out-of-band management module runs in the out-of-band controller, and the OS runs on the processor (such as Figure 2 The out-of-band management module may be a management unit of a non-business module. For example, the out-of-band management module may remotely maintain and manage the computing device through a dedicated data channel. The out-of-band management module is completely independent of the operating system of the computing device and may communicate with the OS through the out-of-band management interface of the computing device. The OS runs virtual machines, specifically including: virtual machine_1 to virtual machine_N.

[0066] For example, the system architecture between the virtual machine_1 and the OS running on the CPU of the host machine is as follows: Figure 3 As shown, virtual machine_1 includes a monitoring service, wherein the monitoring service is used to create a simulated serial port between the virtual machine_1 and the OS when the virtual machine_1 is initialized, and receive a query request sent by the OS through the simulated serial port; the monitoring service is also used to send fault information of the fault occurring on the virtual machine_1 to the OS in response to the query request; wherein the simulated serial port is used to provide a virtual serial port channel for the virtual machine to interact with the host machine, and the above fault information includes a fault identifier.

[0067] A fault management service runs in the above OS, and the fault management service is used to receive fault information of the fault sent by the monitoring service, and then determine a repair plan for repairing the fault from a fault knowledge base, and repair the above fault based on the repair plan.

[0068] It should be noted that the above-mentioned simulated serial port is a serial port simulated between the above-mentioned OS and virtual machine_1. Specifically, the simulated serial port is a serial port simulated based on the shared area (such as: shared file) between the host machine's OS and virtual machine_1; the implementation logic of the virtual machine serial port is: the above-mentioned fault management service and monitoring service both monitor the shared file, and the shared file is a shared file used to transmit fault information and repair solutions among the multiple shared files between the above-mentioned host machine and virtual machine_1; when the monitoring service needs to send fault information of the fault to the fault management service, the monitoring service writes the fault information into the shared file. At this time, the fault management service detects that new fault information has been added to the shared file, then the fault management service reads the newly added fault information from the shared file; similarly, the implementation method when the fault management service needs to send a repair solution to the monitoring service is similar to the above, and will not be repeated here. The above-mentioned simulated serial port creation method can be achieved by encapsulating the above-mentioned implementation logic into a serial port.

[0069] Exemplarily, the out-of-band management module may include a management unit for computing the running status of the device, a management system in a management chip outside the in-band controller, a system management module (system management mode, SMM), etc. It should be noted that the embodiments of the present application do not limit the specific form of the out-of-band management module, and the above is only an exemplary description.

[0070] Among them, memory is also called internal memory or main memory.

[0071] It should be noted that the system architecture and application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of the system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0072] The present application embodiment provides a virtual machine fault repair method, which is applied to the above Figure 1 In any host machine in the management system shown; Figure 4 As shown, the method includes: S110-S130.

[0073] S110. Obtaining fault information of a target fault from a target virtual machine through a simulated serial port.

[0074] A virtual machine is running on the above-mentioned host machine (i.e., the OS of the host machine), and the virtual machine communicates with the OS of the host machine through a simulated serial port; wherein, the simulated serial port is a virtual serial port channel created by the virtual machine when it is initialized to provide the virtual machine with the OS of the host machine for interaction; wherein, the simulated serial port is a serial port in simulated form between the OS of the host machine and the virtual machine.

[0075] In one implementation, the simulated serial port is a serial port simulated based on a shared area between the host machine's OS and the virtual machine, wherein the shared area may be a shared memory between the host machine and the virtual machine, or a shared file between the host machine and the virtual machine. The specific embodiment of the present application does not limit the specific form of the shared area.

[0076] The target virtual machine is a virtual machine that needs to be repaired among the virtual machines running on the host machine; for example, assuming that virtual machine_1 and virtual machine_2 are running on the host machine, when the host machine needs to repair the fault on virtual machine_1, virtual machine_1 is the target virtual machine.

[0077] The target failure is a failure that occurs on the target virtual machine; for example, when an IP conflict failure occurs on the target virtual machine, the target failure is an IP conflict failure.

[0078] The fault information of the target fault includes the target fault identifier.

[0079] The above-mentioned S110 may be implemented in such a way that the OS of the host machine sends a query request to the target virtual machine, and the target virtual machine responds to the query request by sending fault information of the target fault occurring thereon to the OS of the host machine, wherein the fault information includes the target fault identifier; or after a preset number of target faults occur on the target virtual machine, the target virtual machine actively sends the fault information of the target fault to the OS of the host machine through the above-mentioned simulated serial port. The specific implementation of S110 is not limited in the embodiments of the present application.

[0080] It should be noted that the method for obtaining the fault information of the above-mentioned target fault can be: the target virtual machine obtains the fault information of the above-mentioned target fault from the log of the target virtual machine (such as: system log) based on a preset regular expression; wherein the preset regular expression is a regular expression used to obtain fault information from the above-mentioned log (such as: the preset regular expression is a regular expression used to obtain the identifier of the fault). The method for obtaining the fault information of the above-mentioned target fault can also be: the target virtual machine sends the log of the target virtual machine or the fault log in the log to the OS of the host machine, and the OS of the host machine obtains the fault information of the above-mentioned target fault from the log based on the above-mentioned preset regular expression; the specific embodiment of the present application does not limit the execution subject of obtaining the fault information of the target fault from the above-mentioned log.

[0081] In the implementation of S110, the OS of the host machine sends a query request to the target virtual machine to obtain the fault information of the target fault. There are two ways to trigger the OS of the host machine to send a query request to the target virtual machine, which are as follows:

[0082] In one implementation, the query request is a request triggered after the user specifies the target virtual machine on the host machine; specifically, the query request is triggered after the user accesses the virtual machine management interface on the host machine and selects the target virtual machine in the virtual machine management interface; wherein the virtual machine management interface includes all virtual machines running on the host machine.

[0083] For example, assuming that the virtual machine management interface is Figure 5 As shown, the interface includes virtual machines 1 to 4 running on the host machine; wherein the number of faults in virtual machine 1 is 4, the number of faults in virtual machine 2 is 2, the number of faults in virtual machine 3 is 1, and the number of faults in virtual machine 4 is 1. After the user selects virtual machine 1 on the interface, clicks the OK button to trigger the above query request, which includes the identifier of virtual machine 1; after the host machine obtains the identifier of the target virtual machine specified by the user (ie: virtual machine 1), it sends the above query request to virtual machine 1.

[0084] In another implementation, the above-mentioned query request is a query request sent by the host machine's OS to the target virtual machine after the user specifies the target virtual machine on the management device; the management device is a device that manages the host machine, and its specific implementation process is described in S210-S220 below, which will not be repeated here.

[0085] Optionally, a fault management service is running in the host machine, and a monitoring service is running in each of the virtual machines; the monitoring service creates the simulated serial port when the virtual machine in which it is located is started. The monitoring service in each virtual machine interacts with the fault management service in the host machine based on the simulated serial port; based on this, the implementation method of S110 includes: the fault management service running in the host machine obtains the fault information of the target fault from the monitoring service in the target virtual machine through the simulated serial port.

[0086] It should be noted that the above-mentioned fault management service can be an independent application in the host machine, or it can be a functional module (such as VMtools-extend) in an application in the host machine (such as VMtools); similarly, the monitoring service in the virtual machine can be an independent application or process, or it can be a functional module in an application or process in the virtual machine (such as the internal daemon VM-agent).

[0087] S120: Determine a target repair solution for repairing a target fault from a fault knowledge base.

[0088] The above-mentioned fault knowledge base includes the correspondence between faults and repair solutions, that is, the fault knowledge base includes fault identifiers and repair solutions corresponding to the fault identifiers. For example, the above-mentioned fault knowledge base includes 3 fault identifiers and 3 repair solutions as shown in Table 1 below; the 3 fault identifiers include: IP conflict, network service downtime, and storage block write failure; the 3 repair solutions include: Solution 1 (reconfigure IP address), Solution 2 (restart network service), and Solution 3 (change block); among which, the repair solution corresponding to the IP conflict failure is Solution 1, the repair solution corresponding to the network service downtime failure is Solution 2, and the repair solution corresponding to the storage block write failure is Solution 3.

[0089] Table 1

[0090] Fault identification Repair plan IP conflict Solution 1 (reconfigure IP address) Network service downtime Solution 2 (Restart the network service) Storage block write failure Solution 3 (change block)

[0091] The implementation method of the above S120 includes: the host machine determines the repair solution corresponding to the target fault identifier in the fault knowledge base as the target repair solution. For example, the fault knowledge base is shown in Table 1 above, and assuming that the above target fault identifier is an IP conflict, the host machine determines Solution 1 (reconfiguring the IP address) corresponding to the IP conflict fault as the target repair solution.

[0092] It should be noted that the above-mentioned fault knowledge base can be stored in the above-mentioned host machine, and can also be stored in other computing devices other than the host machine. When the fault knowledge base is stored in the above-mentioned host machine, the host machine directly determines the above-mentioned target repair plan locally; when the fault knowledge base is stored in the above-mentioned other computing devices, the host machine sends the above-mentioned target fault identifier to the other device, so that the other device determines the target repair plan according to the target fault identifier, and sends the target repair plan to the host machine; the specific embodiments of the present application do not specifically limit it.

[0093] S130. Repair the target fault according to the target repair plan.

[0094] It should be understood that the resources on the virtual machine (such as CPU resources, memory resources and network resources) are allocated to the virtual machine by the host machine; Figure 6As shown, taking CPU resources as an example, the allocation process specifically includes: the host machine virtualizes the resources in the physical CPU on it through a virtual machine monitor (such as: qemu) to obtain multiple virtual CPU resources (such as: virtual CPU resources_1 to virtual CPU resources_N); wherein each virtual CPU resource corresponds to part of the resources in the physical CPU; then, the host machine allocates part of the virtual CPU resources (such as: virtual CPU resources_1 and virtual CPU resources_2) among the multiple virtual CPU resources to virtual machine_1, so that virtual machine_1 uses virtual CPU resources_1 and virtual CPU resources_2 as its CPU to run its business.

[0095] Based on this, in one implementation, the specific implementation of the above S130 includes: the host machine repairs the target fault in the virtual machine based on the target repair solution.

[0096] For example, assuming that the target failure is an IP conflict failure, since the target virtual machine runs on the host machine, the host machine reallocates the IP address of the target virtual machine by modifying the configuration file of the target virtual machine to resolve the IP conflict failure in the target virtual machine. Assuming that the target failure is a network service downtime, since the target virtual machine runs on the host machine, the host machine restarts the network service in the target virtual machine to resolve the network service downtime failure in the target virtual machine. Assuming that the target failure is a storage block (such as storage block A) write failure, since the virtual storage block in the target virtual machine is mapped from the physical storage block in the host machine; the host machine establishes a mapping relationship between the virtual storage block and the fault-free physical storage block to resolve the storage block write failure in the target virtual machine.

[0097] In another implementation, the specific implementation of the above S130 is that the host machine sends the above target repair plan to the target virtual machine, so that the target virtual machine repairs the target fault thereon based on the target repair plan. The specific implementation method is shown in the following S250-S260 and will not be repeated here.

[0098] In another implementation, the specific implementation of the above S130 is that the host machine determines the execution subject of the target repair plan according to the fault type of the target fault; wherein, when the fault type of the target fault is the first preset fault type, the above target repair plan is executed through the target virtual machine; when the fault type of the target fault is the second preset fault type, the above target repair plan is executed through the host machine; its specific implementation method refers to the following S330-S360, which will not be repeated here.

[0099] The embodiment of the present application provides a virtual machine fault repair method, in which the host machine obtains the fault information of the target fault from the target virtual machine through a simulated serial port, and the fault information includes a target fault identifier; then, the host machine determines the target repair solution for repairing the target fault from the fault knowledge base, wherein the fault knowledge base includes the corresponding relationship between the fault and the repair solution; finally, the host machine repairs the target fault according to the target repair solution. Since in the fault repair process, the host machine and the target virtual machine running on it transmit data through the simulated serial port, and the simulated serial port is a serial port simulated between the host machine and the target virtual machine, the communication between the host machine and the target virtual machine based on the simulated serial port does not rely on the network; and the target repair solution is determined by the host machine from the fault knowledge base, so it is not necessary for the management device to send the repair solution to the target virtual machine. It can be seen that the virtual machine fault repair method provided by the embodiment of the present application does not require the intervention of the network, thereby improving the success rate of repairing the network fault of the virtual machine.

[0100] Based on the above Figure 4 The virtual machine fault repair method shown in the embodiment of the present application provides a specific implementation method, such as Figure 7 The method shown includes: S210-S260.

[0101] S210: The management device sends a detection request to the host machine in response to a target operation of the user in the virtual machine management interface.

[0102] The detection request is used to instruct automatic repair of a fault in a target virtual machine running on a host machine (ie, the OS of the host machine); the detection request includes an identifier of a target virtual machine that needs to be repaired, and the target virtual machine is a virtual machine running in the host machine.

[0103] The above-mentioned management device is a device for managing a host machine, wherein the management device interacts with the host machine via a network.

[0104] The virtual machine management interface is an interface output (ie, displayed) by the management device, and includes: all hosts managed by the management device and all virtual machines running on each host managed by the management device.

[0105] The above target operation is an operation in which a user selects a virtual machine that needs to be repaired on a virtual machine management interface.

[0106] For example, it is assumed that the virtual machine management interface output by the management device is as follows: Figure 8As shown, the management interface includes: host A and host B managed by the management device. Host A runs virtual machine_1 and virtual machine_2; wherein the number of faults in virtual machine_1 is 4, and the number of faults in virtual machine_2 is 1. Host B runs virtual machine_3 and virtual machine_4; wherein the number of faults in virtual machine_3 is 2, and the number of faults in virtual machine_4 is 1. When the target operation input by the user on the virtual machine management interface includes: selecting virtual machine_3 and clicking the OK button; the target operation is used to instruct to repair the fault in virtual machine_3 running in host B, that is, the user specifies the target virtual machine in host B as virtual machine_3 through the management device.

[0107] The specific implementation of the above S210 includes: the management device receives the above target operation input by the user on the virtual machine management interface, and then, in response to the target operation, the management device sends a detection request including the identifier of the target virtual machine to the host machine through the network connection between the host machine and the management device.

[0108] It should be understood that the management device sends the detection request to the host machine, and correspondingly, the host machine receives the detection request from the management device. After the host machine receives the detection request, the following S220 is executed.

[0109] S220 . The OS of the host machine responds to the detection request by sending a query request to the target virtual machine through the simulated serial port.

[0110] The query request is used to instruct the target virtual machine to query the fault that occurs thereon.

[0111] It should be noted that the simulated serial port in the above S220 is consistent with the simulated serial port in S110. For the specific description of the simulated serial port in S220, reference may be made to the relevant description in the above S110, which will not be repeated here.

[0112] It should be understood that the OS of the host machine sends a query request to the target virtual machine, and correspondingly, the target virtual machine receives the query request from the OS of the host machine. After the target virtual machine receives the query request, the following S230 is executed.

[0113] S230 . The target virtual machine responds to the query request by sending fault information of the target fault to the OS of the host machine through the simulated serial port.

[0114] It should be noted that when a fault occurs in the target virtual machine, the fault information of the fault will be output to the log of the target virtual machine; the log can be the system log of the target virtual machine, or it can be other logs in the target virtual machine except the system log. The specific embodiments of the present application do not specifically limit the above logs.

[0115] The fault information of the above-mentioned target fault includes the target fault identifier; wherein, the fault information is the fault information of the target fault obtained by the target virtual machine from the log of the target virtual machine; its specific implementation method includes: the target virtual machine obtains the above-mentioned fault information from the log of the target virtual machine based on a preset regular expression, and the preset regular expression is a regular expression used to obtain the above-mentioned fault information; for example: the preset regular expression is a regular expression used to obtain the identifier of the fault.

[0116] It should be noted that the implementation method of the above S230 is similar to the implementation method of S220. For the specific description of S230, please refer to the above related description of S220, which will not be repeated here.

[0117] S240: The OS of the host machine determines a target repair solution for repairing the target fault from the fault knowledge base.

[0118] It should be noted that the implementation method of the above S240 is similar to the implementation method of S120. For the specific description of S240, please refer to the above related description of S120, which will not be repeated here.

[0119] S250. The OS of the host machine sends the target repair solution to the target virtual machine through the simulated serial port.

[0120] It should be noted that the implementation method of the above S250 is similar to the implementation method of S220. For the specific description of S250, please refer to the above related description of S220, which will not be repeated here.

[0121] S260: The target virtual machine repairs the target fault based on the target repair solution.

[0122] The specific implementation of the above S260 includes: the target virtual machine repairs the target fault occurring thereon based on the target repair solution.

[0123] For example, assuming that the target failure is an IP conflict failure, the target virtual machine modifies its IP address to resolve the IP conflict failure in the target virtual machine. Assuming that the target failure is a network service downtime, the target virtual machine restarts the network service on it to resolve the network service downtime failure in the target virtual machine. Assuming that the target failure is a storage block (such as storage block A) write failure, since the virtual storage block in the target virtual machine is mapped from the physical storage block in the host machine; the target virtual machine establishes a mapping relationship between the virtual storage block and the fault-free physical storage block to resolve the storage block write failure in the target virtual machine.

[0124] Optionally, after the above S260, the method also includes: the target virtual machine sends the repair result of the above target fault to the management device through the OS of the host machine, and the repair result includes success or failure. The repair result is used by the management device to display it on the above virtual machine management interface, so that the user can promptly know the repair result of the target fault in the target virtual machine, and manually repair the target fault when the repair result is failure, thereby improving the fault repair efficiency while improving the user experience.

[0125] In the embodiment of the present application, the host receives a detection request including the identification of the target virtual machine from the management device, and then the host obtains fault information including the target fault identification from the target virtual machine through the simulated serial port. Thereafter, the host obtains the target repair plan for repairing the target fault from the fault knowledge base, and sends the target repair plan to the target virtual machine through the simulated serial port, so that the target virtual machine repairs the target fault occurring thereon based on the target repair plan. Since the above embodiment sends the target repair plan to the target virtual machine, and allows the target virtual machine to repair the target fault occurring thereon based on the target repair plan; therefore, when there are multiple target virtual machines, the host does not need to repair the target faults on the multiple target virtual machines in turn, thereby improving the efficiency of fault repair while saving processing resources in the host machine.

[0126] In addition, during the fault repair process, the host machine and the target virtual machine running on it transmit data through a simulated serial port, and the simulated serial port is a serial port simulated based on the shared area of ​​the host machine and the target virtual machine. Therefore, when the host machine and the target virtual machine communicate based on the simulated serial port, they do not rely on the network. Therefore, the success rate of repairing the network failure of the virtual machine is improved.

[0127] Based on the above Figure 4 The virtual machine fault repair method shown in the embodiment of the present application provides another virtual machine fault repair method, such as Fig. 9 As shown, the method includes: S310-S360.

[0128] S310 . The OS of the host machine obtains fault information of a target fault from the target virtual machine through a simulated serial port.

[0129] The above-mentioned fault information includes the above-mentioned target fault identifier.

[0130] S320 , the host machine's OS target fault identification determines a target repair solution for repairing the target fault from a fault knowledge base.

[0131] It should be noted that the implementation of the above S310-S320 is similar to the implementation of S110-S120. For the specific description of S310-S320, please refer to the above related description of S110-S120, which will not be repeated here.

[0132] S330: The OS of the host machine determines whether the fault type of the target fault is a first preset fault type.

[0133] The above-mentioned fault types include: a first preset fault type and a second preset fault type; wherein the first preset fault type includes: software faults (such as: an application on a virtual machine cannot be started or a virtual machine crashes) and configuration faults in the virtual machine (such as: an IP conflict fault or a missing configuration fault), that is, the above-mentioned first preset fault type is used to indicate software-related faults; the second preset fault type includes hardware faults (such as: a bad block fault or a dirty data fault), that is, the above-mentioned second preset fault type is used to indicate hardware-related faults.

[0134] In one implementation, the fault knowledge base includes not only the correspondence between faults and repair solutions, but also fault types. In this case, the specific implementation of S330 is that the OS of the host machine directly obtains the fault type of the target fault from the fault knowledge base.

[0135] In another implementation, the specific implementation method of the above S330 is that the OS of the host machine determines the fault type to which the target fault belongs from a preset correspondence, and the preset correspondence includes a correspondence between the fault identifier and the fault type; at this time, the OS of the host machine determines the fault type of the target fault from the preset correspondence according to the target fault identifier.

[0136] In the case that the fault type to which the target fault belongs is the first preset fault type, the OS of the host machine executes the following S340-S350.

[0137] In the case where the fault type to which the target fault belongs is the second preset fault type, the OS of the host machine executes the following S360.

[0138] S340. The OS of the host machine sends the target repair solution to the target virtual machine through the simulated serial port.

[0139] It should be noted that the implementation method of the above S340 is similar to the implementation method of S220. For the specific description of S340, please refer to the above related description of S220, which will not be repeated here.

[0140] S350: The target virtual machine repairs the target fault based on the target repair solution.

[0141] It should be noted that the implementation method of the above S350 is similar to the implementation method of S260. For the specific description of S350, please refer to the above related description of S260, which will not be repeated here.

[0142] S360: The OS of the host machine repairs the target fault based on the target repair solution.

[0143] It should be noted that the virtual hardware resources (such as the virtual CPU) in the virtual machine are mapped from the physical hardware resources (such as the physical CPU) in the host machine; based on this, when there is a fault in the virtual hardware resources in the virtual machine, the OS of the host machine will remap the fault-free physical hardware resources to the virtual hardware resources of the virtual machine. For its specific implementation, please refer to the relevant description of the host machine repairing the target fault in the virtual machine based on the target repair plan in S130, which will not be repeated here.

[0144] In the above embodiment, the OS of the host machine obtains fault information including a target fault identifier from the target virtual machine through a simulated serial port, and obtains a target repair solution for modifying the target fault from a fault knowledge base; then, when the target fault belongs to a first preset fault type, the OS of the host machine sends the target repair solution to the target virtual machine, so that the target virtual machine repairs the target fault based on the target repair solution; when the target fault belongs to a second preset fault type, the OS of the host machine modifies the target fault in the target virtual machine based on the target repair solution; wherein, the first preset fault includes software faults in the virtual machine and configuration faults in the virtual machine, and the second preset fault type includes hardware faults. Since the OS of the above host machine determines the execution subject for repairing the target fault according to the type of the target fault, the problem that the OS of the host machine cannot repair software faults in the virtual machine is solved, thereby improving the success rate of fault repair.

[0145] In addition, during the fault repair process, the host machine's OS and the target virtual machine running on it transmit data through a simulated serial port, and the simulated serial port is a serial port simulated based on the shared area of ​​the host machine and the target virtual machine. Therefore, when the host machine and the target virtual machine communicate based on the simulated serial port, they do not rely on the network. Therefore, the success rate of repairing the virtual machine's network failure is improved.

[0146] Based on the above Figure 4 The virtual machine fault repair method shown in the embodiment of the present application provides another virtual machine fault repair method, such as Fig.10 As shown, the method includes: S410-S470.

[0147] S410. Obtaining fault information of a target fault from a target virtual machine through a simulated serial port.

[0148] The above-mentioned fault information includes the above-mentioned target fault identifier.

[0149] S420: Determine whether there is a target repair solution for repairing the target fault in the fault knowledge base.

[0150] It should be noted that the implementation of the above S410-S420 is similar to the implementation of S110-S120. For the specific description of S410-S420, please refer to the above related description of S110-S120, which will not be repeated here.

[0151] When the target repair solution does not exist in the fault knowledge base, the host machine executes the following S430.

[0152] When there is a target repair solution in the fault knowledge base, the host machine executes the following S440.

[0153] S430: Send an alarm message to a management device.

[0154] The above-mentioned alarm information is used to indicate that the target repair solution corresponding to the above-mentioned target fault does not exist in the above-mentioned fault knowledge base; wherein, the alarm information includes the fault information of the above-mentioned target fault.

[0155] It should be understood that the host machine sends the alarm information to the management device via a network connection between the host machine and the management device.

[0156] In the above embodiment, when there is no target repair solution corresponding to the target fault in the fault knowledge base, the host machine sends an alarm message to the management device to let the user know in time that the target repair solution does not exist in the fault knowledge base, so that the user can manually repair the fault in time, thereby improving the user experience.

[0157] S440: Determine whether the solution type of the target repair solution is automatic repair.

[0158] The above-mentioned repair scheme types include: automatic repair and manual repair; among them, the repair scheme with the automatic repair type is a scheme in which the host machine or virtual machine can repair the target fault according to the repair scheme; the repair scheme with the manual repair type is a scheme that requires human intervention to repair the target fault.

[0159] In one implementation, the fault knowledge base includes not only the correspondence between faults and repair solutions, but also the type of repair solution. In this case, the specific implementation of S440 is that the host machine directly obtains the type of the target repair solution from the fault knowledge base.

[0160] In another implementation, the specific implementation method of the above S440 is that the host machine determines the solution type corresponding to the target repair solution from the target correspondence relationship, and the target correspondence relationship includes the correspondence between the repair solution and the solution type; at this time, the OS of the host machine determines the solution type of the target repair solution from the target correspondence relationship according to the identifier of the target repair solution.

[0161] Exemplarily, assume that the above target correspondence includes 4 repair solutions and 2 solution types as shown in Table 2 below; the 4 repair solutions include: Solution 1 (reconfigure IP address), Solution 2 (restart network service), Solution 3 (change block) and Solution 4 (change memory stick); the 2 solution types include automatic repair and manual repair; wherein, the solution type corresponding to Solution 1 is automatic repair, the solution type corresponding to Solution 2 is automatic repair, the solution type corresponding to Solution 3 is automatic repair, and the solution type corresponding to Solution 4 is manual repair. Then, when the above target repair solution is any one of Solutions 1 to 3, the solution type of the target repair solution is automatic repair. When the above target repair solution is Solution 4, the solution type of the target repair solution is manual repair.

[0162] Table 2

[0163] Repair plan Solution Type Solution 1 (reconfigure IP address) Automatic repair Solution 2 (Restart the network service) Automatic repair Solution 3 (change block) Automatic repair Solution 4 (Replace the memory stick) Manual fix

[0164] When the solution type of the target repair solution is manual repair, the host machine executes the following S450.

[0165] When the solution type of the above-mentioned target repair solution is automatic repair, the host machine executes the following S460-S470.

[0166] S450: Sending fault information including target fault and indication information of target repair solution to the management device.

[0167] The above-mentioned instruction information is used to instruct the user to manually repair the target fault indicated by the above-mentioned fault information based on the target repair solution; wherein, the instruction information includes the fault information of the target fault and the target repair solution.

[0168] It should be noted that the implementation method of the above S450 is similar to the implementation method of S430. For the specific description of S450, please refer to the above related description of S430, which will not be repeated here.

[0169] S460: Sending the fault information including the target fault and confirmation information of the target repair solution to the management device.

[0170] The confirmation information is used by the user to determine whether to repair the target fault indicated by the fault information based on the target repair solution.

[0171] It should be noted that the implementation method of the above S460 is similar to the implementation method of S430. For the specific description of S460, please refer to the above related description of S430, which will not be repeated here.

[0172] In the above embodiment, after determining the target repair plan, the host machine sends fault information including the target fault and confirmation information of the target repair plan to the management device, so that the user can determine through the confirmation information whether the host machine repairs the target fault indicated by the above fault information based on the target repair plan, thereby improving the accuracy of the target repair plan and further improving the accuracy of fault repair.

[0173] S470: In response to a confirmation instruction sent by the user through the management device, repair the target fault according to the target repair solution.

[0174] The confirmation indication is used to indicate that the user has confirmed that the host machine has repaired the target fault according to the target repair solution.

[0175] It should be noted that the implementation method of the above S470 is similar to the implementation method of S130. For the specific description of S470, please refer to the above related description of S130, which will not be repeated here.

[0176] In the above embodiment, the host machine obtains the fault information of the target fault from the target virtual machine through the simulated serial port; then, the host machine determines the target repair plan from the fault knowledge base; when the plan type of the target repair plan is automatic repair, the host machine repairs the target fault in the target virtual machine based on the target repair plan; when the plan type of the target repair plan is manual repair, the host machine sends the target repair plan to the management device, so that the user can manually repair the above target fault based on the target repair plan; when there is no target repair plan corresponding to the target fault in the fault knowledge base, the host machine sends an alarm message to the management device to let the user know in time that there is no target repair plan in the fault knowledge base, so that the user can manually repair the fault in time. Since in the fault repair process, the host machine and the target virtual machine running on it transmit data through the simulated serial port, and the simulated serial port is a serial port simulated based on the shared area of ​​the host machine and the target virtual machine, the communication between the host machine and the target virtual machine based on the simulated serial port does not rely on the network, thereby improving the success rate of repairing the network fault of the virtual machine.

[0177] In addition, when the solution type of the target repair solution is manual repair, the host machine sends the target repair solution to the management device so that the user can manually repair the above-mentioned target fault based on the target repair solution. The user is not required to determine the specific repair solution based on the fault information of the target fault. Therefore, while improving the user experience, the efficiency of repairing faults is also improved.

[0178] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0179] The embodiment of the present application can divide the functional modules of the host machine according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.

[0180] In the case of dividing each functional module into corresponding functional modules, Fig.11 A possible structural schematic diagram of the repair device involved in the above embodiment is shown. Fig.11 As shown, the repairing device includes: a transceiver unit 1101, a determination unit 1102 and a repairing unit 1103.

[0181] The transceiver unit 1101 is used to obtain the fault information of the target fault from the target virtual machine through the simulated serial port; for example, execute step S110 in the above method embodiment.

[0182] The determining unit 1102 is used to determine a target repair solution for repairing a target fault from a fault knowledge base; for example, executing step S120 in the above method embodiment.

[0183] The repair unit 1103 is used to repair the target fault according to the target repair solution; for example, execute step S130 in the above method embodiment.

[0184] Optionally, the transceiver unit 1101 is used to send a target repair solution to the target virtual machine through the simulated serial port when the target fault belongs to the first preset fault type; for example, execute step S340 in the above method embodiment.

[0185] The repair unit 1103 is used to call the target virtual machine to repair the target fault based on the target repair solution; for example, execute step S350 in the above method embodiment.

[0186] or,

[0187] The repair unit 1103 is used to call the OS to repair the target fault based on the target repair solution when the target fault belongs to the second preset fault type; for example, execute step S360 in the above method embodiment.

[0188] Optionally, the repair unit 1103 is configured to repair the target fault according to the target repair solution when there is a target repair solution in the fault knowledge base and the solution type of the target repair solution is automatic repair.

[0189] Optionally, the repair unit 1103 is used to send indication information to the management device when there is a target repair solution in the fault knowledge base and the solution type of the target repair solution is manual repair; for example, execute step S450 in the above method embodiment.

[0190] Optionally, the repair unit 1103 is configured to send an alarm message to the management device when there is no target repair solution in the fault knowledge base; for example, executing step S430 in the above method embodiment.

[0191] Optionally, the transceiver unit 1101 is used to send confirmation information to the management device; for example, execute step S460 in the above method embodiment.

[0192] The repair unit 1103 is used to repair the target fault according to the target repair solution in response to the confirmation instruction sent by the user through the management device; for example, execute step S470 in the above method embodiment.

[0193] Optionally, the transceiver unit 1101 is used to receive a detection request sent by a management device; for example, execute step S210 in the above method embodiment.

[0194] Each unit of the above-mentioned repair device can also be used to perform other actions in the above-mentioned method embodiment. All relevant contents of each step involved in the above-mentioned method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0195] The embodiment of the present application also provides a computing device, including a memory and a processor, the memory being electrically connected to the processor; the memory being used to store program instructions, the processor executing the program instructions to implement the fault repair method of the virtual machine executed by the host machine. In other words, the host machine can be implemented by the computing device.

[0196] An embodiment of the present application provides a computing system, which includes: a management device and a host machine; the management device is connected to the host machine through a network; the above-mentioned management device is used to send a detection request to the host machine, and the detection request includes: an identifier of a target virtual machine; the detection request is used to indicate that fault information of a target fault is obtained from the target virtual machine.

[0197] The embodiment of the present application also provides a computer-readable storage medium on which computer instructions are stored. When the computer instructions are executed on a host machine, the above-mentioned virtual machine fault repair method is implemented.

[0198] For the explanation of the relevant contents and description of the beneficial effects of any of the above-mentioned computer-readable storage media, reference may be made to the above-mentioned corresponding embodiments, which will not be repeated here.

[0199] An embodiment of the present application provides a computer program product, which, when executed on a host machine, enables the host machine to execute the above-mentioned virtual machine fault repair method.

[0200] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instruction is loaded and executed on a computer, the process or function in accordance with the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instruction can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instruction can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) mode or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a magnetic disk, a magnetic tape), an optical medium (eg, a digital video disc (DVD)), or a semiconductor medium (eg, a solid state drive (SSD)).

[0201] Through the description of the above implementation methods, technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0202] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0203] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0204] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0205] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, or all or part of the technical solution. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: flash memory, mobile hard disk, read-only memory, random access memory, disk or optical disk, and other media that can store program codes.

[0206] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for repairing a virtual machine fault, characterized in that: include: Obtaining fault information of a target fault from a target virtual machine through a simulated serial port; wherein the fault information includes the target fault identifier; the simulated serial port is a serial port simulated between an operating system OS of a host machine and the target virtual machine; Determining a target repair solution for repairing the target fault from a fault knowledge base based on the target fault identifier; wherein the target fault is a fault to be repaired in the target virtual machine; and the fault knowledge base includes a correspondence between fault identifiers and repair solutions; The target fault is repaired according to the target repair solution.

2. The method according to claim 1, characterized in that The simulated serial port is a serial port simulated based on a shared area between the OS and the target virtual machine; the shared area includes: a shared memory space or a shared hard disk space.

3. The method according to claim 1 or 2, characterized in that: The repairing the target fault according to the target repair scheme includes: In the case where the target fault belongs to a first preset fault type, sending the target repair solution to the target virtual machine through the simulated serial port; wherein the first preset fault type includes software faults in the virtual machine and configuration faults in the virtual machine; Calling the target virtual machine to repair the target fault based on the target repair solution; or, In the case where the target fault belongs to a second preset fault type, the OS is called to repair the target fault based on the target repair solution; wherein the second preset fault type includes hardware faults.

4. The method according to any one of claims 1 to 3, characterized in that: The repairing the target fault according to the target repair scheme includes: If the target repair solution exists in the fault knowledge base and the solution type of the target repair solution is automatic repair, the target fault is repaired according to the target repair solution.

5. The method according to claim 4, characterized in that The method further comprises: When the target repair solution exists in the fault knowledge base and the solution type of the target repair solution is manual repair, an indication message is sent to a management device; the indication message is used to instruct a user to manually repair the target fault according to the target repair solution, and the indication message includes fault information of the target fault and the target repair solution.

6. The method according to claim 4 or 5, characterized in that: The method further comprises: In the case that the target repair solution does not exist in the fault knowledge base, an alarm message is sent to a management device, where the alarm message includes: fault information of the target fault.

7. The method according to any one of claims 1 to 6, characterized in that: Before repairing the target fault according to the target repair solution, the method further includes: Sending confirmation information to the management device; the confirmation information includes fault information of the target fault and the target repair solution, and the confirmation information is used to instruct the user to determine whether to repair the target fault based on the target repair solution; The repairing the target fault according to the target repair scheme includes: In response to a confirmation instruction sent by a user through the management device, the target fault is repaired according to the target repair solution.

8. The method according to any one of claims 1 to 7, characterized in that: Before acquiring the fault information of the target fault from the target virtual machine through the simulated serial port, the method further includes: A detection request sent by a management device is received; the detection request includes: an identifier of the target virtual machine; the detection request is used to instruct to obtain fault information of the target fault from the target virtual machine.

9. A computing device, characterized in that The computing device includes a memory and a processor; The memory is electrically connected to the processor; The memory is used to store program instructions; The processor is configured to execute the program instructions so that the computing device implements the method according to any one of claims 1 to 8.

10. A computing system, characterized in that: The computing system comprises: a management device and the computing device according to claim 9; the management device and the computing device are connected via a network; The management device is used to send a detection request to the computing device, wherein the detection request includes: an identifier of a target virtual machine; and the detection request is used to instruct to obtain fault information of the target fault from the target virtual machine.

Citation Information

Patent Citations

  • Virtual machine internal and external communication method, virtual machine, physical host, and virtual machine system

    CN108595244A

  • Management method of application programs in virtual machine and server cluster

    CN116089006A

  • Virtual machine operating system jamming detection method and device, equipment and medium

    CN116089015A

  • Cloud platform fault processing method and device, electronic equipment and storage medium

    CN116643906A

  • Virtualized cloud platform fault recovery method, device and equipment and medium

    CN116775361A

Cited By

  • Virtual machine agent-free IP self-healing method suitable for hyper-converged architecture

    CN121357155A