A virtual machine configuration data synchronization method, device, equipment and storage medium

By first executing virtual machine addition and deletion operations at the disaster recovery site and returning the results, and then executing them at the production site, combined with proactive push and pull data synchronization devices, the reliability and consistency issues of data synchronization in a dual-site disaster recovery system are resolved, improving the flexibility of user services and resource utilization.

CN115686741BActive Publication Date: 2026-01-27LANGCHAO ELECTRONIC INFORMATION IND CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211038570.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-26
Publication Date
2026-01-27
Estimated Expiration
2042-08-26

AI Technical Summary

Technical Problem

Existing dual-site disaster recovery systems struggle to guarantee the reliability and consistency of data synchronization when adding or deleting virtual machines, limiting the flexibility of user services.

Method used

After detecting virtual machine addition or deletion operations at the production site, the system calculates all configuration information data and generates target addition/deletion operation tasks. These tasks are first executed at the disaster recovery site and the results are returned. Then, the tasks are executed at the production site. The system uses proactive push and pull data synchronization devices to ensure the reliability and consistency of synchronization.

Benefits of technology

It achieves reliable and consistent synchronization of virtual machine addition and deletion operations, ensuring that user services are flexible while being protected against disasters, and improving resource utilization and operating efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115686741B_ABST
    Figure CN115686741B_ABST
Patent Text Reader

Abstract

The application discloses a virtual machine configuration data synchronization method and device, equipment and a storage medium, relates to the technical field of cloud computing, and is applied to a cloud platform with a dual-site disaster recovery system, and comprises the following steps: when it is monitored that a production site needs to perform a configuration data addition and deletion operation on a first virtual machine, full-amount configuration information data after the configuration data addition and deletion operation is calculated, then target addition and deletion operation tasks are generated based on the changed full-amount configuration information data and are delivered to a second virtual machine in a disaster recovery site, so that the target addition and deletion operation tasks are executed through the second virtual machine; if the execution result shows that the task execution is successful, the target addition and deletion operation tasks are executed through the first virtual machine. The application performs the configuration data addition and deletion operation in the disaster recovery site in advance, and performs the operation in the production site after the operation in the disaster recovery site is successful, so that the reliability and consistency during the addition and deletion operation synchronization are ensured, and the user business has flexibility while being protected by the disaster recovery security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud computing technology, and in particular to a virtual machine configuration data synchronization method, apparatus, device, and storage medium. Background Technology

[0002] With the rapid development of information technology, cloud computing has gradually become a hot topic in the industry. Major domestic and international vendors have deployed their cloud computing service platforms in various fields, including science, education, culture, healthcare, government, high-performance computing, e-commerce, and the Internet of Things. Cloud computing includes the following service layers: Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS). The IaaS layer, as the management platform for cloud computing services (i.e., the cloud platform), plays a crucial role. The numerous virtual machines managed by the cloud platform carry various functionalities and are the working units of cloud computing. Therefore, disaster recovery for the virtual machines managed by the cloud platform is particularly important.

[0003] Currently, cloud platforms using dual-site disaster recovery systems have emerged to perform disaster recovery on virtual machines. The dual sites consist of a production site and a disaster recovery site. The first virtual machine, which hosts business operations on the production site, is first used to generate a corresponding, currently shut-down second virtual machine on the disaster recovery site with all data. The disaster recovery system then periodically transmits incremental data from the first virtual machine to the second virtual machine for backup. When the production site fails, the disaster recovery site can quickly start the second virtual machine by changing its state, transferring the business operations from the production site to its own machine. This achieves rapid business recovery under disaster recovery, ensuring the security of user services.

[0004] It's important to note that the core of a dual-site disaster recovery system is synchronizing data from the first virtual machine to the second. Therefore, the reliability and consistency of the data carriers, such as disks (RAID, Redundant Arrays of Independent Disks), CPUs (central processing units), and memory, are crucial for ensuring smooth data synchronization with the second virtual machine when the first virtual machine is added or deleted. However, some dual-site disaster recovery systems circumvent synchronization issues by prohibiting the addition or deletion of virtual machines included in the disaster recovery process. For example, they might prohibit adding or deleting disks from virtual machines included in the disaster recovery process to avoid disk synchronization problems. This restricts user operations and reduces the flexibility of the disaster recovery system.

