A method, device and medium for controlling virtualization platform information consistency

By comparing the information consistency of management nodes and computing nodes in the virtualization platform and performing synchronization operations when there is inconsistency, the problem of virtual machine data loss is solved and the stability and consistency of the system are improved.

CN114995958BActive Publication Date: 2025-09-26JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210727057.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-24
Publication Date
2025-09-26
Estimated Expiration
2042-06-24

AI Technical Summary

Technical Problem

In a virtualization platform, communication anomalies or packet loss between management nodes and computing nodes can lead to information inconsistency, increasing the risk of virtual machine data loss and affecting system stability.

Method used

After creating a task to be executed on the management node, the execution results of the computing node are obtained and compared with the actual information to see if they are consistent with the database information. If they are inconsistent, information synchronization is performed based on the actual information to ensure the consistency of the upper and lower layer information of the virtualization platform.

Benefits of technology

It reduces the risk of virtual machine data loss, improves system stability and consistency, and avoids inconsistency in virtual machine status and data information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114995958B_ABST
    Figure CN114995958B_ABST
Patent Text Reader

Abstract

The present application relates to the field of virtualization technology, and discloses a method, device, and medium for controlling the consistency of virtualization platform information, which is applied to a management node, and includes: creating a task to be executed, and sending the task to be executed to a computing node. Obtain the execution result, and detect whether the actual information of the target virtual machine corresponding to the computing node after executing the task to be executed is consistent with the information of the target virtual machine in the database managed by the management node based on the execution result. If inconsistent, perform information synchronization operation on the information in the database based on the actual information of the target virtual machine. Thus, the actual information of the target virtual machine corresponding to the underlying computing node after executing the task to be executed is compared with the virtual machine information in the database. When the information is inconsistent, the virtual machine information in the database is synchronized based on the actual information of the underlying target virtual machine, thereby avoiding inconsistent virtualization platform information, reducing the risk of virtual machine data loss, and improving system stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of virtualization technology, and in particular to a method, device, and medium for controlling information consistency of a virtualization platform. Background Art

[0002] The virtualization platform mainly provides virtualization services and manages computer resources. The foundation of the virtualization platform is the virtual machine. The virtualization platform can realize operations such as migration, snapshots and backup of virtual machines. These operations all rely on the management node and computing node of the virtualization platform. The management node creates tasks such as migration and backup, and sends the tasks to the underlying computing nodes. The computing nodes then complete the tasks and report the execution results to the management node.

[0003] When performing operations on virtual machines, if communication anomalies occur between the management node and the underlying compute nodes, or if packet loss occurs during data transmission, the accuracy of the operations on the compute nodes cannot be guaranteed. This can lead to inconsistencies in the virtual machine's status and data. This means that the virtual machine information in the database managed by the management node will be inconsistent with the virtual machine information after the compute nodes complete the task operation. Of course, it is understandable that the upper layer of the virtualization platform refers to the management node, and the lower layer refers to the compute nodes. In this case, if the virtual machine is restarted, the virtual machine disk will return to the state before the anomaly, resulting in the loss of the virtual machine data during operation.

[0004] It can be seen that how to solve the problem of inconsistent information between management nodes and computing nodes due to factors such as communication anomalies and packet loss, reduce the risk of virtual machine data loss, and thus improve the stability of virtual machines is an urgent problem to be solved by technical personnel in this field. Summary of the Invention

[0005] The purpose of this application is to provide a method, device and medium for controlling the consistency of information on a virtualization platform, so as to avoid information inconsistency between management nodes and computing nodes on the virtualization platform due to factors such as communication anomalies and packet loss, reduce the risk of virtual machine data loss, and thus improve system operation stability.

[0006] To solve the above technical problems, the present application provides a method for controlling virtualization platform information consistency, which is applied to a management node and includes:

[0007] Create tasks to be executed and send them to computing nodes;

[0008] Obtaining an execution result obtained by the computing node executing the task to be executed;

[0009] Detecting, based on the execution result, whether actual information of the target virtual machine corresponding to the computing node after executing the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node;

[0010] If they are inconsistent, an information synchronization operation is performed on the information of the target virtual machine in the database based on the actual information of the target virtual machine.

[0011] Preferably, before detecting, based on the execution result, whether the actual information of the target virtual machine corresponding to the computing node after executing the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node, the method further includes:

[0012] Determining whether the execution result is obtained;

[0013] If not obtained, query the actual information of all virtual machines after the computing node executes the task to be executed, and detect whether the actual information of each virtual machine is consistent with the information of each virtual machine in the current database; if not, synchronize the information of each virtual machine in the current database with the actual information of each virtual machine queried;

[0014] If obtained, the process proceeds to the step of detecting, based on the execution result, whether the actual information of the target virtual machine corresponding to the computing node after executing the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node.

[0015] Preferably, before the computing node executes the task to be executed and obtains the execution result, the method further includes:

[0016] Locking the resources of the target virtual machine corresponding to the task to be executed;

[0017] Furthermore, after the computing node executes the task to be executed and obtains the execution result, the method further includes:

[0018] Release resources of the target virtual machine.

[0019] Preferably, it also includes:

