A virtual machine data recording method, system, device and readable storage medium

By using a user-policy-based virtual machine data recording method in the cloud platform and leveraging the file system snapshot function, the problems of low storage utilization and incomplete functionality in traditional methods are solved. This enables rapid playback of virtual machine data and incremental data acquisition, and supports data backtracking and disaster recovery.

CN116089014BActive Publication Date: 2026-03-31JINAN INSPUR DATA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-10
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Traditional cloud platform virtual machine data protection methods suffer from problems such as low storage utilization, poor performance, unstable erasure coding, incomplete functionality, and inability to trace back to data from past moments.

Method used

By creating recording tasks based on user-defined recording units and recording strategies, sending snapshot requests to the cloud platform, and utilizing the file system snapshot function to record virtual machine data, the system supports the creation of snapshots with random, fixed time, load, fixed data volume, and intelligent strategies.

Benefits of technology

It enables rapid playback, rollback, and incremental data acquisition of virtual machine data, supports data backtracking, backup, and disaster recovery functions, and improves storage utilization and data recovery efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116089014B_ABST
    Figure CN116089014B_ABST
Patent Text Reader

Abstract

The application belongs to the field of computers, and particularly relates to a virtual machine data recording method, system, device and readable storage medium. The method comprises the following steps: creating a recording task and executing the recording task based on a recording unit and a recording strategy determined by a user; and sending a snapshot request about the recording unit to a cloud platform through the recording task and based on the recording strategy in response to the recording task execution. The application provides a virtual machine data recording method, and based on the snapshot function of a file system, different recording units and recording strategies are selected to perform snapshot recording operation on the disk data of the virtual machine, so that the data playback, data rollback and incremental data acquisition of the virtual machine are quickly realized. The data playback can be used to view the historical data of the virtual machine, the data rollback can be used to recover the data when the virtual machine crashes or data is lost, and the incremental data acquisition can be used to back up the virtual machine data and realize the extension functions such as virtual machine incremental data migration and disaster recovery.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer science, and specifically relates to a virtual machine data recording method, system, device, and readable storage medium. Background Technology

[0002] Traditional cloud platform virtual machine disk data protection relies on either data mirroring or erasure coding principles. Both require dedicated storage systems or backend support. While mirroring is technically simple, it suffers from low storage utilization and poor performance due to the need for multiple data writes. Erasure coding, while improving storage system utilization, is the most expensive due to its complex data model, and most importantly, current erasure coding methods are unstable. Furthermore, both mirroring and erasure coding can only be used for data protection; after a segment of data is corrupted, it can be recovered using other data segments, but it cannot be used for data playback, meaning it cannot revert to a past point in time.

[0003] Some cloud platforms also use file system snapshot technology to protect and restore virtual machine data, but the use cases are relatively limited, the snapshot strategies are relatively simple, the functions are not complete enough, and they cannot adapt to the current rapidly developing cloud platforms and virtualization scenarios. Summary of the Invention

[0004] To address the above problems, this invention proposes a virtual machine data recording method, comprising:

[0005] Create and execute recording tasks based on user-defined recording units and recording strategies;

[0006] In response to the execution of the recording task, a snapshot request for the recording unit is sent to the cloud platform through the recording task and based on the recording strategy.

[0007] In some embodiments of the present invention, sending a snapshot request for the recording unit to the cloud platform through the recording task and based on the recording strategy includes:

[0008] In response to the recording strategy being a random strategy, a time for creating a snapshot request is randomly generated. In response to the system time reaching the time of the snapshot request, a snapshot request for the recording unit is sent to the cloud platform.

[0009] In some embodiments of the present invention, sending a snapshot request for the recording unit to the cloud platform through the recording task and based on the recording strategy further includes:

[0010] In response to the fixed-time recording strategy, a snapshot request for the recording unit is sent to the cloud platform at each predetermined time.

[0011] In some embodiments of the present invention, sending a snapshot request for the recording unit to the cloud platform through the recording task and based on the recording strategy further includes:

[0012] If the recording strategy is a load strategy, the dynamic parameters of the recording unit are monitored. If the dynamic parameters reach a threshold, the cloud platform sends a snapshot request for the recording unit.