[0005] Therefore, when the dual-site disaster recovery system allows the addition and deletion of the first virtual machine carrier at the production site, how to optimally synchronize the addition and deletion operations performed on the first virtual machine to the second virtual machine at the disaster recovery site is a problem that needs to be solved by those skilled in the art. Summary of the Invention

[0006] In view of this, the purpose of this application is to provide a virtual machine configuration data synchronization method, apparatus, device, and storage medium that can ensure the reliability and consistency of virtual machine addition and deletion operations during synchronization, enabling user services to maintain flexibility while ensuring disaster recovery security. The specific solution is as follows:

[0007] Firstly, this application discloses a virtual machine configuration data synchronization method, applied to a cloud platform with a dual-site disaster recovery system, wherein the dual-site disaster recovery system includes a production site and a disaster recovery site, comprising:

[0008] When it is detected that the production site needs to perform configuration data addition or deletion operations on the first virtual machine located in the production site, the full configuration information data after the production site performs configuration data addition or deletion operations on the first virtual machine is calculated, and the changed full configuration information data is obtained.

[0009] Based on the modified full configuration information data, a corresponding target add / delete operation task is generated, and the target add / delete operation task is sent to the second virtual machine in the disaster recovery site so that the target add / delete operation task can be executed through the second virtual machine to obtain the corresponding execution result, and the execution result is returned to the production site;

[0010] If the execution result indicates that the target add / delete operation task was successfully executed, then the target add / delete operation task is sent to the first virtual machine so that the target add / delete operation task can be executed through the first virtual machine, and the changed full configuration information data is updated to the database of the production site.

[0011] Optionally, the step of distributing the target add / delete operation task to the second virtual machine in the disaster recovery site includes:

[0012] The target add / delete operation task is sent to the editing virtual machine interface of the disaster recovery site through the active push data synchronization device located in the production site.

[0013] The target add / delete operation task is forwarded to the second virtual machine in the disaster recovery site through the edit virtual machine interface.

[0014] Optionally, issuing the target add / delete operation task to the first virtual machine includes:

[0015] The target add / delete operation task located in the second virtual machine is sent to the active push data synchronization device in the production site through the edit virtual machine interface;

[0016] The target add / delete operation task is sent to the first virtual machine through the active push data synchronization device.

[0017] Optionally, the virtual machine configuration data synchronization method further includes:

[0018] The active data retrieval and synchronization device in the disaster recovery site calls the query virtual machine interface of the production site, and retrieves the current full configuration information data of the first virtual machine through the query virtual machine interface.

[0019] The current full configuration information data is compared with the configuration information data currently existing in the second virtual machine to obtain the comparison result;

[0020] If the comparison results show that there is a difference between the current full configuration information data and the configuration information data currently existing in the second virtual machine, then the current full configuration information data shall be used as the standard to restore the configuration information data currently existing in the second virtual machine.

[0021] Optionally, the step of calling the query virtual machine interface of the production site through the active data retrieval and synchronization device in the disaster recovery site includes:

[0022] The disaster recovery site actively pulls data synchronization devices and calls the query virtual machine interface of the production site according to a preset time period.

[0023] Optionally, restoring the configuration information data currently existing in the second virtual machine based on the current full configuration information data includes:

[0024] The current full configuration information data is transmitted to the second virtual machine by calling the edit virtual machine interface in the disaster recovery site, and the add / delete operation task generated based on the full configuration information data is issued to the second virtual machine through the active push data synchronization device, so that the second virtual machine can perform the corresponding add / delete operation to change the current configuration information data to the full configuration information data, and then update the full configuration information data to the database of the disaster recovery site.

[0025] Optionally, when it is detected that the production site needs to perform configuration data addition / deletion operations on the first virtual machine located in the production site, the full configuration information data after the production site performs configuration data addition / deletion operations on the first virtual machine is calculated to obtain the changed full configuration information data, including:

[0026] When it is detected that the production site needs to perform disk configuration data addition or deletion operations on the first virtual machine located in the production site, the full disk configuration information data after the production site performs the disk configuration data addition or deletion operations on the first virtual machine is calculated, and the changed full disk configuration information data is obtained.

[0027] Secondly, this application discloses a virtual machine configuration data synchronization device, applied to a cloud platform with a dual-site disaster recovery system, wherein the dual-site disaster recovery system includes a production site and a disaster recovery site, comprising:

[0028] The configuration information data calculation module is used to calculate the full configuration information data after the production site performs the configuration data addition or deletion operation on the first virtual machine located in the production site when it is detected that the production site needs to perform configuration data addition or deletion operation on the first virtual machine, and obtain the changed full configuration information data.

