Abnormity detection and recovery method and device of virtual machine and computer readable storage medium

Through SCVMM, the virtual machine status is monitored in real time and repair operations are performed, which solves the operation failure problem of virtual machines due to abnormal state in the cloud deployment environment, and improves the stability and business continuity of the virtual machine.

CN119557045APending Publication Date: 2025-03-04CHINA MERCHANTS BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411484053.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

In a virtualized environment deployed in the cloud, the virtual machine may encounter various abnormal states, such as Paused, Incomplete VM Configuration, Host Not Responding, Missing, Update failed, Migration Failed, etc., resulting in virtual machine operation failure and affecting business continuity.

Method used

The current status information of the virtual machine is obtained in real time through SCVMM to determine whether the virtual machine is in an abnormal state. If it is in an abnormal state, determine the cause of the abnormality and determine the repair strategy based on the reason, and perform the corresponding repair operation.

Benefits of technology

It realizes virtual machine exception detection and automatic repair, avoids virtual machine operation failure caused by abnormal state, and improves the stability and business continuity of the virtual machine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119557045A_ABST
    Figure CN119557045A_ABST
Patent Text Reader

Abstract

The invention discloses an anomaly detection and recovery method and device for a virtual machine and a computer readable storage medium, and the method comprises the steps: obtaining the current state information of the virtual machine in real time through an SCVMM, and determining whether the virtual machine is in an abnormal state or not based on the current state information; if the virtual machine is in the abnormal state, determining an abnormal reason of the virtual machine; and determining a repair strategy corresponding to the virtual machine based on the abnormal reason, and performing repair operation on the virtual machine based on the repair strategy. The state information of the virtual machine is acquired in real time through the SCVMM, the abnormity of the virtual machine is detected according to the state information, the repairing operation of the virtual machine is carried out according to the repairing strategy corresponding to the abnormity reason of the virtual machine, and then automatic repairing of the virtual machine is carried out by adopting different modes according to different abnormal states. The problem that the virtual machine cannot be operated due to the abnormal state of the virtual machine is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of information system operation and maintenance management, and in particular to a method and device for detecting and recovering anomalies of a virtual machine, and a computer-readable storage medium. Background Art

[0002] As the enterprise infrastructure shifts from traditional local deployment to cloud deployment, cloud computing platform-based solutions have become the needs of enterprise management to meet business strategies. Virtualization technology has expanded the utilization efficiency of hardware. Through CPU virtualization and virtualization of peripheral components such as IO devices, a physical machine is allowed to run multiple virtual server units at the same time, which significantly improves computer work efficiency while also bringing about a massive increase in server management objects.

[0003] With the widespread application of virtualization technology, the stability and reliability of virtual machines have become key factors. HyperV, a virtualization technology launched by Microsoft, manages virtual machines efficiently through SCVMM (System Center Virtual Machine Manager). However, due to the instability of the underlying environment, virtual machines may encounter various abnormal states, such as Paused, Incomplete VM Configuration, Host Not Responding, Missing, Update failed, Migration Failed, etc. These abnormal states will cause virtual machine operation failures and affect business continuity.

[0004] Therefore, how to detect and repair virtual machine anomalies is a problem that needs to be solved urgently. Summary of the invention

[0005] The main purpose of the present application is to provide a method, device and computer-readable storage medium for detecting and recovering anomalies of a virtual machine, aiming to solve the technical problem of how to detect anomalies of a virtual machine and repair the anomalies.

[0006] To achieve the above object, the present application provides a method for detecting and recovering an abnormality of a virtual machine, the method comprising the following steps:

[0007] Acquire the current status information of the virtual machine in real time through the SCVMM, and determine whether the virtual machine is in an abnormal state based on the current status information;

[0008] If the virtual machine is in an abnormal state, determining the abnormal cause of the virtual machine;

[0009] A repair strategy corresponding to the virtual machine is determined based on the abnormal cause, and a repair operation is performed on the virtual machine based on the repair strategy.

[0010] Further, the step of determining a repair strategy corresponding to the virtual machine based on the abnormal cause, and performing a repair operation on the virtual machine based on the repair strategy includes:

[0011] If the abnormality is caused by the loss of virtual machine configuration, performing a migration operation on the virtual machine based on the repair strategy;

[0012] When the migration operation is completed, a refresh operation is performed on the virtual machine.