[0013] If the recording strategy is a fixed data volume strategy, the data growth of the recording unit is monitored. If the data growth reaches a preset data volume, a snapshot request for the recording unit is sent to the cloud platform.

[0014] In some embodiments of the present invention, sending a snapshot request for the recording unit to the cloud platform through the recording task and based on the recording strategy further includes:

[0015] In response to the recording strategy being an intelligent strategy, a snapshot request for the recording unit is sent to the cloud platform simultaneously using the judgment conditions of a fixed data volume strategy, a load strategy, and a fixed time strategy.

[0016] In some embodiments of the present invention, the method further includes:

[0017] Based on the snapshot creation interface provided by the recording task, in response to receiving a corresponding call operation based on the interface, a snapshot request for the recording unit is sent to the cloud platform.

[0018] In some embodiments of the present invention, the method further includes:

[0019] Upon successful execution of the snapshot request by the cloud platform, the execution information of the snapshot request is saved to the database;

[0020] A video playback task is created by storing the snapshot request execution information in the database. In response to the user selecting the corresponding snapshot node for playback, the video playback task controls the corresponding virtual machine to restore the virtual machine's state based on the data of the snapshot node.

[0021] Another aspect of the present invention provides a virtual machine data recording system, comprising:

[0022] The task creation module is configured to create and execute recording tasks based on user-defined recording units and recording strategies.

[0023] A task execution module is configured to respond to the recording task execution by sending a snapshot request for the recording unit to the cloud platform based on the recording strategy.

[0024] Another aspect of the present invention provides a computer device comprising:

[0025] At least one processor; and

[0026] A memory storing computer instructions executable on the processor, which, when executed by the processor, implement the steps of any of the methods described in the above embodiments.

[0027] Another aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the methods described in the above embodiments.

[0028] This invention provides a virtual machine data recording method based on the snapshot function of the file system. By selecting different recording units and recording strategies, snapshot recording operations can be performed on the virtual machine's disk data, enabling rapid data playback, data rollback, and incremental data acquisition. Data playback allows viewing the virtual machine's historical data, while data rollback can recover data in case of virtual machine crashes or data loss. Incremental data acquisition can be used to back up virtual machine data, enabling extended functions such as incremental data migration and disaster recovery. Attached Figure Description

[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention 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 some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0030] Figure 1 This is a flowchart illustrating a virtual machine data recording method provided in an embodiment of the present invention.

[0031] Figure 2 This is a schematic diagram of the structure of a virtual machine data recording system provided in an embodiment of the present invention;

[0032] Figure 3 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention;

[0033] Figure 4 This is a schematic diagram of the structure of a computer-readable storage medium provided in an embodiment of the present invention. Detailed Implementation

[0034] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to specific examples and the accompanying drawings.

[0035] This invention aims to solve the data backup problem of virtual machines in traditional cloud platform systems. While traditional cloud platforms offer snapshot functionality for virtual machines, this is only possible through manual user commands to the cloud platform's file system. Furthermore, for many cloud platforms, snapshot creation depends on user actions—specifically, a snapshot is generated only when the user selects it on the management page—lacking the flexibility to set snapshot policies based on the number of virtual machines. Additionally, snapshots created earlier become invalid, making it impossible for users to restore virtual machine operation across multiple application scenarios to trace related issues. Traditional snapshot methods only provide a single method for creating virtual machine snapshots on the cloud platform page. When users modify applications or configure new programs within the virtual machine, they must manually submit snapshot requests and then manually select the corresponding snapshot to restore if problems arise. Even when users are running programs or applications at different stages and want to save the current virtual machine's running state and data status as a "data breakpoint," traditional snapshot methods still cannot achieve this.

[0036] like Figure 1 As shown, to solve the above problems, this invention proposes a virtual machine data recording method, including:

[0037] Step S1: Create and execute a recording task based on the recording unit and recording strategy determined by the user;

[0038] Step S2: In response to the execution of the recording task, send a snapshot request for the recording unit to the cloud platform through the recording task and based on the recording strategy.

[0039] In embodiments of this invention, "video recording" refers to continuously creating snapshots of a virtual machine using a "video recording" method. The video recording unit refers to the storage target for creating snapshots, and there are two main types of parameters: one is the virtual machine itself; when a virtual machine is selected, snapshots will be taken of all storage devices on the virtual machine. The other is the storage device mounted on the virtual machine, i.e., the corresponding disk mounted on the virtual machine's operating system; when the corresponding disk is selected, only that disk will be snapshotted. The video recording strategy is the snapshot creation strategy for the video recording unit created in this invention.

