Disk fault detection and self-recovery method for desktop cloud virtual machine
By using iscsiadmin–msession in a cloud computing environment to detect virtual machine disk failures and perform self-recovery, the operating system crash caused by virtual machine network interruption is solved, and rapid failure repair and business continuity is achieved, reducing fault repair time and interruption time.
Patent Information
- Application Number
- CN202411105776.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-12-10
AI Technical Summary
In a cloud computing environment, when a virtual machine is mounted using an iscsi cloud disk, network interruption causes abnormal reading of disk data by the virtual machine operating system. The existing technology lacks effective fault alarms and efficient handling methods, resulting in a long time to repair the fault and business The interrupt time increases.
Provide a method for detecting and self-recovering the disk of desktop cloud virtual machine. It obtains fault events through iscsiadmin–msession, analyzes the cause of the failure and performs self-recovering, including judging the network card status, network connection and iscsi server abnormalities, and performs self-recovering of the physical network card. Virtual machine hard restart and disk read test to achieve automatic repair and alarm.
It realizes timely alarm and rapid repair of disk failures, reduces fault repair time and business interruption time, and improves the system's self-healing ability and administrator's fault location efficiency.
Smart Images

Figure CN119105892A_ABST
Abstract
Description
Technical Field
[0001] The invention discloses a desktop cloud virtual machine disk fault detection and self-recovery method, and relates to the fields of cloud computing and storage. Background Art
[0002] Currently, most desktop cloud vendors use OpenStack to provide virtual machines and virtual machine disks. When a virtual machine is mounted using an iscsi cloud disk, if the virtual machine disk storage network is interrupted for more than 5 minutes, the virtual machine operating system will read the disk data abnormally, causing the operating system to crash. For such fault scenarios, there is no good fault alarm and efficient processing method. Summary of the invention
[0003] In view of the problems of the prior art, the present invention provides a desktop cloud virtual machine disk fault detection and self-recovery method, which timely triggers abnormal alarms and attempts automatic repairs for disk read and write abnormalities due to network interruptions, thereby reducing the time for repairing such faults and the actual desktop service interruption time.
[0004] The specific scheme proposed by the present invention is:
[0005] The present invention provides a desktop cloud virtual machine disk failure detection and self-recovery method, comprising:
[0006] Based on OpenStack as the cloud desktop virtualization backend, the virtual machine is mounted using the iscsi network disk.
[0007] Use iscsiadmin-msession to obtain network disk failure events, analyze the causes of the failure events and perform self-recovery based on the current environment status:
[0008] Determine in turn whether the network card status is abnormal, whether the network is unavailable, and whether the iscsi server is abnormal.
[0009] If the network card status is abnormal, the physical network card will be self-recovered. If the network is unavailable or the iscsi server is abnormal, the iscsi disk read test process will be added to the virtual machine hard restart process, and the virtual machine will be restarted or the network disk will be remounted for the disk that cannot read data normally.
[0010] Furthermore, in the desktop cloud virtual machine disk failure detection and self-recovery method, determining whether the network card status is abnormal includes: using the ip command on the current computing node to determine whether the network card of the current computing node is in a down state, and determining whether the physical network card status of the current computing node is abnormal, and if so, enabling the abnormal physical network card for self-recovery.
[0011] Furthermore, in the desktop cloud virtual machine disk failure detection and self-recovery method, determining whether the network is unavailable includes: determining whether the network link connection is abnormal by testing whether the iscsi portal endpoint ip is connected; if the iscsiportal endpoint ip is connected, the network is connected; otherwise, it is determined that the network is unavailable.
[0012] Furthermore, the iscsi disk reading test process in the desktop cloud virtual machine disk failure detection and self-recovery method includes:
[0013] Send a hard restart command to the virtual machine and obtain the virtual machine network disk information through the computing node.
[0014] Read the network disk header according to the iscsi disk read test process to determine whether the data can be read normally. If yes, generate the virtual machine configuration and start the virtual machine. Otherwise, destroy the iscsi session and remount the network disk.
[0015] Furthermore, in the desktop cloud virtual machine disk fault detection and self-recovery method, different types of alarms are set for abnormal network card status, network unavailability and iscsi server abnormality, so as to facilitate administrators to quickly locate and repair abnormalities.
[0016] The present invention also provides a desktop cloud virtual machine disk failure detection and self-recovery device, including an analysis and judgment module and a recovery module.
[0017] For virtual machines that use OpenStack as the cloud desktop virtualization backend and mount the iscsi network disk,
[0018] The analysis and judgment module obtains the network disk failure event through iscsiadmin-msession, analyzes the cause of the failure event according to the current environment status, and the recovery module performs self-recovery according to the cause of the failure event:
[0019] The analysis and judgment module determines in turn whether the network card status is abnormal, whether the network is unavailable, and whether the iscsi server is abnormal.
[0020] If the network card status is abnormal, the recovery module will perform self-recovery of the physical network card. If the network is unavailable or the iscsi server is abnormal, the recovery module will add an iscsi disk read test process to the virtual machine hard restart process, restart the virtual machine or remount the network disk for the disk that cannot read data normally.
[0021] Furthermore, the analysis and judgment module of the desktop cloud virtual machine disk failure detection and self-recovery device determines whether the network card status is abnormal, including: using the ip command on the current computing node to determine whether the network card of the current computing node is in a down state, and determining whether the physical network card status of the current computing node is abnormal, and if so, notifying the recovery module to start the abnormal physical network card for self-recovery.
[0022] Furthermore, the analysis and judgment module of the desktop cloud virtual machine disk failure detection and self-recovery device determines whether the network is unavailable, including: determining whether the network link connection is abnormal by testing whether the iscsi portal endpoint ip is connected; if the iscsi portal endpoint ip is connected, the network is connected; otherwise, it is determined that the network is unavailable.
[0023] Furthermore, the recovery module of the desktop cloud virtual machine disk failure detection and self-recovery device performs an iscsi disk reading test process, including:
[0024] Send a hard restart command to the virtual machine and obtain the virtual machine network disk information through the computing node.
[0025] Read the network disk header according to the iscsi disk read test process to determine whether the data can be read normally. If yes, generate the virtual machine configuration and start the virtual machine. Otherwise, destroy the iscsi session and remount the network disk.
[0026] Furthermore, the analysis and judgment module of the desktop cloud virtual machine disk fault detection and self-recovery device sets different types of alarms for abnormal network card status, network unavailability and iscsi server abnormalities, which facilitates administrators to quickly locate and repair abnormalities.
[0027] The benefits of the present invention are:
[0028] By collecting abnormal iscsi network disk status, timely fault alarm can be realized.
[0029] Through the fault analysis process of the network environment and node network card status when the disk fails, further screening of the alarm fault causes is achieved, which facilitates the rapid identification of the root cause of the fault, greatly reduces the time for manual fault analysis, and reduces the time for fault repair.
[0030] By automatically enabling the local network card, the self-healing capability of some scenarios is increased.
[0031] By adding a disk data read test to the desktop virtual machine restart process, subsequent virtual machine startup exceptions were avoided. And by automatically deleting the faulty disk ISCSI session and re-executing the ISCSI disk mount, the administrator needs to manually identify and handle such failures, which reduces the time of business interruption caused by a large amount of business interruption. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 The invention relates to a schematic diagram of an iscsi fault discovery and alarm analysis process.
[0033] Figure 2 It is a schematic diagram of the restart and self-recovery process of the desktop virtual machine after a failure of the present invention. DETAILED DESCRIPTION
[0034] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.
[0035] Example 1
[0036] The present invention provides a desktop cloud virtual machine disk failure detection and self-recovery method, comprising:
[0037] Based on OpenStack as the cloud desktop virtualization backend, the virtual machine is mounted using the iscsi network disk.
[0038] You can use the iscsiadmin–msession–P 3 command to output network disk failure events, analyze the causes of the failure events and perform self-recovery based on the current environment status:
[0039] Determine in turn whether the network card status is abnormal, whether the network is unavailable, and whether the iscsi server is abnormal. Set different types of alarms for network card status abnormalities, network unavailable, and iscsi server abnormalities to facilitate administrators to quickly locate and repair abnormalities.
[0040] If the network card status is abnormal, the physical network card will be self-recovered. If the network is unavailable or the iscsi server is abnormal, the iscsi disk read test process will be added to the virtual machine hard restart process, and the virtual machine will be restarted or the network disk will be remounted for the disk that cannot read data normally.
[0041] First, determine whether the network card status is abnormal, including: use the ip command on the current computing node to determine whether the network card of the current computing node is in a down state, and determine whether the physical network card status of the current computing node is abnormal. If so, enable the abnormal physical network card for self-recovery.
[0042] If the network card status is not abnormal, continue to determine whether the network is unavailable, including: determining whether the network link connection is abnormal by testing whether the iscsi portal endpoint ip is connectable. If the iscsi portal endpoint ip is connectable, the network is connected; otherwise, it is determined that the network is unavailable.
[0043] If not, continue to determine whether the iscsi server is abnormal.
[0044] If the network card status is abnormal, you can try to run ifconfig <network card name> up to enable the abnormal physical network card for self-recovery.
[0045] For other abnormal situations, you can perform the iscsi disk read test process to restart the virtual machine or remount the virtual machine network disk, which mainly includes:
[0046] Send a hard restart command to the virtual machine and obtain the virtual machine network disk information through the computing node.
[0047] Read the network disk header according to the iscsi disk read test process to determine whether the data can be read normally. If yes, generate the virtual machine configuration and start the virtual machine. Otherwise, destroy the iscsi session and remount the network disk.
[0048] Example 2
[0049] The present invention also provides a desktop cloud virtual machine disk failure detection and self-recovery device, including an analysis and judgment module and a recovery module.
[0050] For virtual machines that use OpenStack as the cloud desktop virtualization backend and mount the iscsi network disk,
[0051] The analysis and judgment module obtains the network disk failure event through iscsiadmin-msession, analyzes the cause of the failure event according to the current environment status, and the recovery module performs self-recovery according to the cause of the failure event:
[0052] The analysis and judgment module determines in turn whether the network card status is abnormal, whether the network is unavailable, and whether the iscsi server is abnormal.
[0053] If the network card status is abnormal, the recovery module will perform self-recovery of the physical network card. If the network is unavailable or the iscsi server is abnormal, the recovery module will add an iscsi disk read test process to the virtual machine hard restart process, restart the virtual machine or remount the network disk for the disk that cannot read data normally.
[0054] As the information interaction and execution process between the modules in the above-mentioned device are based on the same concept as the embodiment of the method of the present invention, the specific contents can be found in the description of the embodiment of the method of the present invention and will not be repeated here.
[0055] Likewise, the benefits of the device of the present invention are:
[0056] By collecting abnormal iscsi network disk status, timely fault alarm can be realized.
[0057] Through the fault analysis process of the network environment and node network card status when the disk fails, further screening of the alarm fault causes is achieved, which facilitates the rapid identification of the root cause of the fault, greatly reduces the time for manual fault analysis, and reduces the time for fault repair.
[0058] By automatically enabling the local network card, the self-healing capability of some scenarios is increased.
[0059] By adding a disk data read test to the desktop virtual machine restart process, subsequent virtual machine startup exceptions were avoided. And by automatically deleting the faulty disk ISCSI session and re-executing the ISCSI disk mount, the administrator needs to manually identify and handle such failures, which reduces the time of business interruption caused by a large amount of business interruption.
[0060] It should be noted that not all steps and modules in the above-mentioned processes and device structures are necessary, and some steps or modules can be ignored according to actual needs. The execution order of each step is not fixed and can be adjusted as needed. The system structure described in the above-mentioned embodiments can be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or some components in multiple independent devices may be implemented together.
[0061] The above-described embodiments are only preferred embodiments for fully illustrating the present invention, and the protection scope of the present invention is not limited thereto. Equivalent substitutions or changes made by those skilled in the art based on the present invention are within the protection scope of the present invention. The protection scope of the present invention shall be subject to the claims.
Claims
1. A method for detecting and self-recovering disk failures in a desktop cloud virtual machine. Its characteristics are include: Based on OpenStack as the cloud desktop virtualization backend, the virtual machine is mounted using the iscsi network disk. Use iscsiadmin-msession to obtain network disk failure events, analyze the causes of the failure events and perform self-recovery based on the current environment status: Determine in turn whether the network card status is abnormal, whether the network is unavailable, and whether the iscsi server is abnormal. If the network card status is abnormal, the physical network card will be self-recovered. If the network is unavailable or the iscsi server is abnormal, the iscsi disk read test process will be added to the virtual machine hard restart process, and the virtual machine will be restarted or the network disk will be remounted for the disk that cannot read data normally.
2. A desktop cloud virtual machine disk failure detection and self-recovery method according to claim 1, Its characteristics are Determine whether the network card state is abnormal, including: using the ip command on the current computing node to determine whether the network card of the current computing node is in a down state, and determine whether the physical network card state of the current computing node is abnormal, and if so, enable the abnormal physical network card for self-recovery.
3. A desktop cloud virtual machine disk failure detection and self-recovery method according to claim 1, Its characteristics are Determine whether the network is unreachable, including: determining whether the network link connection is abnormal by testing whether the iscsi portal endpoint ip is connectable. If the iscsiportal endpoint ip is connectable, the network is connected; otherwise, it is determined that the network is unreachable.
4. A desktop cloud virtual machine disk failure detection and self-recovery method according to claim 1, Its characteristics are The iscsi disk read test process includes: Send a hard restart command to the virtual machine and obtain the virtual machine network disk information through the computing node. Read the network disk header according to the iscsi disk read test process to determine whether the data can be read normally. If yes, generate the virtual machine configuration and start the virtual machine. Otherwise, destroy the iscsi session and remount the network disk.
5. A desktop cloud virtual machine disk failure detection and self-recovery method according to claim 1, Its characteristics are Set different types of alarms for abnormal network card status, network unavailability, and iscsi server abnormalities, so that administrators can quickly locate and repair abnormalities.
6. A desktop cloud virtual machine disk failure detection and self-recovery device, Its characteristics are Including analysis and judgment module and recovery module, For virtual machines that use OpenStack as the cloud desktop virtualization backend and mount the iscsi network disk, The analysis and judgment module obtains the network disk failure event through iscsiadmin-msession, analyzes the cause of the failure event according to the current environment status, and the recovery module performs self-recovery according to the cause of the failure event: The analysis and judgment module determines in turn whether the network card status is abnormal, whether the network is unavailable, and whether the iscsi server is abnormal. If the network card status is abnormal, the recovery module will perform self-recovery of the physical network card. If the network is unavailable or the iscsi server is abnormal, the recovery module will add an iscsi disk read test process to the virtual machine hard restart process, restart the virtual machine or remount the network disk for the disk that cannot read data normally.
7. A desktop cloud virtual machine disk failure detection and self-recovery device according to claim 6, Its characteristics are The analysis and judgment module determines whether the network card status is abnormal, including: using the ip command on the current computing node to determine whether the network card of the current computing node is in a down state, and determining whether the physical network card status of the current computing node is abnormal. If so, the recovery module is notified to start the abnormal physical network card for self-recovery.
8. A desktop cloud virtual machine disk failure detection and self-recovery device according to claim 6, Its characteristics are The analysis and judgment module judges whether the network is unavailable, including: judging whether the network link connection is abnormal by testing whether the iscsiportal endpoint ip is connectable, if the iscsi portal endpoint ip is connectable, the network is connected, otherwise it is judged that the network is unavailable.
9. A desktop cloud virtual machine disk failure detection and self-recovery device according to claim 6, Its characteristics are The recovery module performs the iscsi disk read test process, including: Send a hard restart command to the virtual machine and obtain the virtual machine network disk information through the computing node. Read the network disk header according to the iscsi disk read test process to determine whether the data can be read normally. If yes, generate the virtual machine configuration and start the virtual machine. Otherwise, destroy the iscsi session and remount the network disk.
10. A desktop cloud virtual machine disk failure detection and self-recovery device according to claim 6, Its characteristics are The analysis and judgment module sets different types of alarms for abnormal network card status, network unavailability, and iscsi server abnormalities, allowing administrators to quickly locate and repair abnormalities.
Citation Information
Cited By
Managing a boot of a data processing system during unrecoverable boot event
US12762017B2
Providing visual feedback during a startup recovery process
US12775539B2
Managing device health using a management controller of a data processing system
US20260288553A1