[0013] Further, the step of determining a repair strategy corresponding to the virtual machine based on the abnormal cause, and performing a repair operation on the virtual machine based on the repair strategy includes:

[0014] If the cause of the abnormality is an underlying storage failure, restarting the virtualization management component corresponding to the virtual machine;

[0015] The virtualization management component restarts the virtual machine when the restart is completed, and performs a refresh operation on the virtual machine when the restart of the virtual machine is completed.

[0016] Further, the step of determining a repair strategy corresponding to the virtual machine based on the abnormal cause, and performing a repair operation on the virtual machine based on the repair strategy includes:

[0017] If the cause of the abnormality is that the virtual machine configuration is damaged, a repair operation is performed on the virtual machine, and when the repair operation is completed, it is determined whether the virtual machine is successfully repaired;

[0018] When the virtual machine is not repaired successfully, performing a migration operation on the virtual machine, and when the migration operation is completed, performing a refresh operation on the virtual machine;

[0019] When the refresh operation is completed, a repair operation is performed on the virtual machine.

[0020] Further, the step of determining a repair strategy corresponding to the virtual machine based on the abnormal cause, and performing a repair operation on the virtual machine based on the repair strategy includes:

[0021] If the abnormal reason is the loss of the virtual machine, restart the virtual machine.

[0022] Further, the step of determining whether the virtual machine is in an abnormal state based on the current state information includes:

[0023] Compare the current state information with a preset normal state corresponding to the virtual machine to determine whether the current state information matches the preset normal state;

[0024] If the current state information does not match the preset normal state, it is determined that the virtual machine is in an abnormal state.

[0025] Furthermore, if the virtual machine is in an abnormal state, the step of determining the abnormal cause of the virtual machine includes:

[0026] If the virtual machine is in an abnormal state, obtaining log information, virtual machine configuration files, and software configuration information corresponding to the virtual machine;

[0027] Perform log analysis on the log information, and perform configuration check operations on the virtual machine configuration file and software configuration information to determine the abnormal cause of the virtual machine.

[0028] Further, after the step of determining the repair strategy corresponding to the virtual machine based on the abnormality cause and performing a repair operation on the virtual machine based on the repair strategy, the abnormality detection and recovery method of the virtual machine further includes:

[0029] A repair log corresponding to the repair operation is obtained, and the abnormal state, abnormal cause, repair strategy and repair log are stored in association.

[0030] In addition, to achieve the above-mentioned purpose, the present application also provides an abnormality detection and recovery device for a virtual machine, wherein the abnormality detection and recovery device for the virtual machine includes: a memory, a processor, and an abnormality detection and recovery program for the virtual machine stored in the memory and executable on the processor, wherein the abnormality detection and recovery program for the virtual machine implements the steps of the aforementioned abnormality detection and recovery method for the virtual machine when executed by the processor.

[0031] In addition, to achieve the above-mentioned purpose, the present application also provides a computer-readable storage medium, on which a virtual machine anomaly detection and recovery program is stored. When the virtual machine anomaly detection and recovery program is executed by a processor, the steps of the aforementioned virtual machine anomaly detection and recovery method are implemented.

[0032] The present application obtains the current status information of the virtual machine in real time through SCVMM, and determines whether the virtual machine is in an abnormal state based on the current status information; then, if the virtual machine is in an abnormal state, the cause of the abnormality of the virtual machine is determined; then, the repair strategy corresponding to the virtual machine is determined based on the cause of the abnormality, and a repair operation is performed on the virtual machine based on the repair strategy. The status information of the virtual machine is obtained in real time through SCVMM, and the abnormality of the virtual machine is detected according to the status information. The repair operation of the virtual machine is performed according to the repair strategy corresponding to the cause of the abnormality of the virtual machine, and then different methods are used to automatically repair the virtual machine according to different abnormal states. Then, the automatic discovery and repair tool of the abnormal state of the virtual machine managed by SCVMM is used to solve the problem of being unable to operate the virtual machine due to the abnormal state of the virtual machine, so as to achieve the purpose of automated management of the operation and maintenance of massive virtual machines. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0034] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0035] Figure 1 A flowchart of the first embodiment of the abnormality detection and recovery method for a virtual machine of the present application is provided;