[0040] Specifically, in step S1, information about the virtual machine is provided to the user in a graphical interface, along with an interface for creating recording tasks. After the user confirms on the interface that a recording task is to be created for a specific recording unit according to the provided recording strategy, the corresponding recording task is created based on the user-selected recording unit (which can be a disk on the virtual machine or the entire virtual machine) and the recording strategy, that is, a process is created to execute the recording unit according to the recording strategy.

[0041] In step S2, after the recording task is executed, snapshot instructions for specific disks or virtual machines are sent to the cloud platform strictly according to the recording policy. The recording policy determines when to send snapshot instructions to the cloud platform. It mainly revolves around factors related to virtual machine operation, such as time, storage performance, and storage space. Recording policies include: random policies, fixed-time policies, load policies, fixed-data-volume policies, and intelligent policies.

[0042] In some embodiments of the present invention, sending a snapshot request for the recording unit to the cloud platform through the recording task and based on the recording strategy includes:

[0043] In response to the recording strategy being a random strategy, a time for creating a snapshot request is randomly generated. In response to the system time reaching the time of the snapshot request, a snapshot request for the recording unit is sent to the cloud platform.

[0044] In this embodiment, if the recording strategy is a random strategy, the process corresponding to the recording task generates a random time within a certain period. When the time within the period meets the random time, a snapshot request for the recording unit is sent to the cloud platform. For example, if the period is one day, a random time point is generated, such as 2 PM. If the system time is 2 PM within that period, the recording task process sends a snapshot request for the recording unit to the cloud platform. Then, a new random time is generated for use as the time point to send the snapshot request in the next period.

[0045] In some embodiments of the present invention, sending a snapshot request for the recording unit to the cloud platform through the recording task and based on the recording strategy further includes:

[0046] In response to the fixed-time recording strategy, a snapshot request for the recording unit is sent to the cloud platform at each predetermined time.

[0047] In this embodiment, if the recording strategy is a fixed-time strategy, a snapshot request to create the recording unit is sent to the cloud platform at a specified (user-specified or system default) time point within the periodic time.

[0048] In some embodiments of the present invention, sending a snapshot request for the recording unit to the cloud platform through the recording task and based on the recording strategy further includes:

[0049] If the recording strategy is a load strategy, the dynamic parameters of the recording unit are monitored. If the dynamic parameters reach a threshold, the cloud platform sends a snapshot request for the recording unit.

[0050] If the recording strategy is a fixed data volume strategy, the data growth of the recording unit is monitored. If the data growth reaches a preset data volume, a snapshot request for the recording unit is sent to the cloud platform.

[0051] In this embodiment, if the recording strategy is a load balancing strategy, the virtual machine disk's IOPS (Input / Output Per Second), throughput, disk utilization, and disk saturation are monitored. For these parameters, corresponding thresholds are set based on the model, type, and read / write performance of the physical disk corresponding to the disk mounted on the virtual machine (the disks displayed on the virtual machine are mostly logical disks or virtual disks encapsulated by the cloud platform). When the corresponding threshold is reached, the recording task process sends a snapshot creation command for the recording unit to the cloud platform.

[0052] In some embodiments of the present invention, if the recording strategy is a fixed data stream strategy, the data volume of the recording unit is monitored. If the data volume of the recording unit reaches a preset data volume, a snapshot request for the recording unit is sent to the cloud platform.

[0053] In some embodiments of the present invention, sending a snapshot request for the recording unit to the cloud platform through the recording task and based on the recording strategy further includes:

[0054] In response to the recording strategy being an intelligent strategy, a snapshot request for the recording unit is sent to the cloud platform simultaneously using the judgment conditions of a fixed data volume strategy, a load strategy, and a fixed time strategy.

[0055] In some embodiments of the present invention, if the recording strategy is a smart strategy, then as mentioned above, a concurrent mixed approach of fixed data volume strategy, load strategy and fixed time strategy is adopted. The above three strategies run in parallel without affecting each other. When a snapshot request is generated, the data increment statistics of the fixed data volume strategy and / or the initial time of the period of the fixed time strategy is reset to the current time.

