A Fault Recovery Method and Device for a Virtualization Device
By adding a virtualization device synchronization module to the hypervisor, obtaining the configuration information and data queue status data of the failed virtualization device and migrating to a new virtualization device, the operational abnormality of the virtual machine caused by virtualization device failure is solved, and efficient failure recovery and service continuity of the virtual machine is achieved.
Patent Information
- Application Number
- CN202111679753.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2041-12-31
AI Technical Summary
During the operation of the virtual machine, the virtual machine runs abnormally due to the failure of the virtualization device connected to it, and the existing technology lacks an efficient failure recovery method, resulting in the virtual machine being in a failure state for a long time.
By adding a virtualization device synchronization module to the hypervisor, the configuration information and data queue status data of the failed virtualization device are obtained, and the preset physical function drivers are called to migrate this data to the new virtualization device, thereby realizing the hot migration of the virtual machine and ensuring that the virtual machine can continue to process the original services.
It realizes rapid failure recovery of virtualized devices, ensures that the virtual machine's services are not interrupted, and improves the availability and reliability of virtual machines.
Smart Images

Figure CN114416293B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technologies, and particularly to a method for recovering from a failure of a virtualized device and a device for recovering from a failure of a virtualized device. Background Art
[0002] The Single Root I / O Virtualization (SR-IOV) protocol is an extension of the standard PCIe bus interconnection protocol. Its main goal is to present a single physical device as one physical function device (PF) and several virtualized devices (VF) through the hardware virtualization of the I / O physical device itself. The Single Root I / O Virtualization protocol can serve a single-machine computer system that supports direct I / O virtualization, and each virtual machine running on the system can directly own an independent physical device or virtualized device.
[0003] Generally speaking, during the operation of a virtual machine, it may be abnormal due to a failure of the virtualized device connected to it. In this case, since there is no efficient way to recover from the failure of the virtualized device, it is easy for the virtual machine to be in a failure state for a long time. Summary of the Invention
[0004] In view of the above problems, embodiments of the present application are proposed to provide a method for recovering from a failure of a virtualized device and a device for recovering from a failure of a virtualized device that overcome the above problems or at least partially solve the above problems.
[0005] To solve the above problems, embodiments of the present application disclose a method for recovering from a failure of a virtualized device, including:
[0006] When a virtual machine detects a failure of a virtualized device in a physical device, obtaining configuration information of the failed virtualized device and status data of a data queue from a virtualized device synchronization module;
[0007] Invoking a preset physical function driver to migrate the configuration information of the failed virtualized device and the status data of the data queue to a new virtualized device;
[0008] Performing a hot migration of the virtual machine to communicate with the new virtualized device.
[0009] Optionally, the step of, when a virtual machine detects a failure of a virtualized device in a physical device, obtaining configuration information of the failed virtualized device and status data of a data queue from a virtualized device synchronization module includes:
[0010] When the virtual machine detects a virtualization device failure in the physical device, the virtualization device migration module calls the virtualization device synchronization module to obtain the configuration information of the failed virtualization device and the status data of the data queue.
[0011] Optionally, the method further includes:
[0012] When establishing a connection between the virtual machine and the virtualization device in the physical device, storing the configuration information of the virtualization device and the status data of the data queue.
[0013] Optionally, the step of storing the configuration information of the virtualization device and the status data of the data queue when establishing a connection between the virtual machine and the virtualization device in the physical device includes:
[0014] When establishing a connection between the virtual machine and the virtualization device in the physical device, the virtualization device synchronization module stores the configuration information of the virtualization device.
[0015] Optionally, the method further includes:
[0016] During the communication process between the virtual machine and the virtualization device, the virtualization device synchronization module synchronously updates the configuration information of the virtualization device and synchronously stores the status data of the data queue.
[0017] Optionally, the method further includes:
[0018] Configure the preset error reporting function of the physical device to stop sending error reports to the outside.
[0019] An embodiment of the present application provides a device for fault recovery of a virtualization device, including:
[0020] An acquisition module, configured to obtain the configuration information of the failed virtualization device and the status data of the data queue from the virtualization device synchronization module when the virtual machine detects a virtualization device failure in the physical device;
[0021] A first migration module, configured to call a preset physical function driver to migrate the configuration information of the failed virtualization device and the status data of the data queue to a new virtualization device;
[0022] A second migration module, preset to hot migrate the virtual machine to communicate with the new virtualization device.
[0023] Optionally, the acquisition module includes:
[0024] An obtaining sub-module, configured to, when a virtual machine detects a failure of a virtualization device in a physical device, call a virtualization device synchronization module through a virtualization device migration module to obtain configuration information of the failed virtualization device and status data of a data queue.
[0025] Optionally, the apparatus further includes:
[0026] A data storage module, configured to store configuration information of the virtualization device and status data of the data queue when the virtual machine establishes a connection with the virtualization device in the physical device.
[0027] Optionally, the data storage module includes:
[0028] A configuration storage sub-module, configured to store configuration information of the virtualization device through the virtualization device synchronization module when the virtual machine establishes a connection with the virtualization device in the physical device.
[0029] Optionally, the apparatus further includes:
[0030] A synchronization sub-module, configured to synchronously update configuration information of the virtualization device through the virtualization device synchronization module during communication between the virtual machine and the virtualization device, and synchronously store status data of the data queue.
[0031] Optionally, the apparatus further includes:
[0032] A function configuration module, configured to configure a preset error reporting function of the physical device to stop sending error reports to the outside.
[0033] An embodiment of the present application further discloses an electronic device, including:
[0034] One or more processors; and
[0035] One or more machine-readable media storing instructions thereon, which when executed by the one or more processors, cause the electronic device to execute the method according to any one of the embodiments of the present application.
[0036] An embodiment of the present application further discloses one or more machine-readable media storing instructions thereon, which when executed by one or more processors, cause the processors to execute the method according to any one of the embodiments of the present application.
[0037] The embodiments of the present application have the following advantages:
[0038] Through the method for fault recovery of a virtualized device provided by the embodiments of the present application, when a virtual machine detects a fault in the virtualized device in a physical device, it obtains the configuration information of the faulty virtualized device and the status data of the data queue from the virtualized device synchronization module, and calls a preset physical function driver to migrate the configuration information of the faulty virtualized device and the status data of the data queue to a new virtualized device, so that the new virtualized device can have the same operating state as the faulty virtualized device. Subsequently, the virtual machine is hot migrated to communicate with the new virtualized device, enabling the virtual machine to continue processing the services it was originally processing, ensuring that the services of the virtual machine are not interrupted, and achieving efficient recovery of the virtualized device. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 is a schematic diagram of a device in an embodiment of the present application;
[0040] Figure 2 is a flowchart of the steps of an embodiment of the method for fault recovery of a virtualized device in an embodiment of the present application;
[0041] Figure 3 is a flowchart of the steps of an embodiment of the method for fault recovery of a virtualized device in an embodiment of the present application;
[0042] Figure 4 is another schematic diagram of a device in an embodiment of the present application;
[0043] Figure 5 is another schematic diagram of a device in an embodiment of the present application;
[0044] Figure 6 is a block diagram of the structure of an embodiment of the device for fault recovery of a virtualized device in an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0045] To make the above objects, features, and advantages of the present application more apparent and understandable, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0046] In the embodiments of the present application, the I / O physical device can adopt the Single Root I / O Virtualization (SR-IOV) protocol to virtualize itself into a physical function device (PF) and several virtualized devices (VF), and connect the virtualized devices (VF) to the virtual machines running in the server one by one. Among them, the physical function device (PF) can also be referred to as a physical function, and the virtualized device (VF) can also be referred to as a virtual function.
[0047] In an embodiment of the present application, a virtualization device synchronization module is added to a hypervisor to provide a synchronization function for the configuration information of virtualization devices and the status data of data queues. When a virtual machine detects a fault in a virtualization device in a physical device, it can obtain the configuration information of the virtualization device and the status data of the data queue from the virtualization device synchronization module, so that the configuration information of the faulty virtualization device and the status data of the data collection queue can be migrated to a new virtualization device, and the virtual machine can be hot migrated to communicate with the new virtualization device. The new virtualization device has the same configuration information and status data of the data queue as the faulty virtualization device, so that the virtual machine can communicate with the virtualization device in the original manner, realizing the rapid recovery of virtualization device faults and ensuring the normal operation of the virtual machine.
[0048] As an example of the present application, Figure 1 is a schematic diagram of a device in an embodiment of the present application. It includes a server, a physical device A, and a physical device B. Multiple virtual machines can run in the server. Through I / O device virtualization technology, virtualization device 1, virtualization device 2, and virtualization device 3 can run in physical device A. Virtualization device 4, virtualization device 5, and virtualization device 6 can run in physical device B. In order to maximize the utilization of physical devices, the physical devices can be reconstructed in a resource pooling manner to form a device resource pool including virtualization device 1, virtualization device 2, virtualization device 3, virtualization device 4, virtualization device 5, and virtualization device 6. Each virtual machine in the server can be respectively connected to a virtualization device, so that each virtual machine can have an independent I / O device.
[0049] Referring to Figure 2 , a flowchart of the steps of an embodiment of a method for recovering a fault of a virtualization device in an embodiment of the present application is shown, which may specifically include the following steps:
[0050] Step 201, when a virtual machine detects a fault in a virtualization device in a physical device, obtain the configuration information of the faulty virtualization device and the status data of the data queue from the virtualization device synchronization module;
[0051] When a virtualization device in a physical device has a fault, the physical device can generate an error report and prepare to provide services to the virtual machine for the fault interruption of the virtualization device. Thus, the virtual machine can detect that the virtualization device in the physical device has a fault.
[0052] In this application, in order to ensure the rapid recovery of virtualized devices in case of failures, a virtualized device synchronization module can be set in the hypervisor of the server. The virtualized device synchronization module can be used to synchronously obtain the configuration information of the virtualized device and the status data of the data queue. By obtaining the configuration information of the virtualized device and the status data of the data queue, the current running state of the virtualized device can be synchronized.
[0053] As a specific example of this application, the configuration information of the virtualized device can include the interrupt configuration status (MSI-X), the mapping configuration of direct memory access (DMA), the spatial mapping configuration of the base address register (BAR), and the configuration space, etc.
[0054] The data queue (virtqueue) can be the actual data link used for data exchange. The status data of the data queue can include the base address of the data queue, the currently available id value (last_avail_idx), the currently used id value (last_used_idx), etc.
[0055] Thus, when the virtual machine detects a failure of the virtualized device in the physical device, it can obtain the configuration information of the failed virtualized device and the status data of the data queue from the virtualized device synchronization module, so as to quickly recover the failed virtualized device and ensure the normal operation of the virtual machine.
[0056] Step 202, call a preset physical function driver to migrate the configuration information of the failed virtualized device and the status data of the data queue to a new virtualized device;
[0057] In the embodiment of this application, a physical function driver can be set in the server. The physical function driver can be used to manage the physical device, realize functions such as creating a virtualized device in the physical device, setting up communication between the virtual machine and the virtualized device, and configuring the virtualized device.
[0058] Thus, after obtaining the configuration information of the failed virtualized device and the status data of the data queue, the configuration information of the failed virtualized device and the status data of the data queue can be migrated to a new virtualized device by calling the physical function driver, so that the new virtualized device can have the same running state as the failed virtualized device.
[0059] In a specific implementation, there may usually be some idle virtual devices in the physical device. Thus, when a virtual machine detects a fault in a virtual device in the physical device, in order to quickly recover from the fault of the virtual device, an idle virtual device can be found as the new virtual device. A new virtual device can also be created by the physical function driver. Subsequently, the configuration information of the new virtual device and the status data of the data queue can be set to be the same as those of the faulty virtual device, thereby completing the migration of the configuration information of the faulty virtual device and the status data of the data queue.
[0060] Step 203, hot migrate the virtual machine to communicate with the new virtual device.
[0061] After migrating the configuration information of the faulty virtual device and the status data of the data queue to the new virtual device, the virtual machine can be hot migrated from communicating with the faulty virtual device to communicating with the new virtual device. Thus, the virtual machine can communicate with the normally operating virtual device to ensure its normal operation. At the same time, the new virtual device has the configuration information of the faulty virtual device and the status data of the data queue and can operate in the same operating state as the faulty virtual device. The virtual machine can continue to process the services it was originally processing by communicating with the new virtual device, ensuring that the services of the virtual machine are not interrupted.
[0062] Through the method for fault recovery of virtual devices provided by the embodiments of the present application, when a virtual machine detects a fault in a virtual device in a physical device, it obtains the configuration information of the faulty virtual device and the status data of the data queue from the virtual device synchronization module, and calls a preset physical function driver to migrate the configuration information of the faulty virtual device and the status data of the data queue to the new virtual device, so that the new virtual device can have the same operating state as the faulty virtual device. Subsequently, the virtual machine is hot migrated to communicate with the new virtual device, enabling the virtual machine to continue to process the services it was originally processing, ensuring that the services of the virtual machine are not interrupted, and achieving efficient recovery of the virtual device.
[0063] Step 301, when a virtual machine detects a fault in a virtual device in a physical device, call the virtual device synchronization module through the virtual device migration module to obtain the configuration information of the faulty virtual device and the status data of the data queue;
[0064] When a virtual device in a physical device fails, the physical device can generate an error report and prepare to provide services to the virtual machine for the fault interruption of the virtual device. Thus, the virtual machine can detect that a virtual device in the physical device has failed.
[0065] In this application, in order to ensure that the virtualized device can be quickly restored in case of a failure, a virtualized device synchronization module can be set in the hypervisor of the server. The virtualized device synchronization module can be used to synchronously obtain the configuration information of the virtualized device and the status data of the data queue. By obtaining the configuration information of the virtualized device and the status data of the data queue, the current running state of the virtualized device can be synchronized.
[0066] Meanwhile, in order to manage the migration of the virtualized device, a virtualized device migration module can be set in the hypervisor of the server.
[0067] Thus, when the virtual machine detects a failure of the virtualized device in the physical device, the virtual machine can call the virtualized device migration module to initiate the migration process. In order to complete the failure recovery of the virtualized device, the virtualized device can first obtain the configuration information of the failed virtualized device and the status data of the data queue from the virtualized device synchronization module, so as to quickly recover the failed virtualized device and ensure the normal operation of the virtual machine.
[0068] In an embodiment of this application, the method further includes:
[0069] S11, when the virtual machine establishes a connection with the virtualized device in the physical device, store the configuration information of the virtualized device and the status data of the data queue.
[0070] Specifically, when the virtual machine is allocated the virtualized device in the physical device and the virtual machine establishes a connection with the virtualized device, the virtual machine can request to store the configuration information of the virtualized device and the status data of the data queue to back up the running state of the virtualized device.
[0071] In an embodiment of this application, the step of storing the configuration information of the virtualized device and the status data of the data queue when the virtual machine establishes a connection with the virtualized device in the physical device includes:
[0072] S21, when the virtual machine establishes a connection with the virtualized device in the physical device, store the configuration information of the virtualized device through the virtualized device synchronization module.
[0073] Specifically, when the virtual machine establishes a connection with the virtualized device in the physical device, it can request to store the initial configuration information of the virtualized device through the virtualized device synchronization module, so as to back up the running state of the virtualized device from the moment when the virtual machine establishes a connection with the virtualized device in the physical device.
[0074] In a specific implementation, the virtual machine can start the synchronization process of the virtualized device by calling the virtualized device migration module. Subsequently, the virtualized device migration module can obtain the configuration information of the virtualized device from the virtualized device and store it in the virtualized device synchronization module.
[0075] In an embodiment of the present application, the method further includes:
[0076] S31, during the communication process between the virtual machine and the virtualized device, the virtualized device synchronization module synchronously updates the configuration information of the virtualized device and synchronously stores the status data of the data queue.
[0077] Specifically, during the communication process between the virtual machine and the virtualized device, the virtualized device synchronization module can synchronously update the configuration information of the virtualized device in real time and synchronously store the status data of the data queue in real time, so that when the virtualized device fails, the virtualized device can be restored to the latest state in a timely manner, enabling the virtual machine to continue to operate normally.
[0078] In a specific implementation, a Physical Function Driver can be set in the server. The Physical Function Driver can be used to manage physical devices, realize functions such as creating virtualized devices in physical devices, setting up communication between virtual machines and virtualized devices, and configuring virtualized devices.
[0079] Thus, the virtualized device synchronization module can obtain the configuration information of the virtualized device and the status data of the data queue through the Physical Function Driver in real time, realizing the synchronous update of the configuration information of the virtualized device and the status data of the data queue.
[0080] In an embodiment of the present application, the method further includes:
[0081] S41, configure the preset error reporting function of the physical device to stop sending error reports to the outside.
[0082] Specifically, the physical device may originally have a preset error reporting function. In the case of a physical device failure, the physical device can send an error report to the outside to request external devices such as a Central Processing Unit (CPU) to repair the errors existing in the physical device. The error reporting function can also be used for the recovery of virtualized device failures. However, if the preset error reporting function is used to request external devices to recover the virtualized device, it may take a long time, resulting in the virtual machine being unable to operate normally for a long time. Or, the errors that occur in the virtualized device may be irreparable, and in this case, sending an error report to the outside may not help the virtualized device return to normal operation.
[0083] Thus, before ensuring the normal operation of the virtual machine by using the method for fault recovery of the virtualization device of the present application, the preset error reporting function of the physical device can be configured to stop sending error reports to the outside. Thus, when a fault occurs in the virtual machine, instead of using the original method to send error reports, the method for fault recovery of the virtualization device of the present application can be used to quickly recover the virtualization device.
[0084] In a specific implementation, the error reporting function of the physical device can be an Advanced Error Reporting (AER) or a Deferred Procedure Call (DPC). The advanced error reporting function can be configured to prohibit sending error reports to the outside. At this time, the error reporting function can use non-posted requests, and for non-posted requests, return a completion status with an error, thereby avoiding sending error reports to the outside using the original error reporting function. At the same time, it can also avoid possible system downtime due to physical device failures.
[0085] Step 302, call a preset physical function driver to migrate the configuration information of the faulty virtualization device and the status data of the data queue to a new virtualization device;
[0086] After obtaining the configuration information of the faulty virtualization device and the status data of the data queue, the configuration information of the faulty virtualization device and the status data of the data queue can be migrated to a new virtualization device by calling the physical function driver, so that the new virtualization device can have the same operating state as the faulty virtualization device.
[0087] In a specific implementation, there are usually some idle virtualization devices in the physical device. Thus, when the virtual machine detects a fault in the virtualization device in the physical device, in order to quickly perform fault recovery of the virtualization device, an idle virtualization device can be found as the new virtualization device. Or a new virtualization device can be created by the physical function driver. Subsequently, the configuration information of the new virtualization device and the status data of the data queue can be set to be the same as those of the faulty virtualization device, thereby completing the migration of the configuration information of the faulty virtualization device and the status data of the data queue.
[0088] Step 303, hot migrate the virtual machine to communicate with the new virtualization device.
[0089] After migrating the configuration information of the faulty virtualized device and the status data of the data queue to the new virtualized device, the virtual machine can be hot migrated from communicating with the faulty virtualized device to communicating with the new virtualized device, so that the virtual machine can communicate with the normally operating virtualized device to ensure its normal operation. At the same time, the new virtualized device has the configuration information of the faulty virtualized device and the status data of the data queue, and can operate in the same operating state as the faulty virtualized device. The virtual machine can continue to process the services it was originally processing by communicating with the new virtualized device, ensuring that the services of the virtual machine will not be interrupted.
[0090] As a specific example of the present application, Figure 4 It is a schematic diagram of a device of the present application.
[0091] When the virtual machine establishes a connection with virtualized device 1, the virtual machine sends the configuration information of virtualized device 1 obtained by it to the virtualized device migration module. The virtualized device migration module can store the configuration information of virtualized device 1 in the virtualized device synchronization module. Subsequently, during the communication between the virtual machine and virtualized device 1, the virtualized device synchronization module can obtain the configuration information of virtualized device 1 and the status information of the data queue in real time through the physical function driver and perform synchronous storage, so as to realize the real-time storage of the configuration information of virtualized device 1 and the status information of the data queue.
[0092] As a specific example of the present application, Figure 5 It is another schematic diagram of a device of the present application.
[0093] During the communication between the virtual machine and virtualized device 1, if the virtual machine detects that virtualized device 1 fails, the virtual machine can notify the virtualized device migration module. The virtualized device migration module can obtain the configuration information of the faulty virtualized device 1 and the status data of the data queue through the virtualized device synchronization module. Subsequently, the configuration information of the faulty virtualized device 1 and the status data of the data queue are sent to the physical function driver, and the physical function driver migrates the configuration information of the faulty virtualized device 1 and the status data of the data queue to the new virtualized device 2. So that the new virtualized device 2 can have the same operating state as the faulty virtualized device 1. Subsequently, the virtual machine performs a hot migration to communicate with the new virtualized device 2, and the virtual machine can provide services based on the new virtualized device 2 to ensure the normal operation of the virtual machine.
[0094] Through the method for fault recovery of a virtualized device provided by the embodiments of the present application, when a virtual machine detects a fault in the virtualized device in a physical device, the virtualized device migration module is used to call the virtualized device synchronization module to obtain the configuration information of the faulty virtualized device and the status data of the data queue, and a preset physical function driver is called to migrate the configuration information of the faulty virtualized device and the status data of the data queue to a new virtualized device, so that the new virtualized device can have the same operating state as the faulty virtualized device. Subsequently, the virtual machine is hot migrated to communicate with the new virtualized device, so that the virtual machine can continue to process the services that were being processed originally, ensuring that the services of the virtual machine will not be interrupted, and realizing the efficient recovery of the virtualized device.
[0095] It should be noted that, for the method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the embodiments of the present application are not limited by the described action sequences, because according to the embodiments of the present application, some steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present application.
[0096] Referring to Figure 6 , a structural block diagram of another embodiment of the fault recovery device for a virtualized device according to the embodiments of the present application is shown, which may specifically include the following modules:
[0097] An acquisition module 601, configured to, when a virtual machine detects a fault in the virtualized device in a physical device, obtain the configuration information of the faulty virtualized device and the status data of the data queue from the virtualized device synchronization module;
[0098] A first migration module 602, configured to call a preset physical function driver to migrate the configuration information of the faulty virtualized device and the status data of the data queue to a new virtualized device;
[0099] A second migration module 603, preset to hot migrate the virtual machine to communicate with the new virtualized device.
[0100] Optionally, the acquisition module includes:
[0101] An acquisition sub-module, configured to, when a virtual machine detects a fault in the virtualized device in a physical device, call the virtualized device synchronization module through the virtualized device migration module to obtain the configuration information of the faulty virtualized device and the status data of the data queue.
[0102] Optionally, the device further includes:
[0103] A data storage module, configured to store the configuration information of the virtualized device and the status data of the data queue when the virtual machine establishes a connection with the virtualized device in the physical device.
[0104] Optionally, the data storage module includes:
[0105] A configuration storage sub-module, configured to store the configuration information of the virtualized device through the virtualized device synchronization module when the virtual machine establishes a connection with the virtualized device in the physical device.
[0106] Optionally, the device further includes:
[0107] A synchronization sub-module, configured to synchronously update the configuration information of the virtualized device through the virtualized device synchronization module during the communication between the virtual machine and the virtualized device, and synchronously store the status data of the data queue.
[0108] Optionally, the device further includes:
[0109] A function configuration module, configured to configure the preset error reporting function of the physical device to stop sending error reports to the outside.
[0110] For the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple. For related parts, please refer to the partial description of the method embodiments.
[0111] The embodiments of the present application further provide an electronic device, including:
[0112] One or more processors; and
[0113] One or more machine-readable media storing instructions thereon, which when executed by the one or more processors, cause the electronic device to execute the method described in the embodiments of the present application.
[0114] The embodiments of the present application further provide one or more machine-readable media storing instructions thereon, which when executed by one or more processors, cause the processors to execute the method described in the embodiments of the present application.
[0115] Each embodiment in this specification is described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. For the same or similar parts among the embodiments, please refer to each other.
[0116] Those skilled in the art should understand that the embodiments of the present application can be provided as methods, apparatuses, or computer program products. Therefore, the embodiments of the present application can take the form of all-hardware embodiments, all-software embodiments, or embodiments combining software and hardware aspects. Moreover, the embodiments of the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program code.
[0117] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing terminal devices to generate a machine, such that the instructions executed by the processors of the computer or other programmable data processing terminal devices generate means for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0118] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0119] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, such that a series of operation steps are executed on the computer or other programmable terminal device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0120] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concepts. Therefore, the appended claims are intended to be construed to include the preferred embodiments as well as all changes and modifications falling within the scope of the present application.
[0121] Finally, it should also be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or terminal device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or terminal device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or terminal device comprising the said element.
[0122] The above has introduced in detail a method for fault recovery of a virtualization device and a device for fault recovery of a virtualization device provided by the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. A method for fault recovery of a virtualized device, characterized in that including: When a virtual machine detects a virtualization device failure in a physical device, obtain the configuration information of the failed virtualization device and the status data of the data queue from the virtualization device synchronization module, where the configuration information of the virtualization device includes a configuration status, a mapping configuration for direct content access, a spatial mapping configuration of a base address register, and a configuration space, and the status data of the data queue includes the base address of the data queue, the currently available id value, and the currently used id value; Call a preset physical function driver to migrate the configuration information of the failed virtualization device and the status data of the data queue to a new virtualization device; Hot migrate the virtual machine to communicate with the new virtualization device.
2. The method according to claim 1, characterized in that, The step of, when a virtual machine detects a virtualization device failure in a physical device, obtaining the configuration information of the failed virtualization device and the status data of the data queue includes: When a virtual machine detects a virtualization device failure in a physical device, call the virtualization device synchronization module through the virtualization device migration module to obtain the configuration information of the failed virtualization device and the status data of the data queue.
3. The method according to claim 1, wherein The method further includes: When establishing a connection between the virtual machine and the virtualization device in the physical device, store the configuration information of the virtualization device and the status data of the data queue.
4. The method according to claim 3, wherein The step of, when establishing a connection between the virtual machine and the virtualization device in the physical device, storing the configuration information of the virtualization device and the status data of the data queue includes: When establishing a connection between the virtual machine and the virtualization device in the physical device, store the configuration information of the virtualization device through the virtualization device synchronization module.
5. The method according to claim 1, wherein The method further includes: During the communication process between the virtual machine and the virtualization device, synchronously update the configuration information of the virtualization device through the virtualization device synchronization module, and synchronously store the status data of the data queue.
6. The method according to claim 1, wherein The method further includes: Configure the preset error reporting function of the physical device to stop sending error reports to the outside.
7. A device for fault recovery of a virtualized device, characterized in that, including: An acquisition module, configured to, when a virtual machine detects a virtualization device failure in a physical device, obtain the configuration information of the failed virtualization device and the status data of the data queue from the virtualization device synchronization module, where the configuration information of the virtualization device includes a configuration status, a mapping configuration for direct content access, a spatial mapping configuration of a base address register, and a configuration space, and the status data of the data queue includes the base address of the data queue, the currently available id value, and the currently used id value; A first migration module, configured to call a preset physical function driver to migrate the configuration information of the failed virtualization device and the status data of the data queue to a new virtualization device; A second migration module, preset to hot migrate the virtual machine to communicate with the new virtualization device.
8. The device according to claim 7, wherein The acquisition module includes: An acquisition sub-module, configured to, when a virtual machine detects a virtualization device failure in a physical device, call the virtualization device synchronization module through the virtualization device migration module to obtain the configuration information of the failed virtualization device and the status data of the data queue.
9. An electronic device, characterized in that, including: one or more processors; and one or more machine-readable media storing instructions that, when executed by the one or more processors, cause the electronic device to perform the method according to any one of claims 1-6.
10. One or more machine-readable media storing instructions that, when executed by one or more processors, cause the processors to perform the method according to any one of claims 1-6.
Citation Information
Patent Citations
Information processing device
CN105210043A
Virtual machine thermal migration method and communication equipment
CN112306650A
Systems and methods for migration of virtual machines across virtual storage resources
US20160203015A1