Method for detecting IO error of virtual machine and related components thereof

CN115408192BActive Publication Date: 2026-10-30JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211071611.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-02
Publication Date
2026-10-30
Estimated Expiration
2042-09-02

AI Technical Summary

Technical Problem

[0002]云平台是建立在服务器集群上的虚拟平台,云平台上建立有多个虚拟机,当虚拟机中的虚拟文件系统向服务器集群中的存储后端发送IO(Input/Output,输入输出)读写请求时,若该存储后端发生故障,则会造成存储后端的IO错误,IO错误可能会导致云平台上的业务无法执行甚至是业务崩溃

Benefits of technology

[0042]本发明提供了一种虚拟机的IO错误检测方法及其相关组件,涉及故障监控领域,在向存储后端发送预设读写指令后,利用预设信息判断工具判断存储后端是否生成IO错误信息;若确定存储后端生成IO错误信息,则获取该IO错误信息,然后利用预设函数库中的预设信息处理函数获取IO错误信息中的特征信息,最后将特征信息发送给控制器,以便控制器执行预设的修复IO错误程序。通过在向存储后端发出预设读写指令后立即检测其是否有IO错误信息生成的方法,能够及时地发现存储后端是否有IO错误,提高了发现IO错误的效率,进而能够避免IO错误产生之后带来的数据和经济损失。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115408192B_ABST
    Figure CN115408192B_ABST
Patent Text Reader

Abstract

The application discloses an IO error detection method of a virtual machine and a related component thereof, and relates to the field of fault monitoring. After a preset read-write instruction is sent to a storage backend, whether the storage backend generates IO error information is judged by using a preset information judgment tool. If it is determined that the storage backend generates IO error information, the IO error information is acquired, then a preset information processing function in a preset function library is used to acquire feature information in the IO error information, and finally the feature information is sent to a controller so that the controller executes a preset IO error repairing program. By using the method of detecting whether the storage backend generates IO error information immediately after the preset read-write instruction is sent to the storage backend, whether the storage backend has IO error can be found in time, the efficiency of finding IO error is improved, and data and economic loss caused by IO error can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fault monitoring, and in particular to a method for detecting I / O errors in virtual machines and related components. Background Technology

[0002] A cloud platform is a virtual platform built on a server cluster. Multiple virtual machines reside on this platform. When the virtual file system within a virtual machine sends I / O (Input / Output) read / write requests to the storage backend in the server cluster, a failure in that storage backend will cause I / O errors. These errors can prevent services on the cloud platform from executing or even crashing. Currently, I / O errors are typically only discovered through troubleshooting after services on the cloud platform have failed to run properly. This method is inefficient and cannot prevent data and financial losses resulting from I / O errors. Summary of the Invention

[0003] The purpose of this invention is to provide a virtual machine IO error detection method and related components, which can promptly detect whether there are IO errors in the storage backend, improve the efficiency of IO error detection, and thus avoid data and economic losses caused by IO errors.

[0004] To address the aforementioned technical problems, this invention provides a virtual machine I / O error detection method, applied to a processor in a server, wherein the server further includes a controller, and the virtual machine I / O error detection method includes:

[0005] After sending a preset read / write command to the storage backend, a preset information judgment tool is used to determine whether the storage backend generates IO error information.

[0006] If so, then obtain the IO error information;

[0007] The characteristic information of the IO error information is obtained by using the preset information processing functions in the preset function library;

[0008] The feature information is sent to the controller so that the controller can execute a preset I / O error repair procedure;

[0009] The preset information judgment tool and the preset function library are both set in the kernel mode of the server.

[0010] Preferably, before using a preset information judgment tool to determine whether the storage backend generates IO error information, the method further includes:

[0011] Determine the storage type of the storage backend;

[0012] Select the corresponding front-end driver based on the storage type of the storage backend;

[0013] Send preset read / write commands to the storage backend, including:

[0014] The front-end driver sends the preset read / write commands to the storage back-end.

[0015] Preferably, before obtaining the feature information in the IO error information using the preset information processing function in the preset function library, the method further includes:

[0016] Write the IO error information into the preset function library;

[0017] The feature information in the IO error information is obtained using preset information processing functions in the preset function library, including:

[0018] The preset information processing function is used to obtain one or more combinations of the following from the preset function library: the virtual machine ID, the UUID, the host ID corresponding to the virtual machine, the time point when the IO error occurred, and the amount of data corresponding to the IO error.

[0019] Preferred options also include:

[0020] The preset function library is monitored using a preset monitoring mechanism;

[0021] When the IO error information is detected in the preset function library, the process proceeds to the step of obtaining the feature information in the IO error information using the preset information processing function in the preset function library.

[0022] Preferably, sending the feature information to the controller includes:

[0023] Generate alarm information containing the aforementioned feature information;

[0024] The alarm information is sent to the controller using a preset communication tool;

[0025] The preset communication tool is set in the kernel mode of the server.

[0026] Preferably, after obtaining the IO error information, the method further includes:

[0027] A prompt signal is generated and sent to the prompt module so that the prompt module can issue a prompt upon receiving the prompt signal.

[0028] Preferably, after sending the feature information to the controller, the method further includes:

[0029] Determine whether the virtual file system is in read-only mode;

[0030] If so, the IO error repair is deemed to have failed;

[0031] If not, then the IO error is considered to have been successfully repaired.

[0032] This application also provides a virtual machine I / O error detection device, including:

[0033] Memory, used to store computer programs;

[0034] A controller for implementing the virtual machine I / O error detection method as described above when executing the computer program.

[0035] This application also provides a virtual machine I / O error detection system, including:

[0036] The information judgment unit is used to determine whether the storage backend generates IO error information after sending a preset read / write instruction to the storage backend using a preset information judgment tool; if so, the first acquisition unit is triggered.

[0037] The first acquisition unit is used to acquire the IO error information;

[0038] The second acquisition unit is used to acquire the feature information of the IO error information using a preset information processing function in a preset function library;

[0039] A sending unit is used to send the feature information to the controller so that the controller can execute a preset I / O error repair program;

[0040] The preset information judgment tool and the preset function library are both set in the kernel mode of the server.

[0041] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the virtual machine IO error detection method described above.

[0042] This invention provides a method for detecting I / O errors in virtual machines and related components, relating to the field of fault monitoring. After sending preset read / write commands to a storage backend, a preset information judgment tool is used to determine whether the storage backend has generated I / O error information. If it is determined that the storage backend has generated I / O error information, the I / O error information is acquired, and then the feature information in the I / O error information is obtained using preset information processing functions in a preset function library. Finally, the feature information is sent to the controller so that the controller can execute a preset I / O error repair program. By immediately detecting whether I / O error information has been generated after sending preset read / write commands to the storage backend, the method can promptly detect whether there are I / O errors in the storage backend, improving the efficiency of I / O error detection and thus avoiding data and economic losses caused by I / O errors. Attached Figure Description

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

[0044] Figure 1 A flowchart illustrating a virtual machine I / O error detection method provided in this application;

[0045] Figure 2 A schematic diagram of the structure of a virtual machine I / O error detection device provided in this application;

[0046] Figure 3 This is a schematic diagram of the structure of a virtual machine IO error detection device provided in this application. Detailed Implementation

[0047] The core of this invention is to provide a virtual machine IO error detection method and related components, which can promptly detect whether there are IO errors in the storage backend, improve the efficiency of IO error detection, and thus avoid data and economic losses caused by IO errors.

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

[0049] Please refer to Figure 1 , Figure 1The flowchart of a virtual machine I / O error detection method provided in this application is applied to a processor in a server. The server also includes a controller. The virtual machine I / O error detection method includes:

[0050] S1: After sending the preset read / write command to the storage backend, use the preset information judgment tool to determine whether the storage backend generates IO error information; if so, trigger S2.

[0051] As the amount of data on the various servers acting as nodes on cloud platforms continues to increase, more storage backends, such as physical hard drives or network storage devices, are needed to provide data storage media for the servers. Meanwhile, the number of virtual machines (VMs) deployed on cloud platforms is also constantly growing, making it increasingly difficult to promptly check and detect VMs with read / write errors within a given timeframe. Currently, existing technologies often detect VM errors passively; specifically, a VM is only identified as having a read / write error when staff or users perceive an anomaly in its read / write functionality.

[0052] To address the aforementioned technical issues, this application considers that the number of storage backends is relatively small compared to the number of virtual machines. Furthermore, since virtual machines need to interact with storage backends in the cloud platform, the presence or absence of read / write errors or malfunctions in virtual machines can be determined by detecting the functionality of the storage backends. For example, if the storage backend is a network storage device, it requires network devices such as HBA (Host Bus Adapter) cards to support network communication. If the HBA controller restarts or the network link is interrupted, the network storage device will malfunction, leading to I / O errors. Therefore, the virtual file system of the virtual machine sends preset read / write commands to a specific storage backend in the cloud platform through the server's processor. When the storage backend malfunctions, it cannot respond to these preset read / write commands and instead issues I / O error messages. Thus, after sending the preset read / write commands, the presence or absence of I / O error messages by the storage backend indirectly determines whether the virtual machine has read / write functionality errors.