[0056] In some embodiments of the present invention, the method further includes:

[0057] Based on the snapshot creation interface provided by the recording task, in response to receiving a corresponding call operation based on the interface, a snapshot request for the recording unit is sent to the cloud platform.

[0058] In this embodiment, the created recording tasks are highly bound to the recording unit; that is, one recording task is responsible for creating and sending snapshot requests for one virtual machine or disk. Based on this, the present invention provides a corresponding snapshot creation interface through the process of the recording task. When a program or related operation calls this interface, the program or related user calling the interface is authenticated. After successful authentication, a snapshot request for the recording unit is immediately sent to the cloud platform according to the interface call time. In other words, through snapshot requests, users can insert snapshot creation operations into the execution flow of their programs running in the virtual machine. When the user's program executes the corresponding step, if it needs to save the current state, it can call the snapshot creation interface to create a snapshot of the entire virtual machine or one or more disks on the virtual machine, saving the current state of the program.

[0059] In some embodiments of the present invention, the method further includes:

[0060] Upon successful execution of the snapshot request by the cloud platform, the execution information of the snapshot request is saved to the database;

[0061] A video playback task is created by storing the snapshot request execution information in the database. In response to the user selecting the corresponding snapshot node for playback, the video playback task controls the corresponding virtual machine to restore the virtual machine's state based on the data of the snapshot node.

[0062] In this embodiment, the snapshot request sent by the recording task to the platform is recorded in the database after execution. Therefore, in this invention, snapshot records belonging to a virtual machine based on the database records are displayed to the user, who can then select the corresponding snapshot node for restoration. The difference is that snapshot data after the selected snapshot node is not deleted; only the virtual machine is restored to the state of the selected snapshot node. Specifically, if the recording unit of the selected snapshot record is a virtual machine, the virtual machine is first shut down, and then all disks mounted on the virtual machine are restored to the data in that snapshot record. The virtual machine is then restarted, and it will automatically load the corresponding data after running. If the recording unit is a disk mounted on the virtual machine, the corresponding disk is first unmounted from the virtual machine, then the disk is restored to the state corresponding to the time of the snapshot record, and then remounted to the virtual machine.

[0063] Furthermore, if a user selects one of the snapshot nodes for restoration and continues to use it as a basis, this invention still retains all snapshots generated after that snapshot node, and treats snapshots generated after the virtual machine as branch snapshots of that snapshot node. Specifically, assuming the snapshot order is A1, B1, C1, D1, E1, if the user selects to restore the virtual machine at snapshot node C1, the virtual machine is restored to C1. If the user continues to use it based on C1, subsequent snapshot records will not overwrite D1 and E1, but will instead create a new branch. Under this branch, subsequent snapshot records are recorded as D2 and E2. The original D1 and E1 are retained until they are deleted according to the snapshot's lifespan. Meanwhile, even under the new branch, the user can still select the snapshot corresponding to D1 and E1 for restoration.

[0064] Example:

[0065] This invention proposes a virtual machine disk data recording method and apparatus based on a snapshot file system, which mainly includes: a disk device management module, a disk data recording module, and a disk data recording point management module.

[0066] The disk device module manages the virtual disk devices of virtual machines. It allows for the quick addition of new virtual disks, deletion of old virtual disks, and expansion of existing virtual disks. The virtual disks of virtual machines are actually ordinary files on the file system, supporting formats such as qcow2 and raw, as well as thin and thick provisioning.

[0067] Disk data recording device module: Recording unit selection, recording strategy selection, start automatic recording, stop automatic recording, manual recording, details are as follows:

[0068] 1. Recording Unit Selection: Users can record recordings on a virtual machine basis or on a virtual disk within a virtual machine. When selecting virtual machines as the unit, the same recording policy is applied to all virtual disks within the virtual machine. When selecting virtual disks as the unit, a different, personalized recording policy is applied to each virtual disk within the virtual machine.