[0036] Figure 2 A schematic diagram of the module structure of an abnormality detection and recovery device for a virtual machine according to an embodiment of the present application.

[0037] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0038] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0039] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0040] The main solution of the present application is: to obtain the current status information of the virtual machine in real time through SCVMM, and determine whether the virtual machine is in an abnormal state based on the current status information; if the virtual machine is in an abnormal state, determine the cause of the abnormality of the virtual machine; determine the repair strategy corresponding to the virtual machine based on the cause of the abnormality, and perform repair operations on the virtual machine based on the repair strategy.

[0041] At present, as the enterprise infrastructure shifts from traditional local deployment to cloud deployment, cloud computing platform-based solutions have become the needs of enterprise management to meet business strategies. Virtualization technology has expanded the utilization efficiency of hardware. Through CPU virtualization and virtualization of peripheral components such as IO devices, a physical machine is allowed to run multiple virtual server units at the same time, which significantly improves computer work efficiency while also bringing about a massive increase in server management objects.

[0042] With the widespread application of virtualization technology, the stability and reliability of virtual machines have become key factors. HyperV is a virtualization technology launched by Microsoft. The private cloud of the Hyper-V technology stack consists of four parts: computing, storage, network and management. Management is mainly composed of components such as AD, SCVMM, SCOM and SOM. SCVMM stands for System Center Virtual Machine Manager, which is a solution for managing virtualized data centers. Through it, users can configure and manage virtual hosts, storage and computing resources, and provide management pages for virtual machines and related services. When administrators manage virtual machines through SCVMM, the operation of the virtual machines will fail due to abnormal virtual machine status.

[0043] Virtual machines are efficiently managed through SCVMM (System Center Virtual Machine Manager). However, due to the instability of the underlying environment, virtual machines may encounter various abnormal states, such as Paused, Incomplete VM Configuration, Host Not Responding, Missing, Updatefailed, Migration Failed, etc. These abnormal states will cause virtual machine operation failures and affect business continuity. Therefore, how to detect virtual machine anomalies and repair anomalies is a problem that needs to be solved urgently.

[0044] This application obtains the status information of the virtual machine in real time through SCVMM, performs abnormal detection of the virtual machine based on the status information, performs repair operations on the virtual machine according to the repair strategy corresponding to the cause of the abnormality of the virtual machine, and then automatically repairs the virtual machine in different ways according to different abnormal states. Then, through the automatic discovery and repair tool of the abnormal state of the virtual machine managed by SCVMM, the problem of being unable to operate the virtual machine due to the abnormal state of the virtual machine is solved, so as to achieve the purpose of automated management of the operation and maintenance of massive virtual machines.

[0045] It should be noted that the execution subject of this embodiment may be an abnormality detection and recovery device of a virtual machine, or a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an abnormality detection and recovery device of a virtual machine capable of realizing the above functions, etc., and this embodiment does not specifically limit this. The following takes the abnormality detection and recovery device of a virtual machine as an example of the execution subject to explain this embodiment and the following embodiments.

[0046] Based on this, the present application proposes a first embodiment of a virtual machine abnormality detection and recovery method, please refer to Figure 1 The abnormality detection and recovery method of the virtual machine includes steps S101 to S103:

[0047] Step S101, obtaining the current state information of the virtual machine in real time through the SCVMM, and determining whether the virtual machine is in an abnormal state based on the current state information;

[0048] In this embodiment, an automated discovery and repair tool for abnormal states of virtual machines managed by SCVMM can be deployed, and a program corresponding to the abnormal detection and recovery method for virtual machines in this application is executed when the virtual machines are running. The tool is implemented using PowerShell commands to automatically discover virtual machines in abnormal states, and use different methods to repair the abnormalities of virtual machines according to different abnormal states, so as to fill the gap in automated repair of abnormal states of virtual machines under the HyperV technology stack, avoid situations where users or administrators are unable to operate virtual machines due to abnormal states of virtual machines, and enhance the automated management capabilities of operation and maintenance of massive virtual machines under the HyperV technology stack.

[0049] In this embodiment, during the operation of the virtual machine, the current status information of the virtual machine is obtained in real time through the SCVMM, that is, by interacting with the interface of the SCVMM, the current status information of all virtual machines managed by the SCVMM is obtained in real time.