[0053] Furthermore, considering that detecting whether the storage backend generates IO error information is done at the server's application layer (or user space, which is referred to as user space in this application for simplicity), it not only requires manually starting the corresponding detection software but also requires the software to run continuously in user space. This results in the detection software consuming a significant amount of server resources, such as CPU and memory resources, thus affecting the user experience. Moreover, when the storage backend in the user's node server encounters a problem, considering user privacy, it is difficult for staff to interfere with the application layer of the user's node server. Therefore, the preset information judgment tool needs to be set in the server's kernel space (or virtualization layer, which is referred to as kernel space in this application for simplicity) rather than in user space. Specifically, the preset information judgment tool can be QEMU (Quick EMUlator, a virtual operating system emulator).

[0054] S2: Get I / O error information;

[0055] Currently, to prevent the further escalation of storage backend failures or errors, and to avoid increased data and financial losses for users, storage backends typically reject all subsequent responses after detecting a fault, until the fault is repaired. That is, when a faulty storage backend receives a pre-defined read / write command from the virtual file system of a virtual machine, it will not respond to the command but will instead generate an IO error message indicating its own fault, prompting maintenance personnel to perform repairs. Therefore, after sending the pre-defined read / write command to the storage backend, it is only necessary to obtain the IO error message generated by the storage backend itself using a pre-defined error message assessment tool such as QEMUE.

[0056] S3: Use the preset information processing functions in the preset function library to obtain the characteristic information of IO error information;

[0057] To accurately locate the faulty storage backend, this application, after determining that a specific storage backend in the cloud platform has failed, can identify the specific storage backend based on the characteristics in the IO error information. Specifically, the default function library is libvirt. libvirt is a database that stores a collection of various virtual machine management and other virtualization functions, including various task functions such as storage or network interface management. By using libvirt to obtain storage-related functions, information that can identify the storage backend and facilitate fault repair can be extracted from the IO error information, such as the storage backend ID, the time of the IO error, and the scope of the IO error's impact. Furthermore, libvirt is configured in the server's kernel mode.

[0058] S4: Send the feature information to the controller so that the controller can execute the preset IO error repair procedure;

[0059] To promptly repair storage backend failures and ensure the normal operation of the cloud platform, after a storage backend failure occurs, characteristic information identifying the faulty storage backend is sent to the controller. This allows the controller to identify the faulty storage backend based on this characteristic information and repair it according to its pre-set IO error repair procedure. Specifically, since the solutions for storage backend IO errors are known to staff, the corresponding solutions for different types of IO errors can be stored on the server. In practical applications, when an IO error is detected, the corresponding solution is determined based on its type, and the solution is retrieved from the server to resolve the IO error. Furthermore, if the IO error is not a simple problem to solve, a warning can be issued to alert staff for repair. The controller can be any processor or other control unit on the server capable of executing the pre-set IO error repair procedure, such as a CPU (Central Processing Unit) or BMC (Baseboard Management Controller), etc. This application does not limit this.

[0060] The preset information judgment tool and the preset function library are both set in the kernel mode of the server.

[0061] In summary, after sending preset read / write commands to the storage backend, a preset information judgment tool is used to determine whether the storage backend has generated IO error information. If it is determined that the storage backend has generated IO error information, the IO error information is obtained, and then the preset information processing function in the preset function library is used to obtain the characteristic information in the IO error information. Finally, the characteristic information is sent to the controller so that the controller can execute the preset IO error repair program. By immediately detecting whether IO error information has been generated after sending preset read / write commands to the storage backend, the possibility of IO errors in the storage backend can be detected in a timely manner, improving the efficiency of IO error detection and thus avoiding data and economic losses caused by IO errors.

[0062] Based on the above embodiments:

[0063] As a preferred embodiment, before using a preset information judgment tool to determine whether the storage backend has generated IO error information, the method further includes:

[0064] Determine the storage type of the storage backend;

[0065] Select the corresponding front-end driver based on the storage type of the storage backend;

[0066] Send preset read / write commands to the storage backend, including:

[0067] The front-end driver sends preset read and write commands to the storage back-end.