[0020] At preset time intervals, the steps of querying the actual information of all virtual machines after the computing node executes the task to be executed, and detecting whether the actual information of each virtual machine is consistent with the information of each virtual machine in the current database are performed.

[0021] Preferably, before locking the resources of the target virtual machine corresponding to the task to be executed, the method further includes:

[0022] Determine whether the target virtual machine is normal;

[0023] If normal, proceed to the step of locking the resources of the target virtual machine corresponding to the task to be executed;

[0024] If an exception occurs, the execution of the pending task is terminated and an exception signal is transmitted to the client.

[0025] Preferably, the tasks to be executed include at least a virtual machine disk migration task, a virtual machine backup task and a virtual machine snapshot task.

[0026] In order to solve the above technical problems, the present application also provides a method for controlling virtualization platform information consistency, which is applied to computing nodes and includes:

[0027] Get the pending tasks created by the management node;

[0028] an execution result obtained by executing the task to be executed;

[0029] The execution result is sent to the management node so that the management node can detect whether the actual information of the target virtual machine corresponding to the computing node after executing the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node based on the execution result. If inconsistent, the information of the target virtual machine in the database is synchronized with the actual information of the target virtual machine.

[0030] In order to solve the above technical problems, the present application also provides a virtualization platform information consistency control device, which is applied to a management node and includes:

[0031] A creation module is used to create tasks to be executed and send the tasks to be executed to computing nodes;

[0032] A first acquisition module is used to obtain an execution result obtained by the computing node executing the task to be executed;

[0033] a detection module, configured to detect, based on the execution result, whether the actual information of the target virtual machine corresponding to the task to be executed by the computing node is consistent with the information of the target virtual machine in the database managed by the current management node; if not, calling the information synchronization module;

[0034] The information synchronization module is configured to perform an information synchronization operation on the information of the target virtual machine in the database based on the actual information of the target virtual machine.

[0035] In order to solve the above technical problems, the present application also provides a control device for virtualization platform information consistency, which is applied to a computing node and includes:

[0036] The second acquisition module is used to obtain the pending tasks created by the management node;

[0037] An execution module, configured to execute the task to be executed and obtain the execution result;

[0038] A sending module is used to send the execution result to the management node, so that the management node can detect whether the actual information of the target virtual machine corresponding to the computing node after executing the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node based on the execution result. If inconsistent, the information of the target virtual machine in the database is synchronized with the actual information of the target virtual machine.

[0039] In order to solve the above technical problems, the present application also provides a control device for virtualization platform information consistency, including a memory for storing a computer program;

[0040] A processor is used to implement the steps of the control method for virtualization platform information consistency when executing the computer program.

[0041] In order to solve the above technical problems, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the control method for virtualization platform information consistency are implemented.

[0042] The present invention provides a method for controlling the consistency of information on a virtualization platform, which is applied to a management node and includes: creating a task to be executed, sending the created task to be executed to a computing node, and obtaining the execution result obtained by the computing node executing the task to be executed. According to the execution result, it is detected whether the actual information of the target virtual machine corresponding to the computing node after executing the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node. If not, the information of the target virtual machine in the database is synchronized with the information of the target virtual machine based on the actual information of the target virtual machine. It can be seen that the technical solution provided by the present application compares the actual information of the target virtual machine corresponding to the underlying computing node after executing the task to be executed with the information of the virtual machine recorded in the database. When the information of the virtual machine is inconsistent, the virtual machine information in the database is synchronized with the actual information of the underlying target virtual machine as a reference, thereby avoiding inconsistency between the upper and lower layers of the virtualization platform, that is, avoiding inconsistency between the virtual machine information in the database and the virtual machine information corresponding to the computing node after executing the task, thereby reducing the risk of virtual machine data loss and improving system stability.

[0043] In addition, the present application also provides a control method for the consistency of virtualization platform information applied to computing nodes, as well as a control device and medium for the consistency of virtualization platform information, which correspond to the above-mentioned control method for the consistency of virtualization platform information applied to management nodes, and have the same effect as above. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0045] Figure 1 A flowchart of a method for controlling virtualization platform information consistency provided by an embodiment of the present application;

[0046] Figure 2 A structural diagram of a device for controlling virtualization platform information consistency provided by an embodiment of the present application;

[0047] Figure 3 A structural diagram of a device for controlling virtualization platform information consistency provided by another embodiment of the present application;

[0048] Figure 4 This is a structural diagram of a virtualization platform information consistency control device provided by another embodiment of the present application. DETAILED DESCRIPTION

[0049] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0050] The core of this application is to provide a control method, device and medium for the information consistency of a virtualization platform. After the computing node runs the task to be executed created by the management node, the actual information of the underlying virtual machine is compared with the information of the virtual machine in the database managed by the management node to see if they are consistent. If they are inconsistent, the information of the virtual machine in the database is synchronized based on the actual information of the underlying virtual machine, thereby ensuring the consistency of the upper and lower layer information of the virtualization platform and improving the stability of the virtual machine.