[0050] After obtaining the current state information of each virtual machine, for each virtual machine, it is determined whether the virtual machine is in an abnormal state based on the current state information; specifically, in a feasible implementation, step S101 may include steps S1011 to S1012:

[0051] Step S1011, comparing the current state information with a preset normal state corresponding to the virtual machine to determine whether the current state information matches the preset normal state;

[0052] Step S1012: If the current state information does not match the preset normal state, it is determined that the virtual machine is in an abnormal state.

[0053] In this embodiment, a preset normal state corresponding to each virtual machine is pre-set, and the preset normal state can be a state label. After obtaining the current state information of each virtual machine, for each virtual machine, the current state information of the virtual machine is compared with the preset normal state of the virtual machine to determine whether the current state information matches the preset normal state, that is, to determine whether the current state information of the virtual machine is consistent with the preset normal state of the virtual machine.

[0054] If the current status information of the virtual machine matches the preset normal state of the virtual machine, it is determined that the virtual machine is in a normal state. If the current status information of the virtual machine does not match the preset normal state of the virtual machine, it is determined that the virtual machine is in an abnormal state, thereby accurately determining which virtual machines are in an abnormal state among all virtual machines managed by SCVMM.

[0055] Step S102, if the virtual machine is in an abnormal state, determining the abnormal cause of the virtual machine;

[0056] In this embodiment, if the virtual machine is in an abnormal state, that is, for each abnormal virtual machine in an abnormal state, the abnormal cause of the virtual machine is determined. Specifically, in a feasible implementation, step S102 may include steps S1021 to S1022:

[0057] Step S1021, if the virtual machine is in an abnormal state, obtaining log information, virtual machine configuration file, and software configuration information corresponding to the virtual machine;

[0058] Step S1023: performing log analysis on the log information, and performing configuration checking operations on the virtual machine configuration file and software configuration information to determine the abnormal cause of the virtual machine.

[0059] In this embodiment, when the virtual machine is in an abnormal state, for each abnormal virtual machine in the abnormal state, log information, virtual machine configuration file, and software configuration information corresponding to the virtual machine are obtained.

[0060] After obtaining the log information, the virtual machine configuration file and the software configuration information, an abnormality analysis of the virtual machine is performed to obtain the abnormality cause of the virtual machine, that is, log analysis is performed on the log information, and configuration checking operations are performed on the virtual machine configuration file and the software configuration information to determine the abnormality cause of the virtual machine. For example, log analysis is performed on the log information to determine whether the virtual machine has a hardware failure and / or a network problem, and configuration checking operations are performed on the virtual machine configuration file and the software configuration information to determine whether the virtual machine has a software configuration error and / or a virtual machine configuration file abnormality, etc. If there is at least one of the abnormalities such as hardware failure, software configuration error, network problem and virtual machine configuration file abnormality, log analysis is performed on the log information, and / or configuration checking operations are performed on the virtual machine configuration file and the software configuration information to obtain the abnormality cause of the virtual machine, wherein the abnormality cause includes virtual machine configuration loss, underlying storage failure, virtual machine configuration damage and virtual machine loss.

[0061] Step S103: determining a repair strategy corresponding to the virtual machine based on the abnormality cause, and performing a repair operation on the virtual machine based on the repair strategy.

[0062] In this embodiment, after determining the cause of the abnormality of the virtual machine, the repair strategy corresponding to the virtual machine is determined based on the cause of the abnormality, and the repair operation of the virtual machine is performed based on the repair strategy, so that different methods are used to automatically repair the virtual machine for different abnormal states. For example, if the cause of the abnormality is the loss of the virtual machine, the repair strategy is to restart the virtual machine, and then restart the virtual machine during the repair operation of the virtual machine to achieve the repair of the virtual machine.

[0063] In a feasible implementation, after step S103, the abnormality detection and recovery method of the virtual machine may further include step S104:

[0064] Step S104, obtaining a repair log corresponding to the repair operation, and storing the abnormal state, abnormal cause, repair strategy and repair log in association.

[0065] In this embodiment, after the virtual machine repair is completed, the repair log corresponding to the repair operation is obtained. Specifically, the log corresponding to the repair operation in the log information of the virtual machine is used as the repair log, and the abnormal state, abnormal cause, repair strategy and repair log are stored in association for subsequent problem analysis and system optimization, thereby reducing the probability of abnormal occurrence of the virtual machine.