[0069] 2. Recording Strategy Selection: Random strategy: The system randomly selects a time point to start recording; this affects system operations. Fixed time interval strategy: Recording occurs at regular intervals, such as every minute or half an hour. Low load strategy: Recording occurs when the virtual disk load falls below a certain value. The load can be the virtual disk's IOPS, throughput, disk utilization, disk saturation, or the load of the file system hosting the virtual disk. Fixed data volume strategy: Recording occurs every time a certain amount of data is written to the virtual disk. Intelligent strategy: Combining the fixed time interval, low load, and fixed data volume strategies, recording only occurs when one or more conditions are met.

[0070] 3. Start automatic recording: After the recording unit and recording strategy are selected, start automatic recording. The system can start automatic recording according to the recording unit and recording strategy selected by the user.

[0071] 4. Stop Automatic Recording: Once automatic recording is enabled, users can stop it as needed. For example, when virtual machine operations are very busy, recording can be stopped to reduce the impact on the system; conversely, when virtual machine operations are no longer needed, the recording function can be stopped. Additionally, if users need to reselect recording units or recording strategies, they must first stop automatic recording and then restart it.

[0072] 5. Manual recording: Regardless of whether the automatic recording function is enabled, users can manually record as needed. The system can distinguish between automatically and manually created recordings using different naming conventions, facilitating data playback and recovery later.

[0073] The disk data recording management module addresses the issue that virtual machine disks may reside on different file systems, while recording points (snapshots) must reside on the same file system. The system creates a directory for each virtual disk to store different recording points. The command format for recording points (snapshots) is: Virtual Disk Name_Recording Type_Recording Number_Recording Time. The recording management device manages all recording points of the virtual machine: 1. Recording point deletion: Users can delete specific recording points as needed; 2. Recording point playback: View data from the virtual disk at a past point in time; 3. Recording point restoration: Restore disk data to a past recording point; 4. Incremental data calculation: Compare any two recording points to obtain incremental data from the newer recording point relative to the older one.

[0074] This invention provides a virtual machine data recording method based on the snapshot function of the file system. By selecting different recording units and strategies, snapshot recording operations can be performed on the disk data of the virtual machine, enabling rapid data playback, data rollback, and incremental data acquisition. Data playback allows viewing historical data of the virtual machine, while data rollback can recover data when the virtual machine crashes or loses data. Incremental data acquisition can be used to back up virtual machine data, enabling incremental data migration and disaster recovery, among other extended functions. It is applied to disk data protection, disk data playback, and disk data recovery for virtual machines in cloud platforms. Virtual machine disk data recording, i.e., creating snapshots, requires the support of the underlying file system. Through the snapshot technology of the file system, disk data recording and playback functions can be quickly implemented. Not only can historical data of the virtual machine be played back, but data can also be restored to any past point in time when virtual machine data is lost using recording points. Most importantly, incremental data of the virtual machine can be acquired using different recording points, facilitating incremental backup, incremental migration, and data disaster recovery.

[0075] like Figure 2 As shown, another aspect of the present invention provides a virtual machine data recording system, comprising:

[0076] Task creation module 1, configured to create and execute recording tasks based on user-defined recording units and recording strategies;

[0077] Task execution module 2 is configured to respond to the recording task execution by sending a snapshot request for the recording unit to the cloud platform based on the recording strategy.

[0078] like Figure 3 As shown, another aspect of the present invention also provides a computer device comprising:

[0079] At least one processor 21; and

[0080] Memory 22 stores computer instructions 23 executable on processor 21, which, when executed by processor 21, implement a virtual machine data recording method, including:

[0081] Create and execute recording tasks based on user-defined recording units and recording strategies;

[0082] In response to the execution of the recording task, a snapshot request for the recording unit is sent to the cloud platform through the recording task and based on the recording strategy.

[0083] In some embodiments of the present invention, sending a snapshot request for the recording unit to the cloud platform through the recording task and based on the recording strategy includes:

[0084] In response to the recording strategy being a random strategy, a time for creating a snapshot request is randomly generated. In response to the system time reaching the time of the snapshot request, a snapshot request for the recording unit is sent to the cloud platform.

[0085] In some embodiments of the present invention, sending a snapshot request for the recording unit to the cloud platform through the recording task and based on the recording strategy further includes:

[0086] In response to the fixed-time recording strategy, a snapshot request for the recording unit is sent to the cloud platform at each predetermined time.

[0087] In some embodiments of the present invention, sending a snapshot request for the recording unit to the cloud platform through the recording task and based on the recording strategy further includes:

[0088] If the recording strategy is a load strategy, the dynamic parameters of the recording unit are monitored. If the dynamic parameters reach a threshold, the cloud platform sends a snapshot request for the recording unit.

[0089] If the recording strategy is a fixed data volume strategy, the data growth of the recording unit is monitored. If the data growth reaches a preset data volume, a snapshot request for the recording unit is sent to the cloud platform.

[0090] In some embodiments of the present invention, sending a snapshot request for the recording unit to the cloud platform through the recording task and based on the recording strategy further includes:

[0091] In response to the recording strategy being an intelligent strategy, a snapshot request for the recording unit is sent to the cloud platform simultaneously using the judgment conditions of a fixed data volume strategy, a load strategy, and a fixed time strategy.

[0092] In some embodiments of the present invention, the method further includes:

[0093] Based on the snapshot creation interface provided by the recording task, in response to receiving a corresponding call operation based on the interface, a snapshot request for the recording unit is sent to the cloud platform.

[0094] In some embodiments of the present invention, the method further includes:

[0095] Upon successful execution of the snapshot request by the cloud platform, the execution information of the snapshot request is saved to the database;

[0096] A video playback task is created by storing the snapshot request execution information in the database. In response to the user selecting the corresponding snapshot node for playback, the video playback task controls the corresponding virtual machine to restore the virtual machine's state based on the data of the snapshot node.

[0097] like Figure 4 As shown, another aspect of the present invention provides a computer-readable storage medium 401, which stores a computer program 402. When executed by a processor, the computer program 402 implements a virtual machine data recording method, comprising:

[0098] Create and execute recording tasks based on user-defined recording units and recording strategies;

[0099] In response to the execution of the recording task, a snapshot request for the recording unit is sent to the cloud platform through the recording task and based on the recording strategy.

[0100] In some embodiments of the present invention, sending a snapshot request for the recording unit to the cloud platform through the recording task and based on the recording strategy includes:

[0101] In response to the recording strategy being a random strategy, a time for creating a snapshot request is randomly generated. In response to the system time reaching the time of the snapshot request, a snapshot request for the recording unit is sent to the cloud platform.

[0102] In some embodiments of the present invention, sending a snapshot request for the recording unit to the cloud platform through the recording task and based on the recording strategy further includes:

[0103] In response to the fixed-time recording strategy, a snapshot request for the recording unit is sent to the cloud platform at each predetermined time.

[0104] In some embodiments of the present invention, sending a snapshot request for the recording unit to the cloud platform through the recording task and based on the recording strategy further includes:

[0105] If the recording strategy is a load strategy, the dynamic parameters of the recording unit are monitored. If the dynamic parameters reach a threshold, the cloud platform sends a snapshot request for the recording unit.

[0106] If the recording strategy is a fixed data volume strategy, the data growth of the recording unit is monitored. If the data growth reaches a preset data volume, a snapshot request for the recording unit is sent to the cloud platform.

[0107] In some embodiments of the present invention, sending a snapshot request for the recording unit to the cloud platform through the recording task and based on the recording strategy further includes:

[0108] In response to the recording strategy being an intelligent strategy, a snapshot request for the recording unit is sent to the cloud platform simultaneously using the judgment conditions of a fixed data volume strategy, a load strategy, and a fixed time strategy.

[0109] In some embodiments of the present invention, the method further includes:

[0110] Based on the snapshot creation interface provided by the recording task, in response to receiving a corresponding call operation based on the interface, a snapshot request for the recording unit is sent to the cloud platform.

[0111] In some embodiments of the present invention, the method further includes:

[0112] Upon successful execution of the snapshot request by the cloud platform, the execution information of the snapshot request is saved to the database;

[0113] A video playback task is created by storing the snapshot request execution information in the database. In response to the user selecting the corresponding snapshot node for playback, the video playback task controls the corresponding virtual machine to restore the virtual machine's state based on the data of the snapshot node.

[0114] The above are exemplary embodiments disclosed in this invention. However, it should be noted that various changes and modifications can be made without departing from the scope of the embodiments of this invention as defined by the claims. The functions, steps, and / or actions of the methods according to the disclosed embodiments described herein do not need to be performed in any particular order. Furthermore, although the elements disclosed in the embodiments of this invention may be described or claimed individually, they may be understood as multiple unless explicitly limited to a singular number.