[0051] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0052] The virtualization platform mainly provides virtualization services and manages computer resources. The foundation of the virtualization platform is the virtual machine. The virtualization platform can realize operations such as migration, snapshots and backup of virtual machines. These operations all rely on the management node and computing node of the virtualization platform. The management node creates tasks such as migration and backup, and sends the tasks to the underlying computing nodes. The computing nodes then complete the tasks and report the execution results to the management node.

[0053] When performing operations on virtual machines, if communication anomalies occur between the management node and the underlying compute nodes, or if packet loss occurs during data transmission, the accuracy of the operations on the compute nodes cannot be guaranteed. This can lead to inconsistencies in the virtual machine's status and data. This means that the virtual machine information in the database managed by the management node will be inconsistent with the virtual machine information after the compute nodes complete the task operation. Of course, it is understandable that the upper layer of the virtualization platform refers to the management node, and the lower layer refers to the compute nodes. In this case, if the virtual machine is restarted, the virtual machine disk will return to the state before the anomaly, resulting in the loss of the virtual machine data during operation.

[0054] In order to solve the problem of inconsistent information between the management node and the computing node due to factors such as communication anomalies and packet loss, reduce the risk of virtual machine data loss, and thus improve the stability of the virtual machine, an embodiment of the present application provides a method for controlling the consistency of virtualization platform information. The method is applied to the management node, the management node creates a task to be executed, and sends it to the computing node for execution to obtain the execution result. After obtaining the execution result, it is detected whether the virtual machine information corresponding to the management node and the computing node is consistent according to the execution result. If inconsistent, the virtual machine information corresponding to the computing node is used as a benchmark for information synchronization operations on the virtual machine information corresponding to the management node.

[0055] Figure 1 This is a flowchart of a method for controlling virtualization platform information consistency provided by an embodiment of the present application, such as Figure 1 As shown, the method is applied to the management node and includes:

[0056] S10: Create tasks to be executed and send them to computing nodes.

[0057] In a specific embodiment, when the virtualization platform needs to perform operations such as migration, backup, and snapshot on a virtual machine, the management node creates a pending task and sends the created task to the compute node. The compute node then executes the created task on the virtual machine and obtains an execution result. The pending tasks include virtual machine disk migration tasks, virtual machine backup tasks, and virtual machine snapshot tasks. This application does not limit the specific content of the pending tasks.

[0058] S11: Obtain the execution result obtained by the computing node when executing the task to be executed.

[0059] S12: Detect, based on the execution result, whether the actual information of the target virtual machine corresponding to the computing node after executing the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node. If not, proceed to step S13.

[0060] S13: performing an information synchronization operation on the target virtual machine information in the database based on the actual information of the target virtual machine.

[0061] In order to avoid the failure of sending tasks to be executed due to communication anomalies or packet loss, or the failure of computing nodes to execute tasks to be executed, the management node obtains the execution results obtained after the computing node completes the task, and detects whether the actual information of the target virtual machine corresponding to the computing node after executing the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node based on the execution results. If they are inconsistent, the information of the target virtual machine in the database is synchronized based on the actual information of the underlying target virtual machine.

[0062] It is understandable that the virtualization platform can operate multiple virtual machines. When the management node creates a task, it may operate on one virtual machine or multiple virtual machines. Therefore, the target virtual machine refers to the virtual machine corresponding to the task to be executed created by the management node.

[0063] It is worth noting that the execution result of the stage node execution may be a success or a failure. Regardless of success or failure, step S12 is performed to detect whether the upper and lower layers of the virtualization platform are consistent. It should be noted that the consistency of the upper and lower layers of the virtualization platform refers to the consistency between the information of the virtual machine in the database managed by the upper-layer management node and the actual information of the virtual machine after the underlying computing node executes the task. The meaning of the consistency of the upper and lower layers of the virtualization platform will not be repeated below. In addition, it should be noted that the virtual machine information refers to the configuration information of the virtual machine, the CPU running the virtual machine, and the storage information and status of the virtual machine disk.

[0064] After the computing node executes the task to be executed and obtains the execution result, the management node may not be able to obtain the execution result due to network abnormalities or packet loss. Therefore, when it is determined that the execution result has failed, the management node starts a query thread to query the actual information of all virtual machines after the computing node executes the task to be executed, and detects whether the actual information of all virtual machines is consistent with all virtual machine information stored in the database. If they are inconsistent, the virtual machine information in the database is synchronized based on the query result.

[0065] When a computing node executes a pending task, in order to prevent the target virtual machine from being occupied by other tasks, the resources of the target virtual machine are locked before executing the pending task and released after the task is completed.

[0066] In order to avoid the failure of task execution due to virtual machine failure, the virtual machine is checked to see if it is normal before executing the task. If the virtual machine has an abnormality, the abnormal signal is transmitted to the terminal so that the user can check and eliminate the abnormality in time.

[0067] The technical solution provided in the embodiment of the present application queries all virtual machine information once every preset time period and compares it with the virtual machine information in the upper-layer database to ensure the consistency of upper and lower-layer information on the virtualization platform.

[0068] In fact, in addition to the technical solutions provided by this application, in addition to being applicable to application scenarios of virtualization platform information consistency, it can also be used in any scenario where the execution business and the storage business are not on the same side, and this application does not limit this.