[0029] The add / delete operation task generation module is used to generate corresponding target add / delete operation tasks based on the changed full configuration information data.

[0030] The first task distribution and execution module is used to distribute the target add / delete operation task to the second virtual machine in the disaster recovery site, so that the target add / delete operation task can be executed through the second virtual machine to obtain the corresponding execution result, and the execution result can be returned to the production site;

[0031] The second task issuance and execution module is used to issue the target add / delete operation task to the first virtual machine if the execution result indicates that the target add / delete operation task was successfully executed, so that the target add / delete operation task can be executed through the first virtual machine and the changed full configuration information data can be updated to the database of the production site.

[0032] Thirdly, this application discloses an electronic device, including a processor and a memory; wherein, when the processor executes a computer program stored in the memory, it implements the aforementioned virtual machine configuration data synchronization method.

[0033] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned virtual machine configuration data synchronization method.

[0034] As can be seen, when this application detects that the production site needs to perform configuration data addition / deletion operations on the first virtual machine located in the production site, it calculates the full configuration information data after the production site performs the configuration data addition / deletion operations on the first virtual machine, obtains the changed full configuration information data, and then generates a corresponding target addition / deletion operation task based on the changed full configuration information data. This target addition / deletion operation task is then sent to the second virtual machine in the disaster recovery site so that the second virtual machine can execute the target addition / deletion operation task and obtain the corresponding execution result. The execution result is then returned to the production site. If the execution result indicates that the target addition / deletion operation task is successfully executed, the target addition / deletion operation task is sent to the first virtual machine so that the first virtual machine can execute the target addition / deletion operation task and update the changed full configuration information data to the database of the production site. This application pre-performs configuration data addition / deletion operations in the second virtual machine in the disaster recovery site, and then executes the configuration data addition / deletion operations in the first virtual machine in the production site after successful execution in the disaster recovery site. This ensures the reliability and consistency of virtual machine addition / deletion operations during synchronization, allowing user services to have flexibility while obtaining disaster recovery protection security. Attached Figure Description

[0035] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0036] Figure 1 This application discloses a flowchart of a virtual machine configuration data synchronization method.

[0037] Figure 2 This application discloses a specific virtual machine configuration data synchronization method flowchart;

[0038] Figure 3 This is a schematic diagram of a specific virtual machine configuration data synchronization framework disclosed in this application;

[0039] Figure 4 This is a schematic diagram of the structure of a virtual machine configuration data synchronization device disclosed in this application;

[0040] Figure 5 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

[0041] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0042] This application discloses a virtual machine configuration data synchronization method applied to a cloud platform with a dual-site disaster recovery system, wherein the dual-site disaster recovery system includes a production site and a disaster recovery site. See [link to relevant documentation]. Figure 1 As shown, the method includes:

[0043] Step S11: When it is detected that the production site needs to perform configuration data addition or deletion operations on the first virtual machine located in the production site, calculate the full configuration information data after the production site performs configuration data addition or deletion operations on the first virtual machine, and obtain the changed full configuration information data.

[0044] It should be noted that this application is mainly applied to cloud platforms with a dual-site disaster recovery system, wherein the dual-site disaster recovery system specifically includes a production site and a disaster recovery site. Both the production site and the disaster recovery site can create one or more virtual machines.

[0045] In this embodiment, when it is detected that the production site needs to perform configuration data addition / deletion operations on the first virtual machine located in the production site, the full configuration information data after the corresponding configuration data addition / deletion operation on the first virtual machine is calculated first, thus obtaining the changed full configuration information data. That is, the first virtual machine in the production site does not actually perform configuration data addition / deletion operations; it is only that when it is detected that the first virtual machine needs to perform configuration data addition / deletion operations, the full configuration information data after the corresponding addition / deletion operation on the first virtual machine is pre-calculated. In other words, the full configuration information data in the first virtual machine has not changed at this time. The configuration data addition / deletion operations include, but are not limited to, configuration data addition / deletion operations on disk, CPU, memory, etc.; the first virtual machine can be any virtual machine in the production site.

[0046] Step S12: Generate corresponding target add / delete operation tasks based on the changed full configuration information data, and send the target add / delete operation tasks to the second virtual machine in the disaster recovery site so that the target add / delete operation tasks can be executed through the second virtual machine to obtain the corresponding execution results, and return the execution results to the production site.