[0115] It should be understood that, as used herein, the singular form “a” is intended to include the plural form as well, unless the context clearly supports an exception. It should also be understood that, as used herein, “and / or” refers to any and all possible combinations of one or more of the associated listed items.

[0116] The embodiment numbers disclosed in the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0117] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0118] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the invention (including the claims) is limited to these examples. Within the framework of the invention, technical features of the above embodiments or different embodiments can be combined, and many other variations of the different aspects of the invention as described above exist, which are not provided in the details for the sake of brevity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the protection scope of the invention.

Claims

1. A method for recording virtual machine data, characterized by, The method comprises: creating a recording task based on a recording unit and a recording strategy determined by a user and performing the recording task; in response to the recording task execution, sending a snapshot request about the recording unit to a cloud platform through the recording task and based on the recording strategy; the sending of the snapshot request about the recording unit to the cloud platform through the recording task and based on the recording strategy comprises: in response to the recording strategy being a random strategy, randomly generating a time for creating a snapshot request, and in response to the system time reaching the time for the snapshot request, sending the snapshot request about the recording unit to the cloud platform; in response to the recording strategy being a fixed time strategy, sending the snapshot request about the recording unit to the cloud platform at each predetermined time; in response to the recording strategy being a load strategy, monitoring a dynamic parameter of the recording unit, and in response to the dynamic parameter reaching a threshold, sending the snapshot request about the recording unit to the cloud platform; in response to the recording strategy being a fixed data volume strategy, monitoring a data growth volume of the recording unit, and in response to the data growth volume reaching a preset data volume, sending the snapshot request about the recording unit to the cloud platform; in response to the recording strategy being an intelligent strategy, simultaneously using the judgment conditions of the fixed data volume strategy, the load strategy, and the fixed time strategy to send the snapshot request about the recording unit to the cloud platform.

2. The method of claim 1, wherein, The method further comprises: providing a snapshot creation interface based on the recording task, and in response to receiving a corresponding calling operation based on the interface, sending the snapshot request about the recording unit to the cloud platform.

3. The method of claim 1, wherein, The method further comprises: in response to the cloud platform successfully executing the snapshot request, saving execution information of the snapshot request to a database; creating a recording playback task through the execution information of the snapshot request saved in the database, and in response to a user selecting a corresponding snapshot node for playback, controlling a corresponding virtual machine to restore a state of the virtual machine based on data of the snapshot node through the recording playback task.

4. A virtual machine data logging system, comprising: The method comprises: a task creation module configured to create a recording task based on a recording unit and a recording strategy determined by a user and perform the recording task; a task execution module configured to, in response to the recording task execution, send a snapshot request about the recording unit to a cloud platform through the recording task and based on the recording strategy; the task execution module is further configured to: in response to the recording strategy being a random strategy, randomly generate a time for creating a snapshot request, and in response to the system time reaching the time for the snapshot request, send the snapshot request about the recording unit to the cloud platform; in response to the recording strategy being a fixed time strategy, send the snapshot request about the recording unit to the cloud platform at each predetermined time; in response to the recording strategy being a load strategy, monitor a dynamic parameter of the recording unit, and in response to the dynamic parameter reaching a threshold, send the snapshot request about the recording unit to the cloud platform; in response to the recording strategy being a fixed data volume strategy, monitor a data growth volume of the recording unit, and in response to the data growth volume reaching a preset data volume, send the snapshot request about the recording unit to the cloud platform; In response to the recording strategy being a smart strategy, the judgment condition of the fixed data volume strategy, the load strategy, and the fixed time strategy are simultaneously adopted to send a snapshot request about the recording unit to the cloud platform.

5. A computer device, characterized by Comprise: at least one processor; and a memory, the memory storing computer instructions executable on the processor, the instructions being executed by the processor to implement the steps of the method of any one of claims 1-3.

6. A computer readable storage medium, the computer readable storage medium storing a computer program, the computer program being executed by a processor to implement the steps of the method of any one of claims 1-3.

Citation Information

Patent Citations

  • Virtual machine parallel record replaying method and system based on continuous snapshots

    CN111913779A