[0069] The control method for the consistency of virtualization platform information provided in the embodiment of the present application is applied to the management node, including: creating a task to be executed, and sending the created task to be executed to the computing node, and obtaining the execution result obtained by the computing node executing the task to be executed. According to the execution result, it is detected whether the actual information of the target virtual machine corresponding to the computing node after executing the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node. If inconsistent, the information of the target virtual machine in the database is synchronized with the information of the target virtual machine in the database based on the actual information of the target virtual machine. It can be seen that the technical solution provided by the present application compares the actual information of the target virtual machine corresponding to the underlying computing node after executing the task to be executed with the information of the virtual machine recorded in the database. When the information of the virtual machine is inconsistent, the virtual machine information in the database is synchronized with the actual information of the underlying target virtual machine as a reference, thereby avoiding inconsistency of the upper and lower layers of the virtualization platform, that is, avoiding inconsistency between the virtual machine information in the database and the virtual machine information corresponding to the computing node after executing the task, thereby reducing the risk of virtual machine data loss and improving system stability.

[0070] In a specific embodiment, when the management node obtains the execution result of the computing node, it may fail to obtain the result due to network anomalies or packet loss. If the acquisition fails, it is impossible to detect the consistency of the upper and lower layer information of the virtualization platform. Therefore, before detecting whether the actual information of the target virtual machine corresponding to the computing node after executing the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node based on the execution result, it is first determined whether the execution result sent by the computing node is obtained. If it is obtained, the upper and lower layer information consistency check is performed on the virtualization platform. If it is not obtained, the management node triggers the query thread to query the actual information of all virtual machines after the computing node executes the task, and compares the queried information with the information of each virtual machine in the database managed by the current management node. If the information is inconsistent, the virtual machine information in the database is synchronized based on the actual information of each queried virtual machine.

[0071] It is understandable that if the management node obtains the execution result, there is no need to start the query thread to query, and there is no need to query all virtual machines, thereby avoiding resource waste. When the management node does not obtain the execution result, in order to ensure the consistency of upper and lower layer information on the virtualization platform, the query thread is started to query.

[0072] The control method for the consistency of virtualization platform information provided in the embodiment of the present application first determines whether the execution result is obtained before detecting whether the actual information of the target virtual machine corresponding to the computing node after the computing node executes the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node based on the execution result. If not, the actual information of all virtual machines after the computing node executes the task to be executed is queried, and the actual information of each virtual machine is detected to be consistent with the information of each virtual machine in the current database. If not, the information synchronization operation is performed on the information of each virtual machine in the current database based on the actual information of each queried virtual machine. If obtained, the consistency of the upper and lower layer information of the virtualization platform is detected based on the execution result. In this way, it is avoided that the management node fails to obtain the execution result of the computing node due to network anomalies or packet loss, which leads to failure in detecting the upper and lower layer information of the virtualization platform and reduces the stability of the virtual machine.

[0073] It is understandable that when the computing node is performing operations on the target virtual machine, if other tasks also need to occupy the target virtual machine, it may cause the execution of the pending task to fail. For example, when different tasks write to the same target virtual machine disk, the data that needs to be written by the pending task may be overwritten by other tasks, thereby causing the pending task to fail, thereby increasing the risk of virtual machine data loss.

[0074] Therefore, in order to reduce the risk of virtual machine data loss, the method provided in the embodiment of the present application locks the resources of the target virtual machine corresponding to the task to be executed before the computing node executes the execution result of the task to be executed, and releases the resources of the target virtual machine after the computing node executes the execution result of the task to be executed.

[0075] The method for controlling the consistency of virtualization platform information provided in the embodiment of the present application locks the resources of the target virtual machine corresponding to the task to be executed before the computing node executes the execution result of the task to be executed, and releases the resources of the target virtual machine after the computing node executes the execution result of the task to be executed, thereby avoiding other tasks occupying the resources of the target virtual machine and causing the execution failure of the task to be executed, further ensuring the consistency of the upper and lower layer information of the virtualization platform and improving the stability of the virtual machine.

[0076] On the basis of the above embodiments, in order to further improve the consistency of information between the upper and lower layers of the virtualization platform, every preset time period, the query thread is called to query the actual information of all virtual machines after the computing node executes the task to be executed, and detect whether the actual information of each virtual machine is consistent with the information of each virtual machine in the current database. If inconsistent, the information of the virtual machine in the database is synchronized according to the actual information of the queried virtual machine, that is, an update operation is performed.

[0077] It should be noted that a preset time is set. As time goes by, every time the preset time is reached, a virtual machine information query is performed, that is, a consistency check of the upper and lower layer information of the virtualization platform is performed, thereby avoiding inconsistency of the upper and lower layer information when the computing node does not execute the task, resulting in the failure of the computing node to execute the task next time.