[0047] In this embodiment, the full configuration information data after the production site performs configuration data addition and deletion operations on the first virtual machine is calculated. After obtaining the changed full configuration information data, a corresponding target addition and deletion operation task is generated based on the changed full configuration information data. That is, the configuration information data to be added or deleted relative to the original full configuration information data of the first virtual machine is then sent to the second virtual machine in the disaster recovery site of the dual-site disaster recovery system. The target addition and deletion operation task is then executed by the second virtual machine to obtain the corresponding execution result. That is, the actual addition and deletion operation is performed in the second virtual machine. Then, the execution result is returned to the production site.

[0048] Step S13: If the execution result indicates that the target add / delete operation task was successfully executed, then the target add / delete operation task is sent to the first virtual machine so that the target add / delete operation task can be executed through the first virtual machine, and the changed full configuration information data is updated to the database of the production site.

[0049] In this embodiment, after the production site receives the execution result, it analyzes the result. If the result indicates that the second virtual machine successfully executed the target add / delete operation task, the production site can issue the target add / delete operation task to the first virtual machine. The first virtual machine then executes the target add / delete operation task, and upon successful execution, updates the modified full configuration information data to the production site's database. That is, after the first virtual machine successfully executes the add / delete operation task, the latest full configuration information data is updated to the local database.

[0050] Additionally, it should be noted that if the execution result indicates that the target add / delete operation task was successfully executed, the modified full configuration information data can be further updated to the database of the aforementioned disaster recovery site.

[0051] As can be seen, in this embodiment, when it is detected that the production site needs to perform configuration data addition / deletion operations on the first virtual machine located in the production site, the full configuration information data after the production site performs the configuration data addition / deletion operations on the first virtual machine is calculated, resulting in the changed full configuration information data. Then, based on the changed full configuration information data, a corresponding target addition / deletion operation task is generated, and the target addition / deletion operation task is sent to the second virtual machine in the disaster recovery site so that the second virtual machine can execute the target addition / deletion operation task to obtain the corresponding execution result, and the execution result is returned to the production site. If the execution result shows that the target addition / deletion operation task is successfully executed, the target addition / deletion operation task is sent to the first virtual machine so that the first virtual machine can execute the target addition / deletion operation task and update the changed full configuration information data to the database of the production site. This embodiment performs configuration data addition / deletion operations in the second virtual machine in the disaster recovery site in advance, and then executes the configuration data addition / deletion operations in the first virtual machine in the production site after the disaster recovery site has successfully executed the operation. This can ensure the reliability and consistency of virtual machine addition / deletion operations during synchronization, enabling user services to have flexibility while obtaining disaster recovery protection security.

[0052] This application discloses a specific method for synchronizing virtual machine configuration data, applied to a cloud platform with a dual-site disaster recovery system, wherein the dual-site disaster recovery system includes a production site and a disaster recovery site. See [link to relevant documentation]. Figure 2 As shown, the method includes:

[0053] Step S21: When it is detected that the production site needs to perform disk configuration data addition or deletion operations on the first virtual machine located in the production site, calculate the full disk configuration information data after the production site performs disk configuration data addition or deletion operations on the first virtual machine, and obtain the changed full disk configuration information data.

[0054] In this embodiment, when it is detected that the production site in the cloud platform with a dual-site disaster recovery system needs to perform configuration data addition or deletion operations on the disk of the first virtual machine located in the production site, the full configuration information data after the production site performs the corresponding configuration data addition or deletion operations on the disk of the first virtual machine is calculated first, and the changed full disk configuration information data is obtained.

[0055] Step S22: Generate corresponding target add / delete operation tasks based on the changed full disk configuration information data, and send the target add / delete operation tasks to the editing virtual machine interface of the disaster recovery site through the active push data synchronization device located in the production site.

[0056] In this embodiment, the full disk configuration information data after the production site performs disk configuration data addition and deletion operations on the first virtual machine is calculated. After obtaining the changed full disk configuration information data, corresponding target addition and deletion operation tasks can be generated based on the changed full disk configuration information data. Further, see... Figure 3 As shown, the target addition and deletion operation tasks are sent to the editing virtual machine interface of the disaster recovery site through the active push data synchronization device located in the production site.

[0057] Step S23: Forward the target add / delete operation task to the second virtual machine in the disaster recovery site through the edit virtual machine interface, so that the target add / delete operation task can be executed through the second virtual machine to obtain the corresponding execution result, and return the execution result to the production site.