[0066] It should be noted that, during the process of performing the repair operation on the virtual machine, the execution status of each step in the repair operation is monitored in real time, and whether the repair operation is successfully performed is determined according to the execution status to ensure the smooth progress of the repair operation.

[0067] The method for detecting and recovering an abnormality of a virtual machine proposed in the present embodiment obtains the current status information of the virtual machine in real time through SCVMM, and determines whether the virtual machine is in an abnormal state based on the current status information; then, if the virtual machine is in an abnormal state, determines the cause of the abnormality of the virtual machine; then, determines the repair strategy corresponding to the virtual machine based on the cause of the abnormality, and performs a repair operation on the virtual machine based on the repair strategy, obtains the status information of the virtual machine in real time through SCVMM, performs abnormality detection of the virtual machine based on the status information, performs a repair operation on the virtual machine based on the repair strategy corresponding to the cause of the abnormality of the virtual machine, and then automatically repairs the virtual machine in different ways according to different abnormal states, and then, through the automatic discovery and repair tool for the abnormal state of the virtual machine managed by SCVMM, solves the problem of being unable to operate the virtual machine due to the abnormal state of the virtual machine, so as to achieve the purpose of automated management of the operation and maintenance of massive virtual machines.

[0068] In a feasible implementation, step S103 may include steps a1 to a2:

[0069] Step a1: if the abnormality is caused by the loss of virtual machine configuration, performing a migration operation on the virtual machine based on the repair strategy;

[0070] Step a2: When the migration operation is completed, a refresh operation is performed on the virtual machine.

[0071] In this embodiment, if the cause of the exception is the loss of virtual machine configuration, the repair strategy is virtual machine migration and refresh. Then, when the repair operation is performed on the virtual machine based on the repair strategy, the migration operation is performed on the virtual machine based on the repair strategy. When the migration operation is completed, the refresh operation is performed on the virtual machine. After the refresh operation is completed, it is determined that the virtual machine repair is completed. Then, when the repair operation is performed on the virtual machine, the virtual machine is migrated and refreshed to achieve the repair of the virtual machine.

[0072] In a feasible implementation, step S103 may include steps b1 to b2:

[0073] Step b1: if the abnormality is caused by an underlying storage failure, restarting the virtualization management component corresponding to the virtual machine;

[0074] Step b2: restarting the virtual machine when the virtualization management component is restarted, and performing a refresh operation on the virtual machine when the virtual machine is restarted.

[0075] In this embodiment, if the cause of the exception is an underlying storage failure, the repair strategy is to restart the virtualization management component, restart the virtual machine, and refresh it. Then, when the repair operation is performed on the virtual machine based on the repair strategy, the virtualization management component corresponding to the virtual machine is restarted first. When the virtualization management component is restarted, the virtual machine is restarted. When the virtual machine is restarted, a refresh operation is performed on the virtual machine. After the refresh operation is completed, it is determined that the virtual machine repair is completed. Then, when the repair operation is performed on the virtual machine, the virtualization management component is restarted, the virtual machine is restarted and refreshed to achieve the repair of the virtual machine.

[0076] In a feasible implementation, step S103 may include steps c1 to c3:

[0077] Step c1, if the abnormality is caused by a damaged virtual machine configuration, performing a repair operation on the virtual machine, and determining whether the virtual machine is successfully repaired when the repair operation is completed;

[0078] Step c2, when the virtual machine is not repaired successfully, performing a migration operation on the virtual machine, and when the migration operation is completed, performing a refresh operation on the virtual machine;

[0079] Step c3: when the refresh operation is completed, perform a repair operation on the virtual machine.

[0080] In this embodiment, if the cause of the exception is the damage to the virtual machine configuration, the repair strategy is to repair, migrate if the repair is not successful, refresh and then repair. Then, when the repair operation is performed on the virtual machine based on the repair strategy, the repair operation is first performed on the virtual machine, and when the repair operation is completed, it is determined whether the virtual machine is repaired successfully.

[0081] Next, when the virtual machine is not repaired successfully, a migration operation is performed on the virtual machine, and when the migration operation is completed, a refresh operation is performed on the virtual machine. When the refresh operation is completed, a repair operation is performed on the virtual machine, and then during the repair operation on the virtual machine, the virtual machine is repaired, migrated if the repair is not successful, refreshed, and then repaired to achieve the repair of the virtual machine.