[0078] In addition, it should be noted that when the upper and lower layer information of the virtualization platform are inconsistent, if synchronization cannot be completed based on the actual information of the underlying virtual machine, that is, when the database information update fails, the abnormal status will be transmitted to the client so that the user can view and eliminate the abnormality. The control method for virtualization platform information consistency provided by the embodiment of the present application queries once every preset time period whether the actual information of all virtual machines after the computing node executes the task to be executed is consistent with the information of each virtual machine in the current database, that is, whether the upper and lower layer information of the virtualization platform are consistent, further reducing the virtual machine data loss rate and improving system stability.

[0079] In fact, the execution result of the computing node obtained by the management node may be a success or a failure. The failure may be caused by an abnormality in the virtual machine itself. Therefore, in order to avoid this phenomenon causing inconsistency in the upper and lower layer information of the virtualization platform, before locking the resources of the target virtual machine corresponding to the task to be executed, first determine whether the virtual machine has an abnormality. If an abnormality occurs, terminate the execution of the task to be executed and transmit the abnormal signal to the client.

[0080] At the same time, in order to further improve the consistency of the upper and lower layer information of the virtualization platform, after determining that the target virtual machine is abnormal, a consistency check of the upper and lower layer information of the virtualization platform is performed, that is, the query thread is called to query the actual information of all the underlying virtual machines and compare it with the information of each virtual machine in the database.

[0081] The control method for virtualization platform information consistency provided in the embodiment of the present application first determines whether the virtual machine has an abnormality before locking the resources of the target virtual machine corresponding to the task to be executed, thereby avoiding the failure of the computing node to execute the task due to the abnormality of the virtual machine, further improving the stability of the virtual machine and the consistency of the upper and lower layer information of the virtualization platform.

[0082] In a specific embodiment, the tasks to be executed include at least a virtual machine disk migration task, a virtual machine backup task, and a virtual machine snapshot task. This application does not limit the tasks to be executed. For ease of understanding, the following will be described using the virtual machine disk migration task as an example.

[0083] For example, the management node issues a virtual machine disk migration task, and the disk D1 of the target virtual machine VM1 is migrated from source storage A to destination storage B. After migration to destination storage B, the disk of the target virtual machine VM1 is D2. The specific migration steps are as follows:

[0084] S1: Create a disk migration task for the target virtual machine VM1 and transfer the disk migration task to the compute node for execution;

[0085] S2: Check whether the target virtual machine VM1 has any abnormality. If it does, proceed to step S3; if it is normal, proceed to step S4;

[0086] S3: Stop the migration task, transmit an exception signal to the client, and call the query thread to query the actual information of all virtual machines after the computing node executes the task to be executed. The actual information of each virtual machine is checked to see if it is consistent with the information of each virtual machine in the current database. If not, the information of each virtual machine in the current database is synchronized based on the actual information of each virtual machine in the query.

[0087] S4: Obtain the execution result of the computing node after executing the disk migration task of the target virtual machine VM1;

[0088] S5: Determine whether the execution result is obtained. If so, execute step S6; if not, execute step S7;

[0089] S6: Detect, based on the execution result, whether the actual information of the target virtual machine VM1 disk D1 after the computing node executes the task to be executed is consistent with the information of the target virtual machine VM1 disk D1 in the database managed by the current management node. If not, proceed to step S8;

[0090] S7: querying the actual information of all virtual machines after the computing node executes the task to be executed, and checking whether the actual information of each virtual machine is consistent with the information of each virtual machine in the current database. If inconsistent, synchronizing the information of each virtual machine in the current database with the actual information of each virtual machine in the query;

[0091] S8: Synchronize the information of the target virtual machine VM1 disk D1 in the database based on the actual information of the target virtual machine VM1 disk D1 after migration.

[0092] It's worth noting that when performing a virtual machine disk migration task and deleting a virtual machine disk, disk recovery logic is added. After migrating disk D1 of the target virtual machine VM1 from source storage A to destination storage B, disk D1 in source storage A is logically deleted. That is, disk D1 is moved to the Recycle Bin corresponding to source storage A and retained for a preset duration T. After the preset duration T, disk D1 is physically deleted (truly deleted). If an exception is detected in the virtual machine disk migration task within the preset duration T, disk D1 is recovered from the Recycle Bin corresponding to source storage A.

[0093] Therefore, after the compute node executes the migration task for the target virtual machine VM1 disk D1, if the upper and lower layer information of the virtualization platform are consistent, the task ends, and disk D1 is physically deleted after the preset time T, and the recycling record is cleared. If the upper and lower layer information of the virtualization platform are inconsistent, the following situations may occur:

[0094] (1) The underlying target virtual machine VM1 disk D1 is in source storage A. The database managed by the management node shows that the target virtual machine VM1 disk D1 is in destination storage B. Disk D1 in the corresponding recycle bin of source storage A is recovered, and disk D2 is marked as recyclable and physically deleted. In addition, the information in the database is updated to indicate that the target virtual machine VM1 disk D1 is in source storage A. It is worth noting that if it is determined that the recovery of disk D1 has failed, a recovery failure signal is transmitted to the client.

[0095] (2) The underlying target virtual machine VM1 disk D1 is in the destination storage B. In the database managed by the management node, the target virtual machine VM1 disk D1 is in the source storage A. Disk D2 in the recycle bin is recovered, and disk D1 is marked as recyclable and then physically deleted. In addition, the information in the database is updated to indicate that the target virtual machine VM1 disk D1 is in the destination storage B. Similarly, if it is determined that the recovery of disk D2 has failed, a recovery failure signal is transmitted to the client.