[0058] In this embodiment, after the target add / delete operation task is sent to the editing virtual machine interface of the disaster recovery site through the active push data synchronization device located in the production site, the target add / delete operation task can be further pushed to the second virtual machine in the disaster recovery site through the editing virtual machine interface. The second virtual machine then executes the target add / delete operation task to obtain the corresponding execution result, and after the execution is completed, the execution result is returned to the production site through the editing virtual machine interface.

[0059] Step S24: If the execution result indicates that the target add / delete operation task was successfully executed, then the target add / delete operation task located in the second virtual machine is sent to the active push data synchronization device in the production site through the edit virtual machine interface.

[0060] In this embodiment, after the production site receives the above execution result, if the above execution result indicates that the target add / delete operation task executed on the second virtual machine was successfully executed, then the target add / delete operation task located in the second virtual machine can be further sent to the active push data synchronization device in the production site through the above edit virtual machine interface.

[0061] Step S25: The target add / delete operation task is sent to the first virtual machine through the active push data synchronization device, so that the target add / delete operation task is executed through the first virtual machine and the changed full configuration information data is updated to the database of the production site.

[0062] In this embodiment, after the target add / delete operation task located in the second virtual machine is sent to the active push data synchronization device in the production site through the edit virtual machine interface, the target add / delete operation task can be further forwarded to the first virtual machine through the active push data synchronization device. Then, the target add / delete operation task can be executed through the first virtual machine, and after execution, the modified full configuration information data is updated to the database of the production site. This completes one instance of active push disk data synchronization from the production site to the disaster recovery site.

[0063] Step S26: The active data retrieval and synchronization device in the disaster recovery site calls the query virtual machine interface of the production site, and retrieves the current full configuration information data of the first virtual machine through the query virtual machine interface.

[0064] It should be noted that, in this embodiment, see Figure 3 As shown, the active data retrieval and synchronization device in the disaster recovery site can also be used to call the virtual machine query interface in the production site, and then the current full configuration information data of the first virtual machine can be retrieved through the virtual machine query interface.

[0065] Specifically, the step of calling the query virtual machine interface of the production site through the active data retrieval and synchronization device in the disaster recovery site can include: calling the query virtual machine interface of the production site through the active data retrieval and synchronization device in the disaster recovery site according to a preset time period. That is, the query virtual machine interface of the production site can be called according to a preset time period.

[0066] Step S27: Compare the current full configuration information data with the configuration information data currently existing in the second virtual machine to obtain the comparison result.

[0067] In this embodiment, after retrieving the current full configuration information data of the first virtual machine through the query virtual machine interface, the current full configuration information data is compared with the configuration information data currently existing in the second virtual machine to obtain the corresponding comparison result.

[0068] Step S28: If the comparison result shows that there is a difference between the current full configuration information data and the configuration information data currently existing in the second virtual machine, then the configuration information data currently existing in the second virtual machine is restored based on the current full configuration information data.

[0069] In this embodiment, if the comparison results indicate a difference between the current full configuration information data and the configuration information data currently existing in the second virtual machine, the current full configuration information data can be used as the standard to restore the configuration information data currently existing in the second virtual machine. This completes one instance of a disaster recovery site actively pulling disk data from the production site and synchronizing it locally.

[0070] In one specific implementation, restoring the configuration information data currently existing in the second virtual machine based on the current full configuration information data may specifically include: transmitting the current full configuration information data to the second virtual machine by calling the edit virtual machine interface in the disaster recovery site, and issuing a add / delete operation task based on the full configuration information data to the second virtual machine through the active push data synchronization device, so that the second virtual machine can perform corresponding add / delete operations to change the currently existing configuration information data to the full configuration information data, and then updating the full configuration information data to the database of the disaster recovery site. That is, the current full configuration information data can be transmitted to the second virtual machine by calling the edit virtual machine interface in the disaster recovery site, then an add / delete operation task based on the full configuration information data can be issued to the second virtual machine through the active push data synchronization device, then the second virtual machine can perform corresponding add / delete operations to change the currently existing configuration information data to the full configuration information data, and then updating the full configuration information data to the database of the disaster recovery site.

