Data acquisition method, fault diagnosis method, device, medium and program product
Patent Information
- Application Number
- CN202510522417.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2026-10-23
AI Technical Summary
[0004]本申请的多个方面提供一种数据采集方法、故障诊断方法、设备、介质及程序产品,用以解决云平台无法采集直通处理器的数据的问题
[0064]本申请实施例提供一种数据采集方法、故障诊断方法、设备、介质及程序产品,云平台可以在用户的第一虚拟机释放直通的第一处理器的情况下,创建第二虚拟机,并将第一处理器直通至第二虚拟机,通过第二虚拟机采集第一处理器的巡检数据,巡检数据用于第一处理器的运维。在本申请的技术方案中,云平台通过创建的第二虚拟机实现采集第一处理器的巡检数据,进而可以对第一处理器进行运维管理。
Smart Images

Figure CN122963698A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud computing, and in particular to a data acquisition method, fault diagnosis method, device, medium and program product. Background Technology
[0002] Processor passthrough is a hardware virtualization technology that allocates the host machine's physical processor to a virtual machine in a virtualization environment, allowing the virtual machine to directly access the physical processor without going through the host machine's operating system layer, thereby improving the virtual machine's processing power.
[0003] To perform operation and maintenance management of processors, cloud platforms need to collect processor data for analysis. However, with processor pass-through technology, the pass-through processor is a resource exclusively used by the user's virtual machine, and the cloud platform cannot collect data from the pass-through processor. Summary of the Invention
[0004] This application provides a data acquisition method, a fault diagnosis method, an apparatus, a medium, and a program product to solve the problem that cloud platforms cannot acquire data through processors.
[0005] In a first aspect, embodiments of this application provide a data acquisition method, the method comprising:
[0006] If the user's first virtual machine releases the first processor through passthrough, a second virtual machine is created, and the first processor is passed through to the second virtual machine;
[0007] The inspection data of the first processor is collected through the second virtual machine, and the inspection data of the first processor is used for the operation and maintenance of the first processor.
[0008] In one possible implementation, creating the second virtual machine includes:
[0009] Create the second virtual machine in the cloud;
[0010] Before passing the first processor through to the second virtual machine, the method further includes:
[0011] The second virtual machine is migrated to the host machine where the first processor is located.
[0012] In one possible implementation, creating the second virtual machine includes:
[0013] Create the second virtual machine on the host machine where the first processor is located.
[0014] In one possible implementation, the step of collecting the inspection data of the first processor through the second virtual machine further includes:
[0015] By running the inspection script through the second virtual machine, the inspection data of the first processor is obtained. The inspection data of the first processor includes at least one of the driver information, kernel logs, status information or error reports of the first processor.
[0016] In one possible implementation, the method further includes:
[0017] The inspection data of the first processor collected by the first virtual machine is obtained. The inspection data of the first processor is collected by the inspection script in the first virtual machine. The inspection data of the first processor includes at least one of the driver information, kernel log, status information or error report of the first processor.
[0018] Secondly, embodiments of this application provide a fault diagnosis method, including:
[0019] If the user's first virtual machine releases the first processor through passthrough, a second virtual machine is created, and the first processor is passed through to the second virtual machine;
[0020] The inspection data of the first processor is collected by the second virtual machine, and the first processor is diagnosed for faults based on the inspection data.
[0021] In one possible implementation, the method further includes:
[0022] The inspection data of the first processor collected by the first virtual machine is obtained. The inspection data of the first processor is collected by the inspection script in the first virtual machine. The inspection data of the first processor includes at least one of the driver information, kernel log, status information or error report of the first processor.
[0023] In one possible implementation, the method further includes:
[0024] Based on the inspection data of the first processor, diagnose whether the first processor has malfunctioned, and determine the fault type and corresponding maintenance operations when the first processor malfunctions.
[0025] In the event of a failure in the first processor, an alarm message is output to at least one virtual machine on the host machine where the first processor is located, based on the maintenance operation corresponding to the failure type. The alarm message is used to determine whether to execute the maintenance operation corresponding to the failure type.
[0026] In one possible implementation, the step of outputting alarm information to at least one virtual machine on the host machine where the first processor resides, based on the maintenance operation corresponding to the fault type, includes:
[0027] If the first processor fails and the maintenance operation corresponding to the failure type includes taking the host machine where the first processor is located offline, the alarm information is output to each virtual machine on the host machine. The alarm information is used to confirm whether to migrate or release the virtual machines on the host machine.
[0028] In response to an operation instruction for a third virtual machine on the host machine, the operation corresponding to the operation instruction is executed, wherein the operation instruction is a migration instruction or a release instruction, and the third virtual machine is any virtual machine on the host machine.
[0029] In one possible implementation, the step of outputting alarm information to at least one virtual machine on the host machine where the first processor resides, based on the maintenance operation corresponding to the fault type, includes:
[0030] If the first processor fails and the maintenance operation corresponding to the failure type does not include taking the host machine where the first processor is located offline, the alarm information is output to the first virtual machine. The alarm information is used to determine whether to perform any of the following maintenance operations: install the driver for the first processor, migrate the first virtual machine, restart the first virtual machine, or release the first virtual machine.
[0031] In response to the operation instruction confirming the migration of the first virtual machine, a migration operation is performed on the first virtual machine.
[0032] Thirdly, embodiments of this application provide a data acquisition device, the device comprising: a creation module and an acquisition module, wherein,
[0033] The creation module is used to create a second virtual machine when the user's first virtual machine releases the first processor through pass-through, and to pass-through the first processor to the second virtual machine;
[0034] The acquisition module is used to acquire the inspection data of the first processor through the second virtual machine, and the inspection data of the first processor is used for the operation and maintenance of the first processor.
[0035] In one possible implementation, the creation module is specifically used for:
[0036] Create the second virtual machine in the cloud;
[0037] Accordingly, before passing the first processor to the second virtual machine, the creation module 901 is further configured to:
[0038] The second virtual machine is migrated to the host machine where the first processor is located.
[0039] In one possible implementation, the creation module is specifically used for:
[0040] Create the second virtual machine on the host machine where the first processor is located.
[0041] In one possible implementation, the acquisition module is specifically used for:
[0042] By running the inspection script through the second virtual machine, the inspection data of the first processor is obtained. The inspection data of the first processor includes at least one of the driver information, kernel logs, status information or error reports of the first processor.
[0043] In one possible implementation, the data acquisition device further includes: an acquisition module, specifically used for:
[0044] The inspection data of the first processor collected by the first virtual machine is obtained. The inspection data of the first processor is collected by the inspection script in the first virtual machine. The inspection data of the first processor includes at least one of the driver information, kernel log, status information or error report of the first processor.
[0045] Fourthly, embodiments of this application provide a fault diagnosis device, the device comprising: a creation module and a data acquisition module, wherein,
[0046] The creation module is used to create a second virtual machine when the user's first virtual machine releases the first processor through pass-through, and to pass-through the first processor to the second virtual machine;
[0047] The diagnostic module is used to collect inspection data of the first processor through the second virtual machine and perform fault diagnosis on the first processor based on the inspection data of the first processor.
[0048] In one possible implementation, the data acquisition device further includes: an acquisition module, specifically used for:
[0049] The inspection data of the first processor collected by the first virtual machine is obtained. The inspection data of the first processor is collected by the inspection script in the first virtual machine. The inspection data of the first processor includes at least one of the driver information, kernel log, status information or error report of the first processor.
[0050] In one possible implementation, the fault diagnosis device further includes: an operation and maintenance module, which is specifically used for:
[0051] Based on the inspection data of the first processor, diagnose whether the first processor has malfunctioned; if the first processor has malfunctioned, diagnose the fault type of the first processor and the corresponding maintenance operation;
[0052] In the event of a failure in the first processor, an alarm message is output to at least one virtual machine on the host machine where the first processor is located, based on the maintenance operation corresponding to the failure type. The alarm message is used to determine whether to execute the maintenance operation corresponding to the failure type.
[0053] In one possible implementation, the operation and maintenance module is specifically used for:
[0054] If the first processor fails and the maintenance operation corresponding to the failure type includes taking the host machine where the first processor is located offline, the alarm information is output to each virtual machine on the host machine. The alarm information is used to confirm whether to migrate or release the virtual machines on the host machine.
[0055] In response to an operation instruction for a third virtual machine on the host machine, the operation corresponding to the operation instruction is executed on the third virtual machine, wherein the operation instruction is a migration instruction or a release instruction, and the third virtual machine is any virtual machine on the host machine.
[0056] In one possible implementation, the operation and maintenance module is specifically used for:
[0057] If the first processor fails and the maintenance operation corresponding to the failure type is any maintenance operation other than taking the host machine where the first processor is located offline, the alarm information is output to the first virtual machine. The alarm information is used to determine whether to perform any of the following maintenance operations: install the driver for the first processor, migrate the first virtual machine, restart the first virtual machine, or release the first virtual machine.
[0058] In response to the operation instruction confirming the migration of the first virtual machine, a migration operation is performed on the first virtual machine.
[0059] Fifthly, embodiments of this application provide an electronic device, including:
[0060] At least one processor; and a memory communicatively connected to said at least one processor;
[0061] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, cause the electronic device to perform the method described in either the first aspect or the method described in either the second aspect.
[0062] In a sixth aspect, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in any of the first aspects or the method described in any of the second aspects.
[0063] In a seventh aspect, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method described in any of the first aspects or the method described in any of the second aspects.
[0064] This application provides a data acquisition method, a fault diagnosis method, a device, a medium, and a program product. The cloud platform can create a second virtual machine when the first virtual machine releases a direct connection to the first processor, and then directly connect the first processor to the second virtual machine. The second virtual machine collects inspection data from the first processor, which is then used for the operation and maintenance of the first processor. In this technical solution, the cloud platform collects inspection data from the first processor through the created second virtual machine, thereby enabling operation and maintenance management of the first processor. Attached Figure Description
[0065] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0066] Figure 1 A flowchart illustrating a data acquisition method provided for an exemplary embodiment of this application. Figure 1 ;
[0067] Figure 2 A flowchart illustrating a data acquisition method provided for an exemplary embodiment of this application. Figure 2 ;
[0068] Figure 3 A flowchart illustrating a data acquisition method provided for an exemplary embodiment of this application. Figure 3 ;
[0069] Figure 4 A flowchart illustrating a fault diagnosis method provided for an exemplary embodiment of this application. Figure 1 ;
[0070] Figure 5A flowchart illustrating a fault diagnosis method provided for an exemplary embodiment of this application. Figure 2 ;
[0071] Figure 6 A flowchart illustrating a fault diagnosis method provided for an exemplary embodiment of this application. Figure 3 ;
[0072] Figure 7 A flowchart illustrating a fault diagnosis method provided for an exemplary embodiment of this application. Figure 4 ;
[0073] Figure 8 A flowchart illustrating a GPU fault diagnosis method provided in an embodiment of this application;
[0074] Figure 9 A schematic diagram of the structure of a data acquisition device provided for an exemplary embodiment of this application;
[0075] Figure 10 A schematic diagram of another data acquisition device provided as an exemplary embodiment of this application;
[0076] Figure 11 A schematic diagram of the structure of a fault diagnosis device provided for an exemplary embodiment of this application;
[0077] Figure 12 A schematic diagram of another fault diagnosis device provided as an exemplary embodiment of this application;
[0078] Figure 13 This is a schematic diagram of the structure of an electronic device provided as an exemplary embodiment of this application. Detailed Implementation
[0079] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0080] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0081] In cloud platforms, passthrough technology allows physical processors to be directly allocated to specific virtual machines (VMs), bypassing the host operating system layer and enabling the VMs to directly access the physical processors. The processor can be, for example, a Graphics Processing Unit (GPU) or a Central Processing Unit (CPU). Taking GPU passthrough to a VM as an example, the passthrough GPU is isolated and allocated to the VM by the virtualization software, becoming the VM's exclusive resource. The host machine cannot directly access the passthrough GPU. Since cloud platforms typically rely on the host machine to collect data from the passthrough GPU, the cloud platform cannot collect passthrough GPU data.
[0082] To address the aforementioned issues, this application provides a data acquisition method. When a user's first virtual machine releases a pass-through connection to a first processor, the cloud platform creates a second virtual machine and connects the first processor directly to the second virtual machine. Since the second virtual machine is a non-user virtual machine created by the cloud platform, inspection data of the first processor can be collected through the second virtual machine. This inspection data is used for fault diagnosis of the first processor. In this application's technical solution, the cloud platform can collect inspection data of the first processor by creating a second virtual machine, thereby enabling operation and maintenance management of the first processor.
[0083] The technical solutions shown in this application will now be described in detail through specific embodiments. It should be noted that the following embodiments may exist independently or in combination with each other; for identical or similar content, the description will not be repeated in different embodiments.
[0084] The execution subject in this application embodiment can be an electronic device or a data acquisition device installed in an electronic device. The data acquisition device can be implemented through software or a combination of software and hardware. The data acquisition device can be a server or a cloud platform running on a server. For ease of understanding, the following description will use a cloud platform as the execution subject.
[0085] Figure 1 A flowchart illustrating a data acquisition method provided for an exemplary embodiment of this application. Figure 1 Please see. Figure 1 The methods may include:
[0086] S101. If the user's first virtual machine releases the first processor through passthrough, create a second virtual machine and passthrough the first processor to the second virtual machine.
[0087] The first processor is the processor that the user's first virtual machine passes through. For example, the first processor could be a GPU. The first processor is configured to pass through the first virtual machine before it is released from the first virtual machine.
[0088] The first virtual machine is a virtual machine created by the user on the cloud platform. The data in the first virtual machine is the user's private data. Without authorization from the first virtual machine, the cloud platform has no right to access the data in the first virtual machine.
[0089] For example, when a user restarts or releases the first virtual machine, the first virtual machine will release the first processor, thus satisfying the condition that the user's first virtual machine releases the first processor.
[0090] If a user's first virtual machine releases the first processor through passthrough, the cloud platform can create a second virtual machine and passthrough the first processor to the second virtual machine. In this case, the second virtual machine can passthrough the first processor.
[0091] For example, a second virtual machine can be created through the cloud platform's control interface. This involves guiding the creation of the virtual machine according to the navigation items on the control interface, configuring basic information such as the virtual machine name, resource group, and location, and selecting the operating system and version. Furthermore, the cloud platform can transfer the relevant files of the second virtual machine to the host machine where the first processor resides using hot migration or cold migration methods, and then pass the first processor directly to the second virtual machine.
[0092] For example, the host machine where the first processor is located can be determined based on the first processor, and a second virtual machine can be created on that host machine.
[0093] Taking the first processor as the GPU as an example, passing the first processor to the second virtual machine allows you to start virtualization technology on the host machine, set the first processor as the GPU of the second virtual machine, enable the passthrough function in the configuration file of the second virtual machine, select the first processor, and install the GPU driver in the second virtual machine.
[0094] S102. Collect inspection data from the first processor through the second virtual machine.
[0095] The inspection data for the first processor is used for its operation and maintenance. Taking the first processor as a CPU as an example, the inspection data includes CPU-related data such as CPU utilization, CPU frequency, CPU cache hit rate, and CPU error logs. Taking the first processor as a GPU as an example, the inspection data includes GPU-related data such as GPU model, driver version, GPU utilization, and GPU error logs. For example, the inspection data for the first processor can be used to detect real-time data of the first processor, or to diagnose faults in the first processor.
[0096] The second virtual machine is a virtual machine created by the cloud platform to collect inspection data from the first processor. Inspection data from the first processor can be collected through the second virtual machine.
[0097] Taking GPU-related data as an example, the second virtual machine can collect inspection data from the first processor through inspection scripts. For instance, the inspection script might include the `nvidia-smi` command, which retrieves data such as GPU temperature, power consumption, and utilization. It might also include the `lspci` command, which retrieves data such as GPU model and pass-through status. Furthermore, the script might include commands to retrieve GPU error logs, providing historical error and warning information related to the GPU. Finally, the script might include commands to retrieve GPU driver logs, providing historical information about the GPU driver.
[0098] Taking GPU-related inspection data as an example, the second virtual machine can collect inspection data from the first processor using data acquisition methods found in related technologies. For instance, log information can be obtained using logging tools found in related technologies, and GPU-related log information can be filtered from the log information.
[0099] In the technical solution of this application, when the user's first virtual machine releases the pass-through to the first processor, the cloud platform creates a second virtual machine and passes the first processor directly to the second virtual machine. The second virtual machine collects inspection data from the first processor, and this inspection data is used for the operation and maintenance of the first processor. In this technical solution, the cloud platform collects inspection data from the first processor through the created second virtual machine, thereby enabling the operation and maintenance management of the first processor.
[0100] The following section explains how to create a second virtual machine.
[0101] Optionally, the cloud platform can create a second virtual machine in the cloud. In this approach, before directly connecting the first processor to the second virtual machine, the cloud platform can also migrate the second virtual machine to the host machine where the first processor resides.
[0102] For example, a cloud platform can create a second virtual machine in the cloud using an Open Application Programming Interface (Open API). Creating a virtual machine in the cloud via an Open API is a way to automate resource deployment and management using cloud computing services. Based on the Open APIs related to virtual machine creation, a virtual machine can be created programmatically by requesting its creation. For instance, the Open API can be called programmatically, with the configuration parameters of the virtual machine to be created, such as the number of CPU cores, memory size, storage type, and operating system, written into the code. A request can then be sent to the cloud service through the programming interface to create a second virtual machine in the cloud.
[0103] Figure 2 A flowchart illustrating a data acquisition method provided for an exemplary embodiment of this application. Figure 2 Please see. Figure 2 In the case where the first virtual machine releases the first processor, the method may include:
[0104] S201. Create a second virtual machine in the cloud.
[0105] For example, a virtual machine can be created by calling the Open API programmatically, and the configuration parameters of the virtual machine can be passed in according to the parameters required by the API. A request can be sent to the cloud service through the programming interface to create a second virtual machine in the cloud.
[0106] S202. Migrate the second virtual machine to the host machine where the first processor is located.
[0107] For example, the cloud platform can determine the host machine where the first processor is located based on the first processor, and transfer the relevant files of the second virtual machine to the host machine where the first processor is located based on hot migration or cold migration methods.
[0108] S203, pass the first processor directly to the second virtual machine.
[0109] For example, virtualization technology can be started in the host machine, the first processor can be set as the processor of the second virtual machine, and the passthrough function can be enabled in the configuration file of the second virtual machine, selecting the first processor as the passthrough processor.
[0110] S204. Collect inspection data from the first processor through the second virtual machine.
[0111] Optionally, a patrol script can be run on a second virtual machine to obtain patrol data. The patrol data may include, for example, at least one of the following: driver information of the first processor, kernel logs, status information, or error reports. The patrol script is a pre-written script capable of collecting patrol data.
[0112] Taking the GPU as the first processor as an example, the inspection data can include GPU driver information, kernel logs, status information or error reports. Among them, GPU driver information includes information such as driver compatibility, version matching and driver status. GPU kernel logs include information such as hardware interaction, driver loading errors and GPU status in virtual machines. GPU status information includes information such as load, temperature and power consumption. GPU error reports include information on reported hardware errors or calculation errors.
[0113] Taking a GPU as the primary processor as an example, the inspection script can include the `nvidia-smi` command. Running the inspection script through a second virtual machine can collect driver information and status information such as temperature, power, and utilization. The inspection script can also include commands to retrieve kernel logs; running the inspection script through a second virtual machine can collect kernel logs. The inspection script can also include the `nvidia-bug-report` script, which contains commands to retrieve kernel logs; running the inspection script through a second virtual machine can collect GPU error reports.
[0114] It should be noted that, in Figure 2 The various processing steps (S201-S204) shown in the embodiments do not constitute a specific limitation on the request processing procedure. In other embodiments of this application, the request processing procedure may include more than Figure 2 The embodiments may have more or fewer steps. For example, the request processing procedure may include more or fewer steps. Figure 2 Some steps in the embodiments, or, Figure 2 Some steps in the embodiments can be replaced by steps with the same function, or Figure 2 Some steps in the embodiments can be broken down into multiple steps, etc.
[0115] In the technical solution of this application, when the user's first virtual machine releases the pass-through to the first processor, the cloud platform creates a second virtual machine and passes the first processor directly to the second virtual machine. The second virtual machine collects inspection data from the first processor, and this inspection data is used for the operation and maintenance of the first processor. In this technical solution, the cloud platform collects inspection data from the first processor through the created second virtual machine, thereby enabling the operation and maintenance management of the first processor.
[0116] Optionally, a second virtual machine can be created on the host machine where the first processor is located.
[0117] Figure 3 A flowchart illustrating a data acquisition method provided for an exemplary embodiment of this application. Figure 3 Please see. Figure 3 In the case where the first virtual machine releases the first processor, the method may include:
[0118] S301. Create a second virtual machine on the host machine where the first processor is located.
[0119] For example, the host machine where the first processor resides is determined based on the first processor, and a second virtual machine is created on that host machine. For instance, a virtual machine image file containing system installation information is obtained from the host machine where the first processor resides. A virtual machine is created using a command to create a virtual machine, and the image file is associated with it, i.e., the image file is designated as the boot disk for the virtual machine. The parameters of the virtual network are configured, and the virtual machine is started using a command to start the virtual machine. This virtual machine is used to create the second virtual machine on the host machine where the first processor resides.
[0120] For example, a script file for generating a virtual machine can be created in advance. In this method, the host machine where the first processor is located is determined based on the first processor, and the script file for generating a virtual machine is executed on the host machine to create a second virtual machine.
[0121] S302, pass the first processor directly to the second virtual machine.
[0122] The host machine of the first processor includes at least one processor. Taking the first processor as a GPU as an example, virtualization technology can be started in the host machine, the first processor can be set as the GPU of the second virtual machine, the GPU passthrough function can be enabled in the configuration file of the second virtual machine, and the first processor can be selected as the passthrough GPU device.
[0123] S303: Collect inspection data from the first processor through the second virtual machine.
[0124] Optionally, a patrol script can be run through a second virtual machine to obtain patrol data, which includes at least one of the following: driver information, kernel logs, status information, or error reports from the first processor. The patrol script is a pre-written script that can collect patrol data.
[0125] Optionally, the second virtual machine can send inspection data to the cloud platform via a serial port. For example, a virtual serial port can be created in the second virtual machine and mapped to a domain socket or pipe on the host machine where the second virtual machine resides. The host machine converts the serial port data into a network protocol and then transmits it to the cloud platform via the Internet. In this method, the second virtual machine can be a virtual machine without network configuration, and the cloud platform can obtain the inspection data through the serial port.
[0126] It should be noted that, in Figure 3 The various processing steps (S301-S303) shown in the embodiments do not constitute a specific limitation on the request processing procedure. In other embodiments of this application, the request processing procedure may include more than Figure 3 The embodiments may have more or fewer steps. For example, the request processing procedure may include more or fewer steps. Figure 3 Some steps in the embodiments, or, Figure 3 Some steps in the embodiments can be replaced by steps with the same function, or Figure 3 Some steps in the embodiments can be broken down into multiple steps, etc.
[0127] In the technical solution of this application, a second virtual machine is created on the host machine where the first processor resides, and the first processor is directly connected to the second virtual machine. Inspection data of the first processor is collected through the second virtual machine, and this inspection data is used for the operation and maintenance of the first processor. Since creating the second virtual machine on the host machine where the first processor resides has a higher priority than creating the second virtual machine in the cloud and migrating it to the host machine where the first processor resides, the direct connection to the first processor is possible, and the reliability of collecting inspection data of the first processor through the second virtual machine is higher.
[0128] Optionally, the inspection data of the first processor can be obtained by acquiring the inspection data of the first processor collected by the first virtual machine, which is collected by the inspection script in the first virtual machine.
[0129] The inspection data of the first processor is used for the operation and maintenance of the first processor. The inspection data of the first processor includes at least one of the following: driver information, kernel logs, status information, or error reports of the first processor.
[0130] In this approach, the first virtual machine is the user's virtual machine. For example, the inspection plugin provided by the cloud platform can be downloaded to the first virtual machine. The inspection plugin includes an inspection script for collecting inspection data. By running the inspection plugin on the first virtual machine, the driver information, kernel logs, status information and error reports of the first processor can be obtained as the inspection data of the first processor.
[0131] It should be understood that in this approach, the first virtual machine actively runs the inspection script, allowing the cloud platform to obtain the data collected by the inspection script. Taking the above embodiment as an example, if the first virtual machine downloads the inspection plugin provided by the cloud platform, the cloud platform obtains the inspection data obtained by running the inspection plugin based on the authorization of the user to which the first virtual machine belongs.
[0132] In the technical solution of this application, the cloud platform can acquire the inspection data of the first processor collected by the first virtual machine even when the first processor of the user's first virtual machine has not been released. Compared with the related technologies, which require the user to submit a work order and provide the inspection data of the first processor to the cloud platform for analysis, the cloud platform can acquire the inspection data of the first processor in real time, thereby improving the efficiency of collecting the inspection data of the first processor.
[0133] Below, in conjunction with Figure 4 The present application provides an example of a fault diagnosis method based on an exemplary embodiment.
[0134] Figure 4 A flowchart illustrating a fault diagnosis method provided for an exemplary embodiment of this application. Figure 1 Please see. Figure 4 It can include:
[0135] S401. If the user's first virtual machine releases the first processor through passthrough, create a second virtual machine and passthrough the first processor to the second virtual machine.
[0136] Creating a second virtual machine and passing the first processor to the second virtual machine can be done by following the same steps as in the above embodiments.
[0137] S402. Collect inspection data of the first processor through the second virtual machine, and perform fault diagnosis on the first processor based on the inspection data of the first processor.
[0138] The first processor is diagnosed based on the inspection data of the first processor. For example, the diagnosis can be based on a pre-trained diagnostic model, which can be built based on convolutional neural networks and Transformers. The model can extract features from the inspection data and output diagnostic results, such as whether the first processor is malfunctioning or malfunctioning but operating normally.
[0139] Optionally, when diagnosing faults in the first processor based on the inspection data of the first processor, a host baseline query can be performed to obtain the basic hardware information of the first processor in the host. Based on the basic hardware information of the first processor and the inspection data of the first processor, fault diagnosis can be performed on the first processor.
[0140] Optionally, the cloud platform can diagnose whether the first processor has failed based on the inspection data of the first processor, as well as the fault type and corresponding maintenance operation in the event of a fault in the first processor. In the event of a fault in the first processor, the cloud platform can output alarm information to at least one virtual machine on the host machine where the first processor is located based on the maintenance operation corresponding to the fault type.
[0141] The alarm information is used to determine whether to perform the corresponding maintenance operation for the fault type.
[0142] Fault types can be categorized based on their causes. Taking a GPU as the primary processor, fault types could include GPU hardware loss, driver loading errors, and kernel upgrade errors. The corresponding maintenance actions for each fault type are the methods used to resolve that type of processor fault. For example, if the fault type is GPU hardware loss, the corresponding maintenance action could be migrating the virtual machines on the host machine hosting the primary processor and taking the host machine hosting the primary processor offline.
[0143] Table 1 illustrates various fault types and their corresponding maintenance operations. As shown in Table 1, fault types can include GPU device hardware loss, NVIDIA NVLink anomalies, kernel upgrade anomalies, driver loading anomalies, Error-Correcting Code (ECC) errors, Read-Only Memory (ROM) anomalies, Execution Context Identifier (XID) errors caused by Data Buffer Error (DBE), XID errors caused by outdated driver versions, XID errors caused by GPU card loss, and Fabricm administrator component anomalies. The corresponding maintenance operations for each of the following fault types are as follows: GPU device hardware loss, NVIDIA NVLink abnormality, ROM abnormality, XID error (GPU card drop), etc., are to migrate the virtual machine on the host machine where the first processor is located and take the host machine where the first processor is located offline; the maintenance operation for kernel upgrade abnormality is to upgrade the driver; the maintenance operation for driver loading abnormality is to install the driver; the maintenance operation for ECC error is to restart the virtual machine; the maintenance operation for XID error (DBE) is to restart the virtual machine; the maintenance operation for XID error (outdated driver version) is to upgrade the driver; and the maintenance operation for Fabricm manager component abnormality is to install or reload the fiber optic network.
[0144] Table 1. Fault Types and Corresponding Maintenance Operations
[0145]
[0146]
[0147] It should be understood that Table 1 only illustrates various fault types and their corresponding maintenance operations. The maintenance operations corresponding to the fault types mentioned above can also be other maintenance operations, and this application does not impose any restrictions on this. Optionally, fault types can also be classified based on other methods, and this application does not impose any restrictions on this.
[0148] Figure 5 A flowchart illustrating a fault diagnosis method provided for an exemplary embodiment of this application. Figure 2 Please see. Figure 5 The methods may include:
[0149] S501, Obtain the inspection data of the first processor.
[0150] For example, the inspection data includes at least one of the following: driver information of the first processor, kernel logs, status information, or error reports.
[0151] S502. Based on the inspection data, diagnose whether the first processor has malfunctioned.
[0152] If so, then execute S503;
[0153] If not, then execute S501.
[0154] S503. Determine the fault type and the corresponding maintenance operation.
[0155] For example, a diagnostic model can be used to diagnose whether a first processor has failed, and to obtain the fault type of the first processor and the corresponding maintenance operations. Taking the inspection data as including driver information, kernel logs, status information, or error reports, and the first processor as a GPU, the driver information, kernel logs, status information, or error reports within the same time period, as well as whether the GPU failed within that time period, the fault type, and the corresponding maintenance operations can be used as a set of training samples. The diagnostic model can be trained using a large number of training samples. After training, the diagnostic model can output whether the GPU has failed, the fault type, and the corresponding maintenance operations based on the inspection data.
[0156] In this method, the inspection data of the first processor is input into the trained diagnostic model to obtain whether the first processor has failed. If the first processor fails, the diagnostic model also outputs the fault type of the first processor and the corresponding maintenance operation.
[0157] For example, a knowledge graph can be used to diagnose whether a first processor has failed, and to obtain the fault type and corresponding maintenance operations for that fault type. In this approach, a knowledge graph is pre-constructed based on driver information, kernel logs, status information, or error reports, as well as whether a GPU has failed within a given time period, the fault type, and the corresponding maintenance operations. The constructed knowledge graph can then infer from the first processor's inspection data whether a fault has occurred. If a fault has occurred, the knowledge graph can also determine the fault type and corresponding maintenance operations for that fault type.
[0158] For example, taking inspection data including driver information, kernel logs, status information, or error reports, and the first processor being a GPU, the driver information, kernel logs, status information, or error reports within the same time period, as well as whether the GPU malfunctioned within that time period and the type of malfunction, can be used as a set of training samples. The diagnostic model can be trained using a large number of training samples. After training, the diagnostic model can output whether the GPU malfunctioned and the type of malfunction based on the inspection data.
[0159] In this approach, the inspection data of the first processor is input into a trained diagnostic model to obtain whether the first processor has failed. If the first processor has failed, it also outputs the fault type. Furthermore, based on a pre-built mapping relationship between fault types and maintenance operations, the corresponding maintenance operation for the fault type of the first processor is obtained.
[0160] S504. Based on the maintenance operation corresponding to the fault type, output alarm information to at least one virtual machine on the host machine where the first processor is located.
[0161] Alarm information is used to determine whether to perform the corresponding maintenance operation for the fault type.
[0162] For example, fault types can include GPU device hardware loss and driver loading anomaly. For a fault type of GPU device hardware loss, the corresponding maintenance operation could be migrating the virtual machine on the host machine where the first processor resides and taking the host machine where the first processor resides offline. For a fault type of driver loading anomaly, the corresponding maintenance operation could be installing the driver for the first processor.
[0163] If the corresponding maintenance operation for the fault type is to migrate the virtual machines on the host machine where the first processor is located and take the host machine where the first processor is located offline, alarm information can be output to all virtual machines on the host machine where the first processor is located to determine whether to perform the migration operation.
[0164] If the inspection data of the first processor collected by the first virtual machine is used to diagnose a fault in the first processor, and the fault type is driver loading abnormality, and the corresponding maintenance operation is to install the driver of the first processor, then an alarm message can be output to the first virtual machine to determine whether the driver of the first processor should be installed.
[0165] It should be noted that, in Figure 5 The various processing steps (S501-S504) shown in the embodiments do not constitute a specific limitation on the request processing procedure. In other embodiments of this application, the request processing procedure may include more than Figure 5 The embodiments may have more or fewer steps. For example, the request processing procedure may include more or fewer steps. Figure 5 Some steps in the embodiments, or, Figure 5 Some steps in the embodiments can be replaced by steps with the same function, or Figure 5 Some steps in the embodiments can be broken down into multiple steps, etc.
[0166] The following section explains how to output alarm information to at least one virtual machine on the host machine where the first processor resides, based on the corresponding maintenance operations for the fault type.
[0167] For example, if the first processor fails and the corresponding maintenance operation includes taking the host machine containing the first processor offline, the cloud platform can output alarm information to each virtual machine on the host machine. In response to an operation command for a third virtual machine on the host machine, the platform executes the operation corresponding to the command, which can be a migration command or a release command. The third virtual machine can be any virtual machine on the host machine. The alarm information is used to confirm whether to migrate or release the virtual machines on the host machine.
[0168] Figure 6 A flowchart illustrating a fault diagnosis method provided for an exemplary embodiment of this application. Figure 3 Please see. Figure 6 The methods may include:
[0169] S601, Collect inspection data from the first processor.
[0170] S602. Based on the inspection data, diagnose whether the first processor has malfunctioned.
[0171] If so, then execute S603;
[0172] If not, then execute S601.
[0173] S603. Determine the fault type and the corresponding maintenance operation.
[0174] S604. Does the maintenance operation corresponding to the fault type include the host machine where the first processor is taken offline?
[0175] If so, then execute S605;
[0176] If not, then execute S607.
[0177] S605: Output alarm information to each virtual machine on the host machine.
[0178] Alarm messages are used to confirm whether to migrate or release virtual machines on the host machine.
[0179] The corresponding maintenance operations for this type of fault include migrating all virtual machines on the host machine where the first processor is taken offline to another host machine. In this approach, for example, alarm information can be output to each virtual machine on the host machine. This alarm information may include notifications to the user that a GPU fault has occurred on the host machine, as well as information confirming the migration of the virtual machines.
[0180] Optionally, the alarm information may include information on multiple operational operations that determine the migration or release.
[0181] S606: In response to an operation command for a third virtual machine on the host machine, execute the operation corresponding to the operation command.
[0182] The operation command is either a migration command or a release command, and the third virtual machine is any virtual machine on the host machine.
[0183] For example, for a third virtual machine, the alarm information includes information to determine whether to migrate the virtual machine. The user can confirm the migration of the third virtual machine through the interactive interface and trigger the migration command. The cloud platform responds to the migration command for the third virtual machine on the host machine and performs the operation of migrating the third virtual machine, either hot-migrating or cold-migrating the third virtual machine to another host machine.
[0184] For example, for a third virtual machine, the alarm information includes information on whether to release the virtual machine. The user can confirm the release of the third virtual machine through an interactive interface, triggering a release command. The cloud platform responds to the release command for the third virtual machine on the host machine and performs the operation to release the third virtual machine. Optionally, the user can actively release the third virtual machine. In this method, no release command is triggered, and the cloud platform does not need to respond to the release command.
[0185] For example, for a third virtual machine, the alarm information includes information on whether to migrate or release the virtual machine. The user can confirm the release of the third virtual machine through the interactive interface to trigger a release command, or confirm the migration of the third virtual machine to trigger a migration command. The cloud platform responds to the release command for the third virtual machine on the host machine by performing the operation of releasing the third virtual machine, or responds to the migration command for the third virtual machine on the host machine by performing the operation of migrating the third virtual machine.
[0186] Optionally, after executing the operation corresponding to the operation instruction, a maintenance work order can be generated. The maintenance work order is used to instruct the host machine where the first processor is located to be taken offline for maintenance.
[0187] S607, Perform maintenance operations.
[0188] Perform the maintenance operations corresponding to the fault type. For example, the maintenance operation could be to generate a maintenance work order, which could instruct the execution of maintenance operations that do not require taking the host machine where the first processor is located offline, such as checking the host machine where the first processor is located.
[0189] It should be noted that, in Figure 6 The various processing steps (S601-S607) shown in the embodiments do not constitute a specific limitation on the request processing procedure. In other embodiments of this application, the request processing procedure may include more than Figure 6 The embodiments may have more or fewer steps. For example, the request processing procedure may include more or fewer steps. Figure 6 Some steps in the embodiments, or, Figure 6 Some steps in the embodiments can be replaced by steps with the same function, or Figure 6 Some steps in the embodiments can be broken down into multiple steps, etc.
[0190] For example, if the first processor fails and the corresponding maintenance operation is any operation other than taking the host machine where the first processor is located offline, the cloud platform can output an alarm message to the first virtual machine. The alarm message is used to determine whether to perform any of the following maintenance operations: install the driver for the first processor, migrate the first virtual machine, restart the first virtual machine, or release the first virtual machine. In response to the operation instruction to confirm the migration of the first virtual machine, the migration operation is performed on the first virtual machine.
[0191] Figure 7 A flowchart illustrating a fault diagnosis method provided for an exemplary embodiment of this application. Figure 4 For example, to collect inspection data from the first processor via the first virtual machine, please refer to [link to relevant documentation]. Figure 7 The methods may include:
[0192] S701: Collect inspection data from the first processor through the first virtual machine.
[0193] S702. Based on the inspection data, diagnose whether the first processor has malfunctioned.
[0194] If so, then execute S703;
[0195] If not, then execute S701.
[0196] S703. Determine the fault type and the corresponding maintenance operation.
[0197] S704. Does the maintenance operation corresponding to the fault type include the host machine where the first processor is taken offline?
[0198] If so, then execute S707;
[0199] If not, then execute S705.
[0200] S705, Output alarm information to the first virtual machine.
[0201] Alarm information is used to determine whether to perform any of the following maintenance operations: install the driver for the first processor, migrate the first virtual machine, restart the first virtual machine, or release the first virtual machine.
[0202] For example, for the first virtual machine, the alarm information includes a determination of whether to perform any of the following maintenance operations: installing the driver for the first processor, migrating the first virtual machine, restarting the first virtual machine, or releasing the first virtual machine. The user can confirm a maintenance operation through an interactive interface. For example, an alarm message for installing the driver for the first processor is output to the first virtual machine, or an alarm message for whether to restart or release the first virtual machine is output to the first virtual machine.
[0203] S706. In response to the operation instruction to confirm the migration of the first virtual machine, perform the migration operation on the first virtual machine.
[0204] For example, the alarm information output to the first virtual machine includes maintenance operations for migrating and restarting the first virtual machine. The user can confirm the migration of the third virtual machine through the interactive interface, and the cloud platform responds to the operation command to migrate the first virtual machine and performs the migration operation on the first virtual machine. The user can also confirm the restart of the third virtual machine through the interactive interface. In this method, the user can restart the first virtual machine by itself without the need for a response from the cloud platform.
[0205] For example, the alarm information output to the first virtual machine includes an alarm message to determine whether the driver for the first processor is installed. The user can confirm the installation of the driver for the first processor through the interactive interface and install the driver for the first processor by themselves without the need for a response from the cloud platform.
[0206] S707, Perform maintenance operations.
[0207] The cloud platform executes the corresponding maintenance operation based on the fault type.
[0208] Figure 8 This is a flowchart illustrating a GPU fault diagnosis method provided in an embodiment of this application. Taking a GPU as an example, as... Figure 8 As shown:
[0209] The acquisition layer obtains GPU-related inspection data and stores it in the data layer. The analysis layer performs fault diagnosis on the GPU based on the acquired inspection data from the data layer. The fault diagnosis outputs whether the first processor has failed, the fault type, and the corresponding maintenance operations. Based on the maintenance operations corresponding to the fault type, actions such as installing or upgrading drivers, restarting virtual machines, migrating virtual machines, or releasing virtual machines can be performed.
[0210] The acquisition layer can implement the data acquisition method in the above embodiments, which can acquire the inspection data of the first processor based on the second virtual machine created in the cloud, acquire the inspection data of the first processor based on the second virtual machine created on the host machine where the first processor is located, or acquire the inspection data of the first processor based on the user's first virtual machine.
[0211] Optionally, the data acquisition method for the acquisition layer using the first processor can be selected according to the application scenario. For example, if the first processor is released by the first virtual machine, the inspection data of the first processor can be obtained based on the second virtual machine created on it, or the inspection data of the first processor can be obtained based on the second virtual machine created on the host machine where the first processor is located. If the first processor is not released by the first virtual machine, the inspection data of the first processor can be obtained through the first virtual machine on the user's end.
[0212] In the technical solution of this application, the cloud platform can obtain the inspection data of the first processor and perform fault diagnosis on the first processor based on the inspection data of the first processor. Furthermore, based on the fault type of the fault diagnosis, operation and maintenance operations can be output to detect and handle processor faults in a timely manner.
[0213] Figure 9 This is a schematic diagram of a data acquisition device provided for an exemplary embodiment of this application. Please refer to... Figure 9 The data acquisition device 900 may include: a creation module 901 and an acquisition module 902, wherein,
[0214] The creation module 901 is used to create a second virtual machine when the user's first virtual machine releases the first processor that has been passed through, and to pass through the first processor to the second virtual machine;
[0215] The acquisition module 902 is used to acquire the inspection data of the first processor through the second virtual machine, and the inspection data of the first processor is used for the operation and maintenance of the first processor.
[0216] In one possible implementation, the creation module 901 is specifically used for:
[0217] Create the second virtual machine in the cloud;
[0218] Accordingly, before passing the first processor to the second virtual machine, the creation module 901 is further configured to:
[0219] The second virtual machine is migrated to the host machine where the first processor is located.
[0220] In one possible implementation, the creation module 901 is specifically used for:
[0221] Create the second virtual machine on the host machine where the first processor is located.
[0222] In one possible implementation, the acquisition module 902 is specifically used for:
[0223] By running the inspection script through the second virtual machine, the inspection data of the first processor is obtained. The inspection data of the first processor includes at least one of the driver information, kernel logs, status information or error reports of the first processor.
[0224] The data acquisition device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0225] Figure 10 A schematic diagram of another data acquisition device provided for an exemplary embodiment of this application. Please refer to... Figure 10 ,exist Figure 9 Based on the illustrated embodiment, the data acquisition device 900 may further include: an acquisition module 1001, wherein,
[0226] In one possible implementation, the acquisition module 1001 is specifically used for:
[0227] The inspection data of the first processor collected by the first virtual machine is obtained. The inspection data of the first processor is collected by the inspection script in the first virtual machine. The inspection data of the first processor includes at least one of the driver information, kernel log, status information or error report of the first processor.
[0228] The data acquisition device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0229] Figure 11 This is a schematic diagram of a fault diagnosis device provided for an exemplary embodiment of this application. Please refer to... Figure 11 The fault diagnosis device 1100 may include: a creation module 1101 and a diagnosis module 1102, wherein,
[0230] The creation module 1101 is used to create a second virtual machine when the user's first virtual machine releases the first processor through pass-through, and to pass-through the first processor to the second virtual machine;
[0231] The diagnostic module 1102 is used to collect the inspection data of the first processor through the second virtual machine, and to perform fault diagnosis on the first processor based on the inspection data of the first processor.
[0232] The fault diagnosis device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0233] Figure 12 A schematic diagram of another fault diagnosis device provided as an exemplary embodiment of this application. Please refer to... Figure 12 ,exist Figure 11 Based on the illustrated embodiment, the fault diagnosis device 1100 may further include: an acquisition module 1201 and an operation and maintenance module 1202, wherein,
[0234] In one possible implementation, the acquisition module 1201 is specifically used for:
[0235] The inspection data of the first processor collected by the first virtual machine is obtained. The inspection data of the first processor is collected by the inspection script in the first virtual machine. The inspection data of the first processor includes at least one of the driver information, kernel log, status information or error report of the first processor.
[0236] In one possible implementation, the operation and maintenance module 1202 is specifically used for:
[0237] Based on the inspection data of the first processor, diagnose whether the first processor has malfunctioned; if the first processor has malfunctioned, diagnose the fault type of the first processor and the corresponding maintenance operation;
[0238] In the event of a failure in the first processor, an alarm message is output to at least one virtual machine on the host machine where the first processor is located, based on the maintenance operation corresponding to the failure type. The alarm message is used to determine whether to execute the maintenance operation corresponding to the failure type.
[0239] In one possible implementation, the operation and maintenance module 1202 is specifically used for:
[0240] If the first processor fails and the maintenance operation corresponding to the failure type includes taking the host machine where the first processor is located offline, the alarm information is output to each virtual machine on the host machine. The alarm information is used to confirm whether to migrate or release the virtual machines on the host machine.
[0241] In response to an operation instruction for a third virtual machine on the host machine, the operation corresponding to the operation instruction is executed on the third virtual machine, wherein the operation instruction is a migration instruction or a release instruction, and the third virtual machine is any virtual machine on the host machine.
[0242] In one possible implementation, the operation and maintenance module 1202 is specifically used for:
[0243] If the first processor fails and the maintenance operation corresponding to the failure type is any maintenance operation other than taking the host machine where the first processor is located offline, the alarm information is output to the first virtual machine. The alarm information is used to determine whether to perform any of the following maintenance operations: install the driver for the first processor, migrate the first virtual machine, restart the first virtual machine, or release the first virtual machine.
[0244] In response to the operation instruction confirming the migration of the first virtual machine, a migration operation is performed on the first virtual machine.
[0245] The data acquisition device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0246] Figure 13 This is a schematic diagram of the structure of an electronic device provided for an exemplary embodiment of this application. Please refer to... Figure 13 The electronic device 1300 may include a processor 1301 and a memory 1302. Exemplarily, the processor 1301 and the memory 1302 are interconnected via a bus 1303.
[0247] The memory 1302 stores computer-executed instructions;
[0248] The processor 1301 executes the computer execution instructions stored in the memory 1302, causing the processor 1301 to perform the method as shown in the above method embodiment.
[0249] Accordingly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in the above-described method embodiments.
[0250] Accordingly, embodiments of this application may also provide a computer program product, including a computer program, which, when executed by a processor, can implement the methods shown in the above-described method embodiments.
[0251] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0252] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0253] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0254] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0255] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0256] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0257] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0258] It should also be noted that 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 limitation, 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.
[0259] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A data acquisition method, characterized in that, The method includes: If the user's first virtual machine releases the first processor through passthrough, a second virtual machine is created, and the first processor is passed through to the second virtual machine; The inspection data of the first processor is collected through the second virtual machine, and the inspection data of the first processor is used for the operation and maintenance of the first processor.
2. The method according to claim 1, characterized in that, The creation of the second virtual machine includes: Create the second virtual machine in the cloud; Before passing the first processor through to the second virtual machine, the method further includes: The second virtual machine is migrated to the host machine where the first processor is located.
3. The method according to claim 1, characterized in that, The creation of the second virtual machine includes: Create the second virtual machine on the host machine where the first processor is located.
4. The method according to any one of claims 1-3, characterized in that, The step of collecting inspection data from the first processor via the second virtual machine includes: By running the inspection script through the second virtual machine, the inspection data of the first processor is obtained. The inspection data of the first processor includes at least one of the driver information, kernel logs, status information or error reports of the first processor.
5. The method according to claim 1, characterized in that, The method further includes: The inspection data of the first processor collected by the first virtual machine is obtained. The inspection data of the first processor is collected by the inspection script in the first virtual machine. The inspection data of the first processor includes at least one of the driver information, kernel log, status information or error report of the first processor.
6. A fault diagnosis method, characterized in that, The method includes: If the user's first virtual machine releases the first processor through passthrough, a second virtual machine is created, and the first processor is passed through to the second virtual machine; The inspection data of the first processor is collected by the second virtual machine, and the first processor is diagnosed for faults based on the inspection data.
7. The method according to any one of claims 6, characterized in that, The method further includes: The inspection data of the first processor collected by the first virtual machine is obtained. The inspection data of the first processor is collected by the inspection script in the first virtual machine. The inspection data of the first processor includes at least one of the driver information, kernel log, status information or error report of the first processor.
8. The method according to claim 5 or 6, characterized in that, The method further includes: Based on the inspection data of the first processor, diagnose whether the first processor has malfunctioned; if the first processor has malfunctioned, diagnose the fault type of the first processor and the corresponding maintenance operation; In the event of a failure in the first processor, an alarm message is output to at least one virtual machine on the host machine where the first processor is located, based on the maintenance operation corresponding to the failure type. The alarm message is used to determine whether to execute the maintenance operation corresponding to the failure type.
9. The method according to claim 8, characterized in that, The step of outputting alarm information to at least one virtual machine on the host machine where the first processor resides, based on the maintenance operation corresponding to the fault type, includes: If the first processor fails and the maintenance operation corresponding to the failure type includes taking the host machine where the first processor is located offline, the alarm information is output to each virtual machine on the host machine. The alarm information is used to confirm whether to migrate or release the virtual machines on the host machine. In response to an operation instruction for a third virtual machine on the host machine, the operation corresponding to the operation instruction is executed on the third virtual machine, wherein the operation instruction is a migration instruction or a release instruction, and the third virtual machine is any virtual machine on the host machine.
10. The method according to claim 8, characterized in that, The step of outputting alarm information to at least one virtual machine on the host machine where the first processor resides, based on the maintenance operation corresponding to the fault type, includes: If the first processor fails and the maintenance operation corresponding to the failure type is any maintenance operation other than taking the host machine where the first processor is located offline, the alarm information is output to the first virtual machine. The alarm information is used to determine whether to perform any of the following maintenance operations: install the driver for the first processor, migrate the first virtual machine, restart the first virtual machine, or release the first virtual machine. In response to the operation instruction confirming the migration of the first virtual machine, a migration operation is performed on the first virtual machine.
11. An electronic device, characterized in that, include: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, cause the electronic device to perform the method according to any one of claims 1-10.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the method as described in any one of claims 1-10.
13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-10.