[0068] To ensure that the storage backend receives correct read / write commands, this application considers that storage backends have multiple types, and different types of storage backends may need to receive read / write commands of their corresponding types to respond correctly. When determining whether a storage backend has generated an IO error, if the storage backend receives an incorrect type of read / write command, it may also generate an IO error. This makes it impossible to determine whether the IO error information indicates a storage backend failure or that the virtual file system sent an incorrect read / write command to the storage backend. Therefore, to reduce factors affecting the determination of whether a storage backend is faulty, it is necessary to ensure that the read / write commands received by the storage backend are those that the storage backend can respond to normally. Specifically, it is first necessary to determine which storage backend the virtual file system needs to send read / write commands to, and then, based on the type of the storage backend, determine which frontend driver the virtual file system needs to use to send the read / write commands so that the storage backend can receive read / write commands that it can respond to normally. For example, if the storage backend is a physical hard drive on a server, the frontend driver corresponding to the host file system can be retrieved from the virtual machine's frontend driver queue to send read and write commands to the storage backend. If the storage backend is a network storage device (such as a distributed file system or centralized storage), a frontend driver for a network link such as TCP / IP will be selected to first establish communication between the virtual machine and the storage backend before transmitting read and write commands. Therefore, by selecting different frontend drivers based on the type of storage backend, it can be ensured that the storage backend receives the correct read and write commands.

[0069] As a preferred embodiment, before obtaining the feature information in the IO error information using the preset information processing function in the preset function library, the method further includes:

[0070] Write IO error information into the preset function library;

[0071] Use the preset information processing functions in the preset function library to obtain the characteristic information in the IO error information, including:

[0072] Use the preset information processing function to obtain one or more of the following combinations from the preset function library: virtual machine ID, UUID, host ID corresponding to the virtual machine, time point of occurrence of IO error, and data volume corresponding to IO error.

[0073] To detect and handle I / O errors, this application allows I / O error information to be written to a predefined library, specifically libvirt, and then to a libvirt socket file. This socket file is created during virtual machine creation and stores information about potential virtual machine state changes, such as disk loading and unloading. Therefore, writing I / O error information to this socket file allows for subsequent identification of faulty storage backends. Information such as the virtual machine's name, UUID (Universally Unique Identifier), host machine information, the time of the I / O error, and the size of the read / write blocks is written to the socket file. Based on this, I / O error detection and handling can be achieved.

[0074] As a preferred embodiment, it also includes:

[0075] The preset function library is monitored using a preset monitoring mechanism;

[0076] When the IO error information is detected in the preset function library, the process proceeds to the step of obtaining the feature information in the IO error information using the preset information processing function in the preset function library.

[0077] To detect I / O errors in a timely manner, this application uses Glib's Event listening mechanism to continuously monitor the socket file in libvirt. If an I / O error is detected, it means that the preset information judgment tool has detected an I / O error in the storage backend. At this time, the preset information handling function for I / O errors will be called to extract the feature information in the I / O error information.

[0078] As a preferred embodiment, sending feature information to the controller includes:

[0079] Generate alarm information containing feature information;

[0080] Alarm information is sent to the controller using a pre-defined communication tool;

[0081] The default communication tools are set in the server's kernel mode.

[0082] To send IO error information to the controller, this application establishes an OpenStack cloud platform computing component on the server. After extracting the characteristic information from the socket file, the characteristic information of the IO error can be reported to the OpenStack cloud platform computing component so that the IO error information can be further processed in the OpenStack cloud platform computing component. Specifically, the characteristic information of the IO error is sent to the monitoring and alarm component in OpenStack via notification through the RabbitMQ message notification mechanism in OpenStack. Then, the monitoring and alarm component sends it to the controller so that the controller can execute the IO error repair program.

[0083] As a preferred embodiment, after obtaining the IO error information, the method further includes:

[0084] A prompt signal is generated and sent to the prompt module so that the prompt module can issue a prompt upon receiving the prompt signal.

[0085] To promptly alert staff, this application also includes a notification module on the server. This module can include displays, buzzers, or LEDs—modules capable of emitting sound or light to indicate certain information. For example, if the notification module is a display, it can directly display the IO error information of the faulty storage backend, specifically showing the virtual machine name, UUID, host machine information, time of the IO error, and read / write block size. If the notification module is a buzzer, it can generate corresponding voice or sound information based on the characteristics of the faulty storage backend, using its unique voice or sound to alert staff. If the notification module is an LED, an LED can be installed at each storage backend; when a fault is detected in a storage backend, the corresponding LED can be controlled to illuminate. Based on this, by setting up a notification module, staff can be promptly alerted.