[0096] (3) When the disk D1 of the underlying target virtual machine VM1 is in the source storage A or the destination storage B, but there is no disk information of the target virtual machine VM1 in the database, the disk D1 or disk D2 is recovered according to the storage information of the underlying target virtual machine VM1 disk D1, and the disk D1 or disk D2 is marked as recyclable and then physically deleted. In addition, the information in the upper-level database is synchronized to be the same as the underlying information. Of course, if the disk recovery fails, a recovery failure signal needs to be transmitted to the client.

[0097] (4) When the disk information of the target virtual machine VM1 is not available in the bottom layer but exists in the database, the target virtual machine VM1 is shut down, the target virtual machine VM1 is set to be abnormal, and an abnormal signal is transmitted to the client.

[0098] The embodiment of the present application provides a method for controlling the consistency of virtualization platform information. The tasks to be executed include at least a virtual machine disk migration task, a virtual machine backup task, and a virtual machine snapshot task. After the computing node executes any task to be executed, it can detect whether the information of the upper and lower virtual machines is consistent, thereby reducing the loss rate of virtual machine data and improving the stability of the system.

[0099] In the above embodiment, a control method for the consistency of virtualization platform information applied to the management node is described in detail. The present application also provides an embodiment corresponding to the control method for the consistency of virtualization platform information applied to the computing node. The method includes: the computing node obtains the task to be executed created by the management node, executes the execution result obtained by the task to be executed, and then sends the execution result to the management node, so that the management node can detect whether the actual information of the target virtual machine corresponding to the computing node after the execution of the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node based on the execution result. If inconsistent, the information of the target virtual machine in the database is synchronized with the actual information of the target virtual machine.

[0100] It should be noted that the control method for consistency of virtualization platform information applied to computing nodes provided in the embodiment of the present application corresponds to the control method for consistency of virtualization platform information applied to management nodes in the above embodiment, and will not be repeated in the embodiment of the present application.

[0101] The control method for the consistency of virtualization platform information provided in the embodiment of the present application is applied to the computing node, including: obtaining the task to be executed created by the management node, and executing the execution result obtained by executing the task to be executed, and sending the execution result to the management node, so that the management node can detect whether the actual information of the target virtual machine corresponding to the computing node after executing the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node based on the execution result. If inconsistent, the information of the target virtual machine in the database is synchronized with the information of the target virtual machine in the database based on the actual information of the target virtual machine. It can be seen that the technical solution provided by the present application compares the actual information of the target virtual machine corresponding to the underlying computing node after executing the task to be executed with the information of the virtual machine recorded in the database. When the information of the virtual machine is inconsistent, the virtual machine information in the database is synchronized with the actual information of the underlying target virtual machine as a reference, thereby avoiding the inconsistency of the upper and lower layers of the virtualization platform, that is, avoiding the inconsistency between the virtual machine information in the database and the virtual machine information corresponding to the computing node after executing the task, thereby reducing the risk of virtual machine data loss and improving system stability.

[0102] In the above embodiments, a method for controlling the consistency of virtualized platform information applied to a management node is described in detail. This application also provides corresponding embodiments of a device for controlling the consistency of virtualized platform information applied to a management node. It should be noted that this application describes the embodiments of the device from two perspectives: one based on functional modules and the other based on hardware structure.

[0103] Figure 2 This is a structural diagram of a virtual platform information consistency control device provided in an embodiment of the present application, which is applied to a management node, such as Figure 2 As shown, the device includes:

[0104] The creation module 10 is used to create tasks to be executed and send the tasks to be executed to the computing nodes.

[0105] The first acquisition module 11 is used to obtain the execution result obtained by the computing node when executing the task to be executed.

[0106] The detection module 12 is used to detect whether the actual information of the target virtual machine corresponding to the computing node after executing the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node based on the execution result. If inconsistent, the information synchronization module is called.

[0107] The information synchronization module 13 is configured to perform an information synchronization operation on the target virtual machine information in the database based on the actual information of the target virtual machine.

[0108] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, and they will not be repeated here.

[0109] The control device for the consistency of virtualization platform information provided by the embodiment of the present application is applied to the management node, including: creating a task to be executed, and sending the created task to be executed to the computing node, and obtaining the execution result obtained by the computing node executing the task to be executed. According to the execution result, it is detected whether the actual information of the target virtual machine corresponding to the computing node after executing the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node. If inconsistent, the information of the target virtual machine in the database is synchronized with the information of the target virtual machine based on the actual information of the target virtual machine. It can be seen that the technical solution provided by the present application compares the actual information of the target virtual machine corresponding to the underlying computing node after executing the task to be executed with the information of the virtual machine recorded in the database. When the information of the virtual machine is inconsistent, the virtual machine information in the database is synchronized with the actual information of the underlying target virtual machine as a reference, thereby avoiding the inconsistency of the upper and lower layers of the virtualization platform, that is, avoiding the inconsistency between the virtual machine information in the database and the virtual machine information corresponding to the computing node after executing the task, thereby reducing the risk of virtual machine data loss and improving system stability.