[0071] As can be seen from the above, in this embodiment, when adding or deleting configuration data on the disk of the first virtual machine in the production site, the operation is first pushed to the disaster recovery site via an active data synchronization device. Only when the disaster recovery site returns a successful result will the active data synchronization device continue to perform the disk addition / deletion operation on the production site. Compared to editing locally on the production site first and then synchronizing to the disaster recovery site, this application can perform disk addition / deletion on the production site only after the disk synchronization on the disaster recovery site is successful. When disk addition / deletion on the disaster recovery site fails due to abnormal conditions (such as network instability between the two sites, insufficient remaining space in the disaster recovery site's storage pool, etc.), the production site does not need to perform a rollback operation, thereby improving resource utilization and operating efficiency.

[0072] Furthermore, if the production site sends a task to the disaster recovery site via an active data synchronization device to perform disk addition / deletion operations on the second virtual machine, and during the waiting period for the disaster recovery site's task to complete, an abnormal situation (such as network instability between the two sites) causes the production site to fail to obtain the task status, it can only assume that the disaster recovery site's task has failed. Therefore, the production site's local task also aborts and fails. However, the task sent to the disaster recovery site may execute successfully, but it will not return a success status. This will result in the disaster recovery site successfully adding or deleting disks, while the production site's local disk addition / deletion fails, leading to data inconsistency. In this case, the disaster recovery site needs to actively pull the data synchronization device to retrieve the full disk configuration information of the first virtual machine and compare it with the disk configuration information of the second virtual machine. If they differ, it should actively synchronize with the second virtual machine.

[0073] The dual-site disaster recovery system in this embodiment includes a production site and a disaster recovery site. The production site has an active data push synchronization device, and the disaster recovery site has an active data pull synchronization device. The active data push synchronization device on the production site ensures the reliability of disk synchronization; the active data pull synchronization device on the disaster recovery site ensures the consistency of disk synchronization. These two devices guarantee the reliability and consistency of disk synchronization between the production site and the second virtual machine in the cloud platform's virtual machine disaster recovery system, ensuring both the security and flexibility of user services while providing disaster recovery protection.

[0074] Accordingly, this application also discloses a virtual machine configuration data synchronization device, applied to a cloud platform with a dual-site disaster recovery system, wherein the dual-site disaster recovery system includes a production site and a disaster recovery site, see [link to relevant documentation]. Figure 4 As shown, the device includes:

[0075] The configuration information data calculation module 11 is used to calculate the full configuration information data after the production site performs the configuration data addition and deletion operation on the first virtual machine located in the production site when it is detected that the production site needs to perform configuration data addition and deletion operation on the first virtual machine, and obtain the changed full configuration information data.

[0076] The add / delete operation task generation module 12 is used to generate corresponding target add / delete operation tasks based on the changed full configuration information data.

[0077] The first task assignment and execution module 13 is used to assign the target add / delete operation task to the second virtual machine in the disaster recovery site, so that the target add / delete operation task can be executed through the second virtual machine to obtain the corresponding execution result, and the execution result can be returned to the production site;

[0078] The second task issuance and execution module 14 is used to issue the target add / delete operation task to the first virtual machine if the execution result indicates that the target add / delete operation task was successfully executed, so that the target add / delete operation task can be executed through the first virtual machine and the changed full configuration information data can be updated to the database of the production site.

[0079] The specific workflow of each of the above modules can be found in the relevant content disclosed in the foregoing embodiments, and will not be repeated here.

[0080] As can be seen, in this embodiment, when it is detected that the production site needs to perform configuration data addition / deletion operations on the first virtual machine located in the production site, the full configuration information data after the production site performs the configuration data addition / deletion operations on the first virtual machine is calculated, resulting in the changed full configuration information data. Then, based on the changed full configuration information data, a corresponding target addition / deletion operation task is generated and sent to the second virtual machine in the disaster recovery site. The second virtual machine executes the target addition / deletion operation task to obtain the corresponding execution result, and the execution result is returned to the production site. If the execution result indicates that the target addition / deletion operation task is successfully executed, the target addition / deletion operation task is sent to the first virtual machine to execute the target addition / deletion operation task and update the changed full configuration information data to the database of the production site. This embodiment performs configuration data addition / deletion operations in the second virtual machine of the disaster recovery site in advance, and then executes the configuration data addition / deletion operations in the first virtual machine of the production site after successful execution at the disaster recovery site. This ensures the reliability and consistency of virtual machine addition / deletion operations during synchronization, allowing user services to have flexibility while obtaining disaster recovery protection security.

[0081] In some specific embodiments, the first task issuing and execution module 13 may specifically include:

[0082] The task distribution unit is used to distribute the target add / delete operation task to the editing virtual machine interface of the disaster recovery site through the active push data synchronization device located in the production site.

[0083] The task forwarding unit is used to forward the target add / delete operation task to the second virtual machine in the disaster recovery site through the edit virtual machine interface.

[0084] In some specific embodiments, the second task issuing and execution module 14 may specifically include:

[0085] The first task sending unit is used to send the target add / delete operation task located in the second virtual machine to the active push data synchronization device in the production site through the edit virtual machine interface;

[0086] The second task sending unit is used to send the target add / delete operation task to the first virtual machine through the active push data synchronization device.

[0087] In some specific embodiments, the virtual machine configuration data synchronization device may further include:

[0088] The first interface calling unit is used to call the query virtual machine interface of the production site through the active data retrieval and synchronization device in the disaster recovery site.

[0089] The data retrieval unit is used to retrieve the current full configuration information data of the first virtual machine through the query virtual machine interface;

[0090] The comparison unit is used to compare the current full configuration information data with the configuration information data currently existing in the second virtual machine to obtain a comparison result;

[0091] The data recovery unit is used to recover the configuration information data currently existing in the second virtual machine based on the current full configuration information data if the comparison result shows that there is a difference between the current full configuration information data and the configuration information data currently existing in the second virtual machine.

[0092] In some specific embodiments, the first interface calling unit may specifically include:

[0093] The second interface calling unit is used to call the query virtual machine interface of the production site through the active data retrieval and synchronization device in the disaster recovery site and according to a preset time period.

[0094] In some specific embodiments, the data recovery unit may specifically include:

[0095] The data transmission unit is used to transmit the current full configuration information data to the second virtual machine by calling the edit virtual machine interface in the disaster recovery site;

[0096] The task generation unit is used to send add / delete operation tasks generated based on the full configuration information data to the second virtual machine through the active push data synchronization device.

[0097] The data modification unit is used to perform corresponding add / delete operations through the second virtual machine to change the currently existing configuration information data to the full configuration information data;

[0098] The data update unit is used to update the full configuration information data to the database of the disaster recovery site.

[0099] In some specific embodiments, the configuration information data calculation module 11 may specifically include:

[0100] The configuration information data calculation unit is used to calculate the full disk configuration information data after the production site performs the disk configuration data addition or deletion operation on the first virtual machine located in the production site when it is detected that the production site needs to perform disk configuration data addition or deletion operation on the first virtual machine, and obtain the changed full disk configuration information data.

[0101] Furthermore, embodiments of this application also disclose an electronic device, Figure 5 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0102] Figure 5 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the virtual machine configuration data synchronization method disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0103] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0104] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0105] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the virtual machine configuration data synchronization method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.