[0086] In a preferred embodiment, after sending the feature information to the controller, the method further includes:

[0087] Determine whether the virtual file system is in read-only mode;

[0088] If so, then the IO error repair is deemed to have failed;

[0089] If not, then the IO error repair is considered successful.

[0090] To determine whether the IO error in the storage backend has been successfully repaired, this application considers that when an IO error occurs in the storage backend, in order to prevent the IO error from escalating further and to avoid data and property loss for users, the server will report the IO error information to the virtual file system of the virtual machine via an interrupt. When the virtual file system detects an IO error, it will change its file data read and write permissions to read-only permissions. This means that users can no longer perform sensitive operations such as writing or modifying certain data files through the virtual file system. After the virtual file system detects that the IO error in the storage backend has been repaired, it will reopen the permissions. Based on this, we can check whether the virtual file system's read / write mode is read-only. If it is still read-only, it indicates that some of the server's built-in IO error recovery methods may not have resolved the IO error, requiring more complex manual repair. Therefore, the IO error recovery is considered failed. We can also send the reason for the IO error recovery failure and the methods used to the staff's equipment so that they can perform the repair based on the server's own repair process and results. Conversely, if the virtual file system's read / write mode is not read-only, but rather read-write, modification, or full control, it means that the virtual file system has not detected any IO error information. Therefore, we can determine that the storage backend's IO error recovery is complete, and the UO error recovery is considered successful. Based on this, we can easily determine whether the storage backend's IO error recovery was successful.

[0091] Please refer to Figure 2 , Figure 2 A schematic diagram of a virtual machine I / O error detection device provided in this application includes:

[0092] Memory 21 is used to store computer programs;

[0093] Controller 22 is used to implement the steps of the virtual machine IO error detection method described above when executing a computer program.

[0094] For a detailed description of the I / O error detection device for virtual machines provided in this application, please refer to the embodiments of the I / O error detection method for virtual machines described above; this application will not repeat the details here.

[0095] Please refer to Figure 3 , Figure 3 A schematic diagram of the structure of a virtual machine I / O error detection system provided in this application includes:

[0096] The information judgment unit 31 is used to determine whether the storage backend generates IO error information after sending a preset read / write instruction to the storage backend using a preset information judgment tool; if so, the first acquisition unit is triggered.

[0097] The first acquisition unit 32 is used to acquire IO error information;

[0098] The second acquisition unit 33 is used to acquire the characteristic information of IO error information using the preset information processing function in the preset function library;

[0099] The sending unit 34 is used to send feature information to the controller so that the controller can execute a preset IO error repair program;

[0100] The preset information judgment tool and the preset function library are both set in the kernel mode of the server.

[0101] For a detailed description of the I / O error detection system for virtual machines provided in this application, please refer to the embodiments of the I / O error detection method for virtual machines described above; further details will not be repeated here.

[0102] Based on the above embodiments:

[0103] As a preferred embodiment, it also includes:

[0104] The storage type determination unit is used to determine the storage type of the storage backend before using a preset information judgment tool to determine whether the storage backend generates IO error information;

[0105] The driver selection unit is used to select the corresponding front-end driver according to the storage type of the storage backend;

[0106] The virtual machine's I / O error detection system also includes:

[0107] The instruction sending unit is used to send preset read and write instructions to the storage backend through the front-end driver.

[0108] As a preferred embodiment, it also includes:

[0109] The information writing unit is used to write the IO error information into the preset function library before using the preset information processing function in the preset function library to obtain the characteristic information in the IO error information;

[0110] The second acquisition unit 33 is specifically used to acquire one or more of the following combinations from the preset information processing function: the virtual machine ID, UUID, host ID corresponding to the virtual machine, the time point when the IO error occurred, and the amount of data corresponding to the IO error.

[0111] As a preferred embodiment, it also includes:

[0112] The monitoring unit is used to monitor the preset function library using a preset monitoring mechanism. When an IO error is detected in the preset function library, the second acquisition unit 33 is triggered.

[0113] In a preferred embodiment, the transmitting unit 34 includes:

[0114] An alarm information generation unit is used to generate alarm information containing feature information;

[0115] An alarm information sending unit is used to send alarm information to the controller using a preset communication tool;

[0116] The default communication tools are set in the server's kernel mode.