[0110] In the above embodiments, a method for controlling consistency of virtualized platform information applied to computing nodes is described in detail. The present application also provides an embodiment corresponding to a device for controlling consistency of virtualized platform information applied to computing nodes.

[0111] Figure 3 This is a structural diagram of a virtualization platform information consistency control device provided by another embodiment of the present application, which is applied to computing nodes, such as Figure 3 As shown, the device includes:

[0112] The second acquisition module 100 is used to acquire the to-be-executed tasks created by the management node.

[0113] The execution module 101 is used to execute the execution result obtained by executing the task to be executed.

[0114] The sending module 102 is used to send the execution result to the management node so that the management node can detect whether the actual information of the target virtual machine corresponding to the computing node after executing the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node based on the execution result. If inconsistent, the information of the target virtual machine in the database is synchronized with the actual information of the target virtual machine.

[0115] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, and they will not be repeated here.

[0116] The control device for the consistency of virtualization platform information provided by the embodiment of the present application is applied to the computing node, including: obtaining the task to be executed created by the management node, and executing the execution result obtained by executing the task to be executed, and sending the execution result to the management node, so that the management node can detect whether the actual information of the target virtual machine corresponding to the computing node after executing the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node based on the execution result. If inconsistent, the information of the target virtual machine in the database is synchronized with the information of the target virtual machine in the database based on the actual information of the target virtual machine. It can be seen that the technical solution provided by the present application compares the actual information of the target virtual machine corresponding to the underlying computing node after executing the task to be executed with the information of the virtual machine recorded in the database. When the information of the virtual machine is inconsistent, the virtual machine information in the database is synchronized with the actual information of the underlying target virtual machine as a reference, thereby avoiding the inconsistency of the upper and lower layers of the virtualization platform, that is, avoiding the inconsistency between the virtual machine information in the database and the virtual machine information corresponding to the computing node after executing the task, thereby reducing the risk of virtual machine data loss and improving system stability.

[0117] Figure 4 This is a structural diagram of a control device for virtualization platform information consistency provided by another embodiment of the present application, such as Figure 4 As shown, the control device for virtualization platform information consistency includes: a memory 20 for storing computer programs;

[0118] The processor 21 is configured to implement the steps of the method for controlling the consistency of virtualization platform information as described in the above embodiment when executing a computer program.

[0119] The virtualization platform information consistency control device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer, or a desktop computer.

[0120] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of a digital signal processor (DSP), a field programmable gate array (FPGA), and a programmable logic array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0121] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used to store the following computer program 201, wherein, after the computer program is loaded and executed by the processor 21, it can implement the relevant steps of the control method for the consistency of virtualization platform information disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include but is not limited to the relevant data involved in the control method for the consistency of virtualization platform information.

[0122] In some embodiments, the control device for virtualization platform information consistency may further include a display screen 22 , an input / output interface 23 , a communication interface 24 , a power supply 25 , and a communication bus 26 .

[0123] Those skilled in the art will understand that Figure 4 The structure shown in the figure does not constitute a limitation on the control device for virtualization platform information consistency, and may include more or fewer components than shown in the figure.

[0124] The embodiment of the present application provides a device for controlling consistency of virtualized platform information, including a memory and a processor. When the processor executes a program stored in the memory, it can implement the following method: a method for controlling consistency of virtualized platform information.

[0125] The control device for virtualization platform information consistency provided in the embodiment of the present application compares the actual information of the target virtual machine corresponding to the underlying computing node after executing the task to be executed with the information of the virtual machine recorded in the database. When the information of the virtual machine is inconsistent, the virtual machine information in the database is synchronized based on the actual information of the underlying target virtual machine, thereby avoiding inconsistency between the upper and lower layer information of the virtualization platform, that is, avoiding inconsistency between the virtual machine information in the database and the virtual machine information corresponding to the computing node after executing the task, thereby reducing the risk of virtual machine data loss and improving system stability.

[0126] Finally, the present application also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps described in the above-mentioned method embodiment (which may be a method corresponding to the management node side, a method corresponding to the computing node side, or a method corresponding to both the management node side and the computing node side).

[0127] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium and executes all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc. Various media that can store program code.

[0128] The above is a detailed introduction to a method, device and medium for controlling the consistency of information of a virtualization platform provided by the present application. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of this application.

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

Claims

1. A method for controlling information consistency of a virtualization platform, characterized in that: Applicable to management nodes, including: Create tasks to be executed and send them to computing nodes; Obtaining an execution result obtained by the computing node executing the task to be executed; Detecting, based on the execution result, whether actual information of the target virtual machine corresponding to the computing node after executing the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node; If there is inconsistency, performing an information synchronization operation on the information of the target virtual machine in the database based on the actual information of the target virtual machine; Before detecting, based on the execution result, whether actual information of the target virtual machine corresponding to the computing node executing the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node, the method further includes: Determining whether the execution result is obtained; If not obtained, query the actual information of all virtual machines after the computing node executes the task to be executed, and detect whether the actual information of each virtual machine is consistent with the information of each virtual machine in the current database; if not, synchronize the information of each virtual machine in the current database with the actual information of each virtual machine queried; If obtained, the process proceeds to the step of detecting, based on the execution result, whether the actual information of the target virtual machine corresponding to the computing node after executing the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node.