[0082] In a feasible implementation, step S103 may include step d1:

[0083] Step d1: If the abnormality is caused by the loss of the virtual machine, restart the virtual machine.

[0084] In this embodiment, if the cause of the abnormality is the loss of the virtual machine, the repair strategy is to restart the virtual machine, and then restart the virtual machine during the repair operation on the virtual machine to achieve the repair of the virtual machine.

[0085] The method for detecting and recovering a virtual machine abnormality proposed in this embodiment performs a migration operation on the virtual machine based on the repair strategy if the cause of the abnormality is the loss of virtual machine configuration; then, when the migration operation is completed, performs a refresh operation on the virtual machine. The virtual machine is repaired by migrating and refreshing the virtual machine during the repair operation. The problem of being unable to operate the virtual machine due to the abnormal state of the virtual machine is solved by using an automated discovery and repair tool for the abnormal state of the virtual machine managed by SCVMM, thereby achieving the purpose of automated management of the operation and maintenance of massive virtual machines.

[0086] The abnormality detection and recovery device for a virtual machine provided in the embodiment of the present application adopts the abnormality detection and recovery method for a virtual machine in the above embodiment, which can solve the technical problem of how to detect abnormalities in a virtual machine and repair abnormalities. Compared with the prior art, the beneficial effects of the abnormality detection and recovery device for a virtual machine provided in the embodiment of the present application are the same as the beneficial effects of the abnormality detection and recovery method for a virtual machine provided in the above embodiment, and other technical features in the abnormality detection and recovery device for a virtual machine are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0087] The present application provides an abnormality detection and recovery device for a virtual machine, and the abnormality detection and recovery device for a virtual machine includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the abnormality detection and recovery method for the virtual machine in the above-mentioned embodiment 1.

[0088] Reference below Figure 2 , which shows a schematic diagram of the structure of an abnormality detection and recovery device for a virtual machine suitable for implementing an embodiment of the present application. The abnormality detection and recovery device for a virtual machine in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 2 The abnormality detection and recovery device for a virtual machine shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0089] like Figure 2As shown, the abnormality detection and recovery device of the virtual machine may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the abnormality detection and recovery device of the virtual machine are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems may be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 may allow the abnormality detection and recovery device of the virtual machine to communicate wirelessly or wired with other devices to exchange data. Although the abnormality detection and recovery device of the virtual machine with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.

[0090] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0091] The abnormality detection and recovery device for a virtual machine provided by the present application adopts the abnormality detection and recovery method for a virtual machine in the above-mentioned embodiment, which can solve the technical problem of how to detect abnormalities in a virtual machine and repair abnormalities. Compared with the prior art, the beneficial effects of the abnormality detection and recovery device for a virtual machine provided by the present application are the same as the beneficial effects of the abnormality detection and recovery method for a virtual machine provided by the above-mentioned embodiment, and other technical features in the abnormality detection and recovery device for a virtual machine are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0092] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0093] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which 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.

[0094] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the abnormality detection and recovery method of the virtual machine in the above-mentioned embodiment.

[0095] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0096] The computer-readable storage medium may be included in the abnormality detection and recovery device of the virtual machine; or may exist independently without being assembled into the abnormality detection and recovery device of the virtual machine.

[0097] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the abnormality detection and recovery device of the virtual machine, the abnormality detection and recovery device of the virtual machine: obtains the current status information of the virtual machine in real time through SCVMM, and determines whether the virtual machine is in an abnormal state based on the current status information; if the virtual machine is in an abnormal state, determines the cause of the abnormality of the virtual machine; determines the repair strategy corresponding to the virtual machine based on the cause of the abnormality, and performs repair operations on the virtual machine based on the repair strategy.

[0098] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0099] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0100] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0101] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned virtual machine anomaly detection and recovery method, and can solve the technical problem of how to detect and repair anomalies of virtual machines. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the virtual machine anomaly detection and recovery method provided in the above-mentioned embodiment, and will not be repeated here.

[0102] An embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the above-mentioned virtual machine abnormality detection and recovery method.

[0103] The computer program product provided in this application can solve the technical problem of how to detect and repair anomalies of a virtual machine. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiment of this application are the same as the beneficial effects of the anomaly detection and recovery method of the virtual machine provided in the above embodiment, which will not be repeated here.