[0106] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned virtual machine configuration data synchronization method. The specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

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

[0108] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0109] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

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

[0111] The above provides a detailed description of a virtual machine configuration data synchronization method, apparatus, device, and storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for synchronizing virtual machine configuration data, characterized in that, Applied to cloud platforms with a dual-site disaster recovery system, wherein the dual-site disaster recovery system includes a production site and a disaster recovery site, including: When it is detected that the production site needs to perform configuration data addition or deletion operations on the first virtual machine located in the production site, the full configuration information data after the production site performs configuration data addition or deletion operations on the first virtual machine is calculated, and the changed full configuration information data is obtained. Based on the modified full configuration information data, a corresponding target add / delete operation task is generated, and the target add / delete operation task is sent to the second virtual machine in the disaster recovery site so that the target add / delete operation task can be executed through the second virtual machine to obtain the corresponding execution result, and the execution result is returned to the production site; If the execution result indicates that the target add / delete operation task was successfully executed, then the target add / delete operation task is sent to the first virtual machine so that the target add / delete operation task can be executed through the first virtual machine, and the changed full configuration information data is updated to the database of the production site; The step of sending the target add / delete operation task to the second virtual machine in the disaster recovery site includes: sending the target add / delete operation task to the editing virtual machine interface of the disaster recovery site through an active data synchronization device located in the production site; and forwarding the target add / delete operation task to the second virtual machine in the disaster recovery site through the editing virtual machine interface. The step of issuing the target add / delete operation task to the first virtual machine includes: sending the target add / delete operation task located in the second virtual machine to the active push data synchronization device in the production site through the edit virtual machine interface; and sending the target add / delete operation task to the first virtual machine through the active push data synchronization device. The virtual machine configuration data synchronization method further includes: calling the query virtual machine interface of the production site through the active data retrieval synchronization device in the disaster recovery site, and retrieving the current full configuration information data of the first virtual machine through the query virtual machine interface; comparing the current full configuration information data with the configuration information data currently existing in the second virtual machine to obtain a comparison result; if the comparison result shows that there is a difference between the current full configuration information data and the configuration information data currently existing in the second virtual machine, then restoring the configuration information data currently existing in the second virtual machine based on the current full configuration information data.