2. The method for controlling virtualization platform information consistency according to claim 1, characterized in that: Before the computing node executes the task to be executed and obtains the execution result, the method further includes: Locking the resources of the target virtual machine corresponding to the task to be executed; Furthermore, after the computing node executes the task to be executed and obtains the execution result, the method further includes: Release resources of the target virtual machine.

3. The method for controlling virtualization platform information consistency according to claim 1, wherein: Also includes: At preset time intervals, the steps of querying the actual information of all virtual machines after the computing node executes the task to be executed, and detecting whether the actual information of each virtual machine is consistent with the information of each virtual machine in the current database are performed.

4. The method for controlling virtualization platform information consistency according to claim 2, wherein: Before locking the resources of the target virtual machine corresponding to the task to be executed, the method further includes: Determine whether the target virtual machine is normal; If normal, proceed to the step of locking the resources of the target virtual machine corresponding to the task to be executed; If an exception occurs, the execution of the pending task is terminated and an exception signal is transmitted to the client.

5. The method for controlling virtualization platform information consistency according to any one of claims 1 to 4, characterized in that: The tasks to be executed include at least a virtual machine disk migration task, a virtual machine backup task and a virtual machine snapshot task.

6. A method for controlling the consistency of virtualization platform information, characterized in that: Applied to compute nodes, including: Get the pending tasks created by the management node; Executing the task to be executed to obtain an execution result; Sending the execution result to the management node, so that the management node can detect whether the actual information of the target virtual machine corresponding to the computing node after executing the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node based on the execution result; if inconsistent, performing an information synchronization operation on the information of the target virtual machine in the database based on the actual information of the target virtual machine; Before the management node detects, based on the execution result, whether actual information of the target virtual machine corresponding to the computing node executing the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node, the method further includes: Determining whether the execution result is obtained; If not obtained, query the actual information of all virtual machines after the computing node executes the task to be executed, and detect whether the actual information of each virtual machine is consistent with the information of each virtual machine in the current database; if not, synchronize the information of each virtual machine in the current database with the actual information of each virtual machine queried; If obtained, the process proceeds to the step of detecting, based on the execution result, whether the actual information of the target virtual machine corresponding to the computing node after executing the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node.

7. A control device for virtualization platform information consistency, characterized in that: Applicable to management nodes, including: A creation module is used to create tasks to be executed and send the tasks to be executed to computing nodes; A first acquisition module is used to obtain an execution result obtained by the computing node executing the task to be executed; a detection module, configured to detect, based on the execution result, whether the actual information of the target virtual machine corresponding to the task to be executed by the computing node is consistent with the information of the target virtual machine in the database managed by the current management node; if not, calling the information synchronization module; The information synchronization module is used to synchronize the information of the target virtual machine in the database with the actual information of the target virtual machine as a reference; Before detecting, based on the execution result, whether actual information of the target virtual machine corresponding to the computing node executing the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node, the method further includes: Determining whether the execution result is obtained; If not obtained, query the actual information of all virtual machines after the computing node executes the task to be executed, and detect whether the actual information of each virtual machine is consistent with the information of each virtual machine in the current database; if not, synchronize the information of each virtual machine in the current database with the actual information of each virtual machine queried; If obtained, the process proceeds to the step of detecting, based on the execution result, whether the actual information of the target virtual machine corresponding to the computing node after executing the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node.

8. A control device for virtualization platform information consistency, characterized in that: Applied to compute nodes, including: The second acquisition module is used to obtain the pending tasks created by the management node; An execution module, configured to execute the task to be executed and obtain an execution result; a sending module, configured to send the execution result to the management node, so that the management node can detect, based on the execution result, whether the actual information of the target virtual machine corresponding to the computing node after executing the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node; if not, performing an information synchronization operation on the information of the target virtual machine in the database based on the actual information of the target virtual machine; Before the management node detects, based on the execution result, whether actual information of the target virtual machine corresponding to the computing node executing the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node, the method further includes: Determining whether the execution result is obtained; If not obtained, query the actual information of all virtual machines after the computing node executes the task to be executed, and detect whether the actual information of each virtual machine is consistent with the information of each virtual machine in the current database; if not, synchronize the information of each virtual machine in the current database with the actual information of each virtual machine queried; If obtained, the process proceeds to the step of detecting, based on the execution result, whether the actual information of the target virtual machine corresponding to the computing node after executing the task to be executed is consistent with the information of the target virtual machine in the database managed by the current management node.

9. A control device for virtualization platform information consistency, characterized in that: including a memory for storing a computer program; A processor, configured to implement the steps of the method for controlling virtualization platform information consistency according to any one of claims 1 to 6 when executing the computer program.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for controlling virtualization platform information consistency according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data processing method, device and system, computer equipment and readable medium

    CN112839072A

  • Task management method, device and system, computer equipment and storage medium

    CN113296889A