[0104] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for detecting and recovering an abnormality of a virtual machine, characterized in that: The abnormality detection and recovery method of the virtual machine comprises the following steps: Acquire the current status information of the virtual machine in real time through the SCVMM, and determine whether the virtual machine is in an abnormal state based on the current status information; If the virtual machine is in an abnormal state, determining the abnormal cause of the virtual machine; A repair strategy corresponding to the virtual machine is determined based on the abnormal cause, and a repair operation is performed on the virtual machine based on the repair strategy.

2. The method for abnormality detection and recovery of a virtual machine according to claim 1, characterized in that: The step of determining a repair strategy corresponding to the virtual machine based on the abnormal cause, and performing a repair operation on the virtual machine based on the repair strategy includes: If the abnormality is caused by the loss of virtual machine configuration, performing a migration operation on the virtual machine based on the repair strategy; When the migration operation is completed, a refresh operation is performed on the virtual machine.

3. The abnormality detection and recovery method of a virtual machine according to claim 1, characterized in that: The step of determining a repair strategy corresponding to the virtual machine based on the abnormal cause, and performing a repair operation on the virtual machine based on the repair strategy includes: If the cause of the abnormality is an underlying storage failure, restarting the virtualization management component corresponding to the virtual machine; The virtualization management component restarts the virtual machine when the restart is completed, and performs a refresh operation on the virtual machine when the restart of the virtual machine is completed.

4. The method for abnormality detection and recovery of a virtual machine according to claim 1, characterized in that: The step of determining a repair strategy corresponding to the virtual machine based on the abnormal cause, and performing a repair operation on the virtual machine based on the repair strategy includes: If the cause of the abnormality is that the virtual machine configuration is damaged, a repair operation is performed on the virtual machine, and when the repair operation is completed, it is determined whether the virtual machine is successfully repaired; When the virtual machine is not repaired successfully, performing a migration operation on the virtual machine, and when the migration operation is completed, performing a refresh operation on the virtual machine; When the refresh operation is completed, a repair operation is performed on the virtual machine.

5. The method for abnormality detection and recovery of a virtual machine according to claim 1, characterized in that: The step of determining a repair strategy corresponding to the virtual machine based on the abnormal cause, and performing a repair operation on the virtual machine based on the repair strategy includes: If the abnormal reason is the loss of the virtual machine, restart the virtual machine.

6. The method for abnormality detection and recovery of a virtual machine according to claim 1, characterized in that: The step of determining whether the virtual machine is in an abnormal state based on the current state information comprises: Compare the current state information with a preset normal state corresponding to the virtual machine to determine whether the current state information matches the preset normal state; If the current state information does not match the preset normal state, it is determined that the virtual machine is in an abnormal state.

7. The method for abnormality detection and recovery of a virtual machine according to claim 1, characterized in that: If the virtual machine is in an abnormal state, the step of determining the abnormal cause of the virtual machine includes: If the virtual machine is in an abnormal state, obtaining log information, virtual machine configuration files, and software configuration information corresponding to the virtual machine; Perform log analysis on the log information, and perform configuration check operations on the virtual machine configuration file and software configuration information to determine the abnormal cause of the virtual machine.

8. The method for abnormality detection and recovery of a virtual machine according to any one of claims 1 to 7, characterized in that: After the step of determining the repair strategy corresponding to the virtual machine based on the abnormality cause and performing a repair operation on the virtual machine based on the repair strategy, the abnormality detection and recovery method of the virtual machine further includes: A repair log corresponding to the repair operation is obtained, and the abnormal state, abnormal cause, repair strategy and repair log are stored in association.

9. A virtual machine abnormality detection and recovery device, characterized in that: The abnormality detection and recovery device of the virtual machine includes: a memory, a processor, and an abnormality detection and recovery program of the virtual machine stored in the memory and executable on the processor. When the abnormality detection and recovery program of the virtual machine is executed by the processor, the steps of the abnormality detection and recovery method of the virtual machine as described in any one of claims 1 to 8 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a virtual machine anomaly detection and recovery program, and when the virtual machine anomaly detection and recovery program is executed by a processor, the steps of the virtual machine anomaly detection and recovery method according to any one of claims 1 to 8 are implemented.