2. The virtual machine configuration data synchronization method according to claim 1, characterized in that, The step of calling the query virtual machine interface of the production site through the active data retrieval and synchronization device in the disaster recovery site includes: The disaster recovery site actively pulls data synchronization devices and calls the query virtual machine interface of the production site according to a preset time period.

3. The virtual machine configuration data synchronization method according to claim 1, characterized in that, The step of restoring the configuration information data currently existing in the second virtual machine based on the current full configuration information data includes: The current full configuration information data is transmitted to the second virtual machine by calling the edit virtual machine interface in the disaster recovery site, and the add / delete operation task generated based on the full configuration information data is issued to the second virtual machine through the active push data synchronization device, so that the second virtual machine can perform the corresponding add / delete operation to change the current configuration information data to the full configuration information data, and then update the full configuration information data to the database of the disaster recovery site.

4. The virtual machine configuration data synchronization method according to any one of claims 1 to 3, characterized in that, When it is detected that the production site needs to perform configuration data addition / deletion operations on the first virtual machine located in the production site, the full configuration information data after the production site performs the configuration data addition / deletion operations on the first virtual machine is calculated, and the changed full configuration information data is obtained, including: When it is detected that the production site needs to perform disk configuration data addition or deletion operations on the first virtual machine located in the production site, the full disk configuration information data after the production site performs the disk configuration data addition or deletion operations on the first virtual machine is calculated, and the changed full disk configuration information data is obtained.

5. A virtual machine configuration data synchronization device, characterized in that, Applied to cloud platforms with a dual-site disaster recovery system, wherein the dual-site disaster recovery system includes a production site and a disaster recovery site, including: The configuration information data calculation module is used to calculate the full configuration information data after the production site performs the configuration data addition or deletion operation on the first virtual machine located in the production site when it is detected that the production site needs to perform configuration data addition or deletion operation on the first virtual machine, and obtain the changed full configuration information data. The add / delete operation task generation module is used to generate corresponding target add / delete operation tasks based on the changed full configuration information data. The first task distribution and execution module is used to distribute the target add / delete operation task to the second virtual machine in the disaster recovery site, so that the target add / delete operation task can be executed through the second virtual machine to obtain the corresponding execution result, and the execution result can be returned to the production site; The second task issuance and execution module is used to issue the target add / delete operation task to the first virtual machine if the execution result indicates that the target add / delete operation task was successfully executed, so that the target add / delete operation task can be executed through the first virtual machine and the changed full configuration information data can be updated to the database of the production site. The first task distribution and execution module is specifically used to distribute the target add / delete operation task to the editing virtual machine interface of the disaster recovery site through the active push data synchronization device located in the production site; and to forward the target add / delete operation task to the second virtual machine in the disaster recovery site through the editing virtual machine interface; The second task issuance and execution module is specifically used to send the target add / delete operation task located in the second virtual machine to the active push data synchronization device in the production site through the edit virtual machine interface; and to send the target add / delete operation task to the first virtual machine through the active push data synchronization device; The device is further configured to invoke the query virtual machine interface of the production site through the active data retrieval and synchronization device in the disaster recovery site, and retrieve the current full configuration information data of the first virtual machine through the query virtual machine interface; compare the current full configuration information data with the configuration information data currently existing in the second virtual machine to obtain a comparison result; if the comparison result shows that there is a difference between the current full configuration information data and the configuration information data currently existing in the second virtual machine, then restore the configuration information data currently existing in the second virtual machine based on the current full configuration information data.

6. An electronic device, characterized in that, It includes a processor and a memory; wherein, when the processor executes a computer program stored in the memory, it implements the virtual machine configuration data synchronization method as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer programs are executed by a processor, they implement the virtual machine configuration data synchronization method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Disaster-tolerant method, device and system for virtual machine

    CN107566139A

  • Disaster recovery backup method and system of virtual machine, computer equipment and storage medium

    CN114706661A