[0117] As a preferred embodiment, it also includes:

[0118] The prompt message sending unit is used to generate a prompt signal and send it to the prompt module after obtaining the IO error information, so that the prompt module can issue a prompt after receiving the prompt signal.

[0119] As a preferred embodiment, it also includes:

[0120] The judgment unit is used to determine whether the read / write mode of the virtual file system is read-only after the feature information is sent to the controller; if yes, the repair failure unit is triggered; if no, the repair success unit is triggered.

[0121] The repair failure unit is used to determine if I / O error repair has failed;

[0122] The "Repair Successful" unit is used to determine if an I / O error has been successfully repaired.

[0123] This application also provides a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the steps of the virtual machine IO error detection method described above.

[0124] For a detailed description of the computer-readable storage medium provided in this application, please refer to the embodiments of the virtual machine IO error detection method described above; further details will not be repeated here.

[0125] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

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

[0127] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for detecting I / O errors in a virtual machine, characterized in that, The method for detecting I / O errors in a virtual machine, which is applied to a processor in a server and also includes a controller, comprises: After sending a preset read / write command to the storage backend, a preset information judgment tool is used to determine whether the storage backend generates IO error information. If so, then obtain the IO error information; The characteristic information of the IO error information is obtained by using the preset information processing functions in the preset function library; The feature information is sent to the controller so that the controller can execute a preset I / O error repair procedure; The preset information judgment tool and the preset function library are both set in the kernel mode of the server.

2. The virtual machine I / O error detection method as described in claim 1, characterized in that, Before using a preset information judgment tool to determine whether the storage backend generates IO error information, the process also includes: Determine the storage type of the storage backend; Select the corresponding front-end driver based on the storage type of the storage backend; Send preset read / write commands to the storage backend, including: The front-end driver sends the preset read / write commands to the storage back-end.

3. The virtual machine I / O error detection method as described in claim 1, characterized in that, Before using the preset information processing functions in the preset function library to obtain the feature information in the IO error information, the process also includes: Write the IO error information into the preset function library; The feature information in the IO error information is obtained using preset information processing functions in the preset function library, including: The preset information processing function is used to obtain one or more combinations of the following from the preset function library: the virtual machine ID, the UUID, the host ID corresponding to the virtual machine, the time point when the IO error occurred, and the amount of data corresponding to the IO error.

4. The virtual machine I / O error detection method as described in claim 3, characterized in that, Also includes: The preset function library is monitored using a preset monitoring mechanism; When the IO error information is detected in the preset function library, the process proceeds to the step of obtaining the feature information in the IO error information using the preset information processing function in the preset function library.

5. The virtual machine I / O error detection method as described in claim 1, characterized in that, Sending the feature information to the controller includes: Generate alarm information containing the aforementioned feature information; The alarm information is sent to the controller using a preset communication tool; The preset communication tool is set in the kernel mode of the server.

6. The virtual machine I / O error detection method as described in claim 1, characterized in that, After obtaining the IO error information, the following is also included: A prompt signal is generated and sent to the prompt module so that the prompt module can issue a prompt upon receiving the prompt signal.

7. The virtual machine I / O error detection method according to any one of claims 1 to 6, characterized in that, After sending the feature information to the controller, the process also includes: Determine whether the virtual file system is in read-only mode; If so, the IO error repair is deemed to have failed; If not, then the IO error is considered to have been successfully repaired.

8. A virtual machine I / O error detection device, characterized in that, include: Memory, used to store computer programs; A controller for implementing the steps of the virtual machine I / O error detection method as described in any one of claims 1 to 7 when executing the computer program.

9. A virtual machine I / O error detection system, characterized in that, A processor used in a server, the server also including a controller, the virtual machine's I / O error detection system includes: The information judgment unit is used to determine whether the storage backend generates IO error information after sending a preset read / write instruction to the storage backend using a preset information judgment tool; if so, the first acquisition unit is triggered. The first acquisition unit is used to acquire the IO error information; The second acquisition unit is used to acquire the feature information of the IO error information using a preset information processing function in a preset function library; A sending unit is used to send the feature information to the controller so that the controller can execute a preset I / O error repair program; The preset information judgment tool and the preset function library are both set in the kernel mode of the server.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the virtual machine I / O error detection method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Virtual machine IO (Input-Output) data stream detection method and device, computing equipment and storage medium

    CN107679398A

  • Kernel Bus System to Build Virtual Machine Monitor and the Performance Service Framework and Method Therefor

    US20